changeset f3bf0088ae91 in modules/sale_complaint:6.2
details:
https://hg.tryton.org/modules/sale_complaint?cmd=changeset&node=f3bf0088ae91
description:
Do not fail when compute unit for line without unit filled
issue11522
review421241003
(grafted from 04e82b5357320c84387d86221881fdb0cf09920d)
diffstat:
complaint.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r b700f5f3e0bc -r f3bf0088ae91 complaint.py
--- a/complaint.py Mon Nov 01 17:23:27 2021 +0100
+++ b/complaint.py Thu Jun 02 11:21:31 2022 +0200
@@ -713,7 +713,7 @@
@fields.depends('line')
def on_change_with_unit(self, name=None):
- if self.line:
+ if self.line and self.line.unit:
return self.line.unit.id
@fields.depends('quantity', 'line')
@@ -746,7 +746,7 @@
@fields.depends('line')
def on_change_with_unit(self, name=None):
- if self.line:
+ if self.line and self.line.unit:
return self.line.unit.id
@fields.depends('quantity', 'line')