Commit 7b75ed8
committed
[FIX] account: tax lock tags
Despite the tax lock date, users are able to modify the tax report by adding tags.
Steps to reproduce:
Ensure the tax lock date is set
1. Journal Items list view
2. Edit one/many lines that
- have a date before the tax lock date,
- don't have a tax,
- nor tax tags,
- and is not a tax line.
3. Add a new tax tag
Issue:
The tax tags are added and might impact a tax report, when you should have received a user error.
Cause:
The `write` function calls the `_check_tax_lock_date` which in turn only checks the existing line
instead of the values given in the `write` parameters.
Since the line has no existing tax tags the check does not fail.
Solution:
Call the tax lock check both before and after writing the move line.
Task-5169152
closes odoo#233317
X-original-commit: e1c37c1
Signed-off-by: William André (wan) <[email protected]>
Signed-off-by: Habib Ayob (ayh) <[email protected]>1 parent 635f359 commit 7b75ed8
File tree
2 files changed
+14
-1
lines changed- addons/account
- models
- tests
2 files changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1701 | 1701 | | |
1702 | 1702 | | |
1703 | 1703 | | |
| 1704 | + | |
1704 | 1705 | | |
1705 | 1706 | | |
1706 | 1707 | | |
| |||
1715 | 1716 | | |
1716 | 1717 | | |
1717 | 1718 | | |
1718 | | - | |
| 1719 | + | |
1719 | 1720 | | |
1720 | 1721 | | |
1721 | 1722 | | |
| |||
1744 | 1745 | | |
1745 | 1746 | | |
1746 | 1747 | | |
| 1748 | + | |
| 1749 | + | |
1747 | 1750 | | |
1748 | 1751 | | |
1749 | 1752 | | |
| |||
1778 | 1781 | | |
1779 | 1782 | | |
1780 | 1783 | | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
1781 | 1787 | | |
1782 | 1788 | | |
1783 | 1789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| |||
0 commit comments