changeset 02524a57bc80 in modules/sale_product_customer:default
details:
https://hg.tryton.org/modules/sale_product_customer?cmd=changeset;node=02524a57bc80
description:
Test purchase/sale is filled before using it
issue9770
review300771002
diffstat:
sale.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 71ce5c9913aa -r 02524a57bc80 sale.py
--- a/sale.py Sat Oct 24 13:45:12 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',