[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:
Pierre Masereel
2017-01-04 16:09:46 +01:00
parent b844d93889
commit ae2838521c
+1 -1
View File
@@ -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