[FIX] stock: onchange picking type use wrong variable
The onchange code calls the variable 'partner' before assignement, this error comes from the migration in rev: https://github.com/odoo/odoo/commit/d45996c9 We fix it by calling the right 'self.partner_id' variable
This commit is contained in:
@@ -382,7 +382,7 @@ class Picking(models.Model):
|
||||
if self.partner_id:
|
||||
if self.partner_id.picking_warn == 'no-message' and self.partner_id.parent_id:
|
||||
partner = self.partner_id.parent_id
|
||||
elif self.partner_id.picking_warn not in ('no-message', 'block') and partner.parent_id.picking_warn == 'block':
|
||||
elif self.partner_id.picking_warn not in ('no-message', 'block') and self.partner_id.parent_id.picking_warn == 'block':
|
||||
partner = self.partner_id.parent_id
|
||||
else:
|
||||
partner = self.partner_id
|
||||
|
||||
Reference in New Issue
Block a user