[MERGE] forward port branch 10.0 up to 36ba37a7a1
This commit is contained in:
@@ -206,7 +206,7 @@ class CurrencyRate(models.Model):
|
||||
|
||||
name = fields.Datetime(string='Date', required=True, index=True,
|
||||
default=lambda self: fields.Date.today() + ' 00:00:00')
|
||||
rate = fields.Float(digits=(12, 6), help='The rate of the currency to the currency of rate 1')
|
||||
rate = fields.Float(digits=(12, 6), default=1.0, help='The rate of the currency to the currency of rate 1')
|
||||
currency_id = fields.Many2one('res.currency', string='Currency', readonly=True)
|
||||
company_id = fields.Many2one('res.company', string='Company',
|
||||
default=lambda self: self.env.user.company_id)
|
||||
|
||||
@@ -425,7 +425,7 @@ class Partner(models.Model):
|
||||
as if they were related fields """
|
||||
commercial_partner = self.commercial_partner_id
|
||||
if commercial_partner != self:
|
||||
sync_vals = commercial_partner._update_fields_values(self._commercial_fields())
|
||||
sync_vals = commercial_partner.with_prefetch()._update_fields_values(self._commercial_fields())
|
||||
self.write(sync_vals)
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user