[MERGE] forward port branch 10.0 up to 36ba37a7a1

This commit is contained in:
Christophe Simonis
2019-03-18 10:20:06 +01:00
7 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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