summaryrefslogtreecommitdiff
path: root/addons/account/views/account_move_views.xml
diff options
context:
space:
mode:
authorfw-bot <otis@odoo.com>2020-09-17 14:08:45 +0000
committeroco-odoo <oco@odoo.com>2020-09-22 15:35:47 +0000
commit3161ad348db148523e25b9c0e4a4ada44e5d70cc (patch)
tree154069863e679de62106acb1acdd4a8640c028df /addons/account/views/account_move_views.xml
parentc58684c07658ef7170f9696cc2fbb033ec46ba96 (diff)
[FIX] account: cash basis taxes: set move lines as tax_exigible=False only when some other line has a payable or receivable account in the move.
Before that, making a misc operation with cash basis taxes always set the move lines as tax_exigible=False (or at least, it was supposed to, see below). This was wrong, as if the move did not contain any payable/receivable account, it would result in no cash basis move being ever created, and so the entry would never affect the tax report. Additionnally, the tax line was wrongly managed for cash basis taxes on misc entries, as vals.get('tax_ids') returned an ORM command, so a non-False value, even when the tax_ids field was empty. this caused the condition to execute and to reassign taxes to an empty list, which then caused tax_exigible not to be set to False, even when it should. X-original-commit: https://github.com/odoo/odoo/commit/2437eb0691d07f92094152b84c96a2149c8f4fd8 [FIX] account: make tax exigible correct in cases where the move lines are created separetely from the move. Additional fix on top of https://github.com/odoo/odoo/commit/02fe997932070cc101a96eb869023702c224318b Also, add tax_exigible to the form view of account.move.line, as it will not be computed automatically anymore when modifying a single line in draft state through its form view. It now needs to be manually changed in case the user wants to change something having an impact on it through this form (note that this is absolutely not a typical use case). closes odoo/odoo#58254 X-original-commit: 867797e4983b704599be7943490fc6f071d8c0b7 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com> Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/account/views/account_move_views.xml')
-rw-r--r--addons/account/views/account_move_views.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml
index 27381a5e04f..66d6b010264 100644
--- a/addons/account/views/account_move_views.xml
+++ b/addons/account/views/account_move_views.xml
@@ -41,6 +41,7 @@
<group string="Taxes" attrs="{'invisible': [('tax_line_id','=',False), ('tax_ids','=',[])]}">
<field name="tax_line_id" readonly="1" attrs="{'invisible': [('tax_line_id','=',False)]}"/>
<field name="tax_ids" widget="many2many_tags" readonly="1" attrs="{'invisible': [('tax_ids','=',[])]}"/>
+ <field name="tax_exigible" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="tax_audit"/>
</group>
<group string="Matching" attrs="{'invisible':[('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}">