[FW][FIX] account,pos_cash_rounding: cash rounding account choice fix
The cash rounding profit_account_id directly impact the account on the rounding invoice line. If this is configured with a 'payable' or 'receivable' account such line will be read as term and condition line in '_recompute_payment_terms_lines', messing up the line amounts Adding a domain to avoid the wrong choice opw-2214059 closes odoo/odoo#50205 X-original-commit: 303afca8e86a36ff748050cf60ef779663ac1868 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
<field name="rounding"/>
|
||||
<field name="strategy"/>
|
||||
<field name="profit_account_id" options="{'no_create': True}" attrs="{'invisible': [('strategy', '!=', 'add_invoice_line')], 'required': [('strategy', '=', 'add_invoice_line')]}"
|
||||
groups="account.group_account_invoice,account.group_account_readonly"/>
|
||||
groups="account.group_account_invoice,account.group_account_readonly" domain="[('user_type_id.type', 'not in', ('receivable', 'payable'))]"/>
|
||||
<field name="loss_account_id" options="{'no_create': True}" attrs="{'invisible': [('strategy', '!=', 'add_invoice_line')], 'required': [('strategy', '=', 'add_invoice_line')]}"
|
||||
groups="account.group_account_invoice,account.group_account_readonly"/>
|
||||
groups="account.group_account_invoice,account.group_account_readonly" domain="[('user_type_id.type', 'not in', ('receivable', 'payable'))]"/>
|
||||
<field name="rounding_method"/>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
Reference in New Issue
Block a user