[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>
This commit is contained in:
Toufik Ben Jaa
2019-07-10 14:19:17 +00:00
parent 00ef2653da
commit 07e87e1e34
+1 -1
View File
@@ -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")