From b747ead8d3d638d971f449419e078d7a72070a75 Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Thu, 15 Sep 2022 14:28:58 +0000 Subject: [PATCH] [IMP] account: move account.move's attachment_ids field from account_accountant to account This field is needed in l10n_mx_edi, as the dependency of a computed field. However, this module only depends from account_accountant, not account. The field thus needs to be moved to a more generic place. closes odoo/odoo#100281 Related: odoo/upgrade#3804 Related: odoo/enterprise#31375 Signed-off-by: Laurent Smet --- addons/account/models/account_move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index d79b6589e72..28d4872a227 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -236,6 +236,7 @@ class AccountMove(models.Model): show_name_warning = fields.Boolean(store=False) type_name = fields.Char('Type Name', compute='_compute_type_name') country_code = fields.Char(related='company_id.account_fiscal_country_id.code', readonly=True) + attachment_ids = fields.One2many('ir.attachment', 'res_id', domain=[('res_model', '=', 'account.move')], string='Attachments') # === Hash Fields === # restrict_mode_hash_table = fields.Boolean(related='journal_id.restrict_mode_hash_table')