[IMP] account: update Jitems partner edit condition
The condition for multi-editing the partner has now changed. The partner cannot be changed on a line that has parts in a (partial) reconciliation. closes odoo/odoo#104258 X-original-commit: 1b30777ab63998d1c0b64b655e717d74b3648bcf Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -71,6 +71,7 @@ class AccountMoveLine(models.Model):
|
||||
help="Utility field to express whether the journal item is subject to storno accounting",
|
||||
)
|
||||
sequence = fields.Integer(compute='_compute_sequence', store=True, readonly=False, precompute=True)
|
||||
move_type = fields.Selection(related='move_id.move_type')
|
||||
|
||||
# === Accountable fields === #
|
||||
account_id = fields.Many2one(
|
||||
@@ -2527,7 +2528,7 @@ class AccountMoveLine(models.Model):
|
||||
"""
|
||||
tax_fnames = ['balance', 'tax_line_id', 'tax_ids', 'tax_tag_ids']
|
||||
fiscal_fnames = tax_fnames + ['account_id', 'journal_id', 'amount_currency', 'currency_id', 'partner_id']
|
||||
reconciliation_fnames = ['account_id', 'date', 'balance', 'amount_currency', 'currency_id']
|
||||
reconciliation_fnames = ['account_id', 'date', 'balance', 'amount_currency', 'currency_id', 'partner_id']
|
||||
return {
|
||||
'tax': tax_fnames,
|
||||
'fiscal': fiscal_fnames,
|
||||
|
||||
@@ -168,8 +168,8 @@
|
||||
<field name="journal_id" readonly="1" options='{"no_open":True}' optional="hide"/>
|
||||
<field name="move_name" string="Journal Entry" widget="open_move_widget"/>
|
||||
<field name="account_id" options="{'no_open': True, 'no_create': True}" domain="[('company_id', '=', company_id)]" groups="account.group_account_readonly"/>
|
||||
<field name="partner_id" optional="show" attrs="{'readonly':[('account_type','in', ('liability_payable','asset_receivable'))]}"/>
|
||||
<field name="ref" optional="hide"/>
|
||||
<field name="partner_id" optional="show" attrs="{'readonly':[('move_type', '!=', 'entry')]}"/>
|
||||
<field name="ref" optional="hide" readonly="False"/>
|
||||
<field name="product_id" readonly="1" optional="hide"/>
|
||||
<field name="name" optional="show"/>
|
||||
<field name="tax_ids" widget="many2many_tags" width="0.5" optional="hide" readonly="1"/>
|
||||
@@ -192,6 +192,7 @@
|
||||
options="{'product_field': 'product_id', 'account_field': 'account_id', 'force_applicability': 'optional'}"
|
||||
/>
|
||||
|
||||
<field name="move_type" invisible="1"/>
|
||||
<field name="parent_state" invisible="1"/>
|
||||
<field name="account_type" invisible="1"/>
|
||||
<field name="statement_line_id" invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user