Use line date instead of post_date when creating an analytic line from rule

issue9230
review305271002
This commit is contained in:
Sebastien Marie committed 2020-04-19 11:32:37 +02:00
1 parent 87cede45a0
commit d651fcb029
3 files changed
+5 -1

No files matched your search

+2
View File
@@ -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)
+1 -1
View File
@@ -236,7 +236,7 @@ class MoveLine(ModelSQL, ModelView):
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
+2
View File
@@ -138,3 +138,5 @@ Check analytic lines are created on posting::
True
>>> analytic_line.credit
Decimal('73')
>>> analytic_line.date == analytic_line.move_line.date
True