diff options
| author | RomainLibert <rli@odoo.com> | 2019-07-18 13:17:41 +0000 |
|---|---|---|
| committer | RomainLibert <rli@odoo.com> | 2019-07-18 13:17:41 +0000 |
| commit | 1ebec12dc0f5b2a431a52b89909a949529e0b6ad (patch) | |
| tree | 2ed215f748a546c8c73a4ba5350503b402aefbf6 | |
| parent | b8cfe33838afdf1c7a7dde757ed8044d7767cce2 (diff) | |
[FIX] lunch: use currency_id as default value
The default value for a many2one on res.currency should be a
res.currency object not a res.company one
closes odoo/odoo#35004
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
| -rw-r--r-- | addons/lunch/models/lunch_cashmove.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/lunch/models/lunch_cashmove.py b/addons/lunch/models/lunch_cashmove.py index bfac0777959..e4fddd92a27 100644 --- a/addons/lunch/models/lunch_cashmove.py +++ b/addons/lunch/models/lunch_cashmove.py @@ -11,7 +11,7 @@ class LunchCashMove(models.Model): _description = 'Lunch Cashmove' _order = 'date desc' - currency_id = fields.Many2one('res.currency', default=lambda self: self.env.company) + currency_id = fields.Many2one('res.currency', default=lambda self: self.env.company.currency_id) user_id = fields.Many2one('res.users', 'User', default=lambda self: self.env.uid) date = fields.Date('Date', required=True, default=fields.Date.context_today) |
