diff options
| author | Toufik Ben Jaa <tbe@odoo.com> | 2019-07-10 14:19:17 +0000 |
|---|---|---|
| committer | Toufik Ben Jaa <tbe@odoo.com> | 2019-07-10 14:19:17 +0000 |
| commit | 07e87e1e346d81b07e80b77edc1940c37a44f5f4 (patch) | |
| tree | d1f3d5c93a35dee14601bfd7e00a9ec6d21b44c4 | |
| parent | 00ef2653da41d7c7633d5fdf26bda11a4e8208ee (diff) | |
[FIX] lunch: default value for `responsible_id` is incorrect
- When creating a vendor on lunch without setting explicitly the
`responsible_id`, `default_get` should return the current user id.
Instead it returns the current user's partner id.
closes odoo/odoo#34759
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
| -rw-r--r-- | addons/lunch/models/lunch_supplier.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/lunch/models/lunch_supplier.py b/addons/lunch/models/lunch_supplier.py index f0ee44b853f..af1cf46f33a 100644 --- a/addons/lunch/models/lunch_supplier.py +++ b/addons/lunch/models/lunch_supplier.py @@ -50,7 +50,7 @@ class LunchSupplier(models.Model): country_id = fields.Many2one('res.country', related='partner_id.country_id', readonly=False) responsible_id = fields.Many2one('res.users', string="Responsible", domain=lambda self: [('groups_id', 'in', self.env.ref('lunch.group_lunch_manager').id)], - default=lambda self: self.env.user.partner_id, + default=lambda self: self.env.user, help="The responsible is the person that will order lunch for everyone" "It will be used as the 'from' when sending the automatic email") |
