From 4df201716fb91057d04273598409dbd4c59c70d7 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 29 Nov 2018 15:47:38 +0000 Subject: [PATCH] [FIX] account: account type Make the `user_type_id` read-only to avoid writing the account type on the account when changing on the AML. opw-1904517 closes odoo/odoo#29168 --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index af14862f417..56681b478a9 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -453,7 +453,7 @@ class AccountMoveLine(models.Model): # TODO: put the invoice link and partner_id on the account_move invoice_id = fields.Many2one('account.invoice', oldname="invoice") partner_id = fields.Many2one('res.partner', string='Partner', ondelete='restrict') - user_type_id = fields.Many2one('account.account.type', related='account_id.user_type_id', index=True, store=True, oldname="user_type") + user_type_id = fields.Many2one('account.account.type', related='account_id.user_type_id', index=True, store=True, oldname="user_type", readonly=True) tax_exigible = fields.Boolean(string='Appears in VAT report', default=True, help="Technical field used to mark a tax line as exigible in the vat report or not (only exigible journal items are displayed). By default all new journal items are directly exigible, but with the feature cash_basis on taxes, some will become exigible only when the payment is recorded.") parent_state = fields.Char(compute="_compute_parent_state", help="State of the parent account.move")