changeset a78439de2a02 in modules/sale_product_customer:5.4
details:
https://hg.tryton.org/modules/sale_product_customer?cmd=changeset;node=a78439de2a02
description:
Test purchase/sale is filled before using it
issue9770
review300771002
(grafted from 02524a57bc80acbb6ba829f56d22b096765c83f0)
diffstat:
sale.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r c30dec873ea0 -r a78439de2a02 sale.py
--- a/sale.py Fri May 15 21:45:11 2020 +0200
+++ b/sale.py Fri Oct 30 00:10:37 2020 +0100
@@ -33,7 +33,8 @@
@fields.depends('sale', '_parent_sale.party')
def _get_product_customer_pattern(self):
return {
- 'party': self.sale.party.id if self.sale.party else -1,
+ 'party': (
+ self.sale.party.id if self.sale and self.sale.party else -1),
}
@fields.depends('product', 'product_customer',