Test purchase/sale is filled before using it
issue9770 review300771002
This commit is contained in:
+3
-1
@@ -1244,7 +1244,9 @@ class Line(sequence_ordered(), ModelSQL, ModelView):
|
||||
@fields.depends('purchase', 'company', '_parent_purchase.party',)
|
||||
def _get_product_supplier_pattern(self):
|
||||
return {
|
||||
'party': self.purchase.party.id if self.purchase.party else -1,
|
||||
'party': (
|
||||
self.purchase.party.id
|
||||
if self.purchase and self.purchase.party else -1),
|
||||
'company': (self.company.id if self.company else -1),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user