[IMP] base: use avg group_operator for currency rate
If records are grouped by date, the avg aggregation makes a more meanignful value closes odoo/odoo#59577 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
@@ -235,7 +235,7 @@ class CurrencyRate(models.Model):
|
||||
|
||||
name = fields.Date(string='Date', required=True, index=True,
|
||||
default=lambda self: fields.Date.today())
|
||||
rate = fields.Float(digits=0, default=1.0, help='The rate of the currency to the currency of rate 1')
|
||||
rate = fields.Float(digits=0, default=1.0, group_operator="avg", help='The rate of the currency to the currency of rate 1')
|
||||
currency_id = fields.Many2one('res.currency', string='Currency', readonly=True, required=True, ondelete="cascade")
|
||||
company_id = fields.Many2one('res.company', string='Company',
|
||||
default=lambda self: self.env.company)
|
||||
|
||||
Reference in New Issue
Block a user