mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-18 06:12:01 +02:00
fix: store res.company.country_id for 19.0 account module compatibility
account_fiscal_country_id depends on country_id which must be stored to be
converted to SQL. Without store=True, installing account module fails with
ValueError: Cannot convert res.company.country_id to SQL.
🤖 assisted by claude
This commit is contained in:
parent
6219a6a26f
commit
bbd1d1d065
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ class ResCompany(models.Model):
|
|||
string="Fed. State", domain="[('country_id', '=?', country_id)]"
|
||||
)
|
||||
bank_ids = fields.One2many(related='partner_id.bank_ids', readonly=False)
|
||||
country_id = fields.Many2one('res.country', compute='_compute_address', inverse='_inverse_country', string="Country")
|
||||
country_id = fields.Many2one('res.country', compute='_compute_address', inverse='_inverse_country', string="Country", store=True)
|
||||
# Technical field to hide country specific fields in company form view
|
||||
country_code = fields.Char(related='country_id.code', depends=['country_id'])
|
||||
email = fields.Char(related='partner_id.email', store=True, readonly=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue