[IMP] account: Add country_code to account.move

Add country_code related to company_id.country_id.code to avoid doing
that in every localizaiton module.

Task 2180269
PR #45743
This commit is contained in:
yhu-odoo
2020-03-10 07:53:43 +00:00
parent 8509ba7d2a
commit 7edb5c111d
+1
View File
@@ -151,6 +151,7 @@ class AccountMove(models.Model):
string='Partner', change_default=True)
commercial_partner_id = fields.Many2one('res.partner', string='Commercial Entity', store=True, readonly=True,
compute='_compute_commercial_partner_id')
country_code = fields.Char(related='company_id.country_id.code', readonly=True)
# === Amount fields ===
amount_untaxed = fields.Monetary(string='Untaxed Amount', store=True, readonly=True, tracking=True,