[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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user