From e2fe60e7174fda8fc1ba095581e01c38b949fb5d Mon Sep 17 00:00:00 2001 From: "Pierrot (prro)" Date: Fri, 16 Sep 2022 12:01:42 +0000 Subject: [PATCH] [IMP] account: update Jitems partner edit condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- addons/account/models/account_move_line.py | 3 ++- addons/account/views/account_move_views.xml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_move_line.py b/addons/account/models/account_move_line.py index 38e7a035ffc..98599dd282c 100644 --- a/addons/account/models/account_move_line.py +++ b/addons/account/models/account_move_line.py @@ -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, diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index e4c5e2c694d..cfd3f191eac 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -168,8 +168,8 @@ - - + + @@ -192,6 +192,7 @@ options="{'product_field': 'product_id', 'account_field': 'account_id', 'force_applicability': 'optional'}" /> +