else:
self.date_end_located = False
+ @api.one
+ @api.depends('address_id')
+ def _compute_country(self):
+ self.country_id = self.address_id.country_id
+
date_begin_located = fields.Datetime(string='Start Date Located', compute='_compute_date_begin_tz')
date_end_located = fields.Datetime(string='End Date Located', compute='_compute_date_end_tz')
address_id = fields.Many2one('res.partner', string='Location',
default=lambda self: self.env.user.company_id.partner_id,
readonly=False, states={'done': [('readonly', True)]})
- country_id = fields.Many2one('res.country', string='Country', related='address_id.country_id',
- store=True, readonly=False, states={'done': [('readonly', True)]})
+ country_id = fields.Many2one('res.country', string='Country',
+ store=True, compute='_compute_country')
description = fields.Html(string='Description', oldname='note', translate=True,
readonly=False, states={'done': [('readonly', True)]})
company_id = fields.Many2one('res.company', string='Company', change_default=True,