changeset e5edf81c8062 in modules/account_asset:default
details:
https://hg.tryton.org/modules/account_asset?cmd=changeset;node=e5edf81c8062
description:
Test asset_lines before using first line for start_fixed_value
issue9254
review311381002
diffstat:
asset.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r b9f3f96e0159 -r e5edf81c8062 asset.py
--- a/asset.py Sat Apr 25 23:53:49 2020 +0200
+++ b/asset.py Tue Apr 28 00:25:58 2020 +0200
@@ -996,7 +996,8 @@
@cached_property
def start_fixed_value(self):
- if self.start_date < self.asset.start_date:
+ if (self.start_date < self.asset.start_date
+ or not self.asset_lines):
return 0
value = self.asset_lines[0].acquired_value
date = self.asset_lines[0].date