[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
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user