changeset 343fa6f62bd3 in modules/analytic_account:default
details:
https://hg.tryton.org/modules/analytic_account?cmd=changeset;node=343fa6f62bd3
description:
Use line date instead of post_date when creating an analytic line from
rule
issue9230
review305271002
diffstat:
CHANGELOG | 2 ++
line.py | 2 +-
tests/scenario_analytic_account.rst | 2 ++
3 files changed, 5 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 345514aa5b16 -r 343fa6f62bd3 CHANGELOG
--- a/CHANGELOG Thu Mar 19 19:02:46 2020 +0100
+++ b/CHANGELOG Sun Apr 19 11:32:37 2020 +0200
@@ -1,3 +1,5 @@
+* Use move line date by default when created by rule engine
+
Version 5.4.0 - 2019-11-04
* Bug fixes (see mercurial logs for details)
diff -r 345514aa5b16 -r 343fa6f62bd3 line.py
--- a/line.py Thu Mar 19 19:02:46 2020 +0100
+++ b/line.py Sun Apr 19 11:32:37 2020 +0200
@@ -236,7 +236,7 @@
analytic_lines = []
for entry in rule.analytic_accounts:
analytic_lines.extend(
- entry.get_analytic_lines(line, line.move.post_date))
+ entry.get_analytic_lines(line, line.date))
line.analytic_lines = analytic_lines
@classmethod
diff -r 345514aa5b16 -r 343fa6f62bd3 tests/scenario_analytic_account.rst
--- a/tests/scenario_analytic_account.rst Thu Mar 19 19:02:46 2020 +0100
+++ b/tests/scenario_analytic_account.rst Sun Apr 19 11:32:37 2020 +0200
@@ -138,3 +138,5 @@
True
>>> analytic_line.credit
Decimal('73')
+ >>> analytic_line.date == analytic_line.move_line.date
+ True