changeset 78e8d61aa9d2 in modules/production_work_timesheet:default
details:
https://hg.tryton.org/modules/production_work_timesheet?cmd=changeset&node=78e8d61aa9d2
description:
Update production work state on write
Writing on the One2Many cycles may modify the state of the work.
issue11823
review426021003
diffstat:
tests/test_module.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 3abeda294665 -r 78e8d61aa9d2 tests/test_module.py
--- a/tests/test_module.py Sun Oct 23 11:26:50 2022 +0200
+++ b/tests/test_module.py Fri Oct 28 00:35:20 2022 +0200
@@ -76,7 +76,9 @@
# Set write as done
work = self.create_work()
work.save()
- work.state = 'done'
+ work.production.state = 'done'
+ work.production.save()
+ work.state = 'done' # Trigger a write to update state
work.save()
timesheet_work, = work.timesheet_works
self.assertEqual(timesheet_work.timesheet_end_date, Date.today())