Fill move line's origin with statement line
issue10037 review316811002
This commit is contained in:
1 parent
d7462a6135
commit
82e7828906
4 files changed
+12
No files matched your search
@@ -1,3 +1,5 @@
|
||||
* Fill move line's origin with statement line
|
||||
|
||||
Version 5.8.0 - 2020-11-02
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Remove support for Python 3.5
|
||||
|
||||
@@ -16,6 +16,7 @@ def register():
|
||||
statement.LineGroup,
|
||||
account.Journal,
|
||||
account.Move,
|
||||
account.MoveLine,
|
||||
statement.Origin,
|
||||
statement.OriginInformation,
|
||||
statement.ImportStatementStart,
|
||||
|
||||
@@ -71,3 +71,11 @@ class Move(metaclass=PoolMeta):
|
||||
move=move.rec_name,
|
||||
statement=move.origin.rec_name))
|
||||
super().post(moves)
|
||||
|
||||
|
||||
class MoveLine(metaclass=PoolMeta):
|
||||
__name__ = 'account.move.line'
|
||||
|
||||
@classmethod
|
||||
def _get_origin(cls):
|
||||
return super()._get_origin() + ['account.statement.line']
|
||||
@@ -977,6 +977,7 @@ class Line(
|
||||
second_currency = None
|
||||
|
||||
return MoveLine(
|
||||
origin=self,
|
||||
description=self.description,
|
||||
debit=amount < zero and -amount or zero,
|
||||
credit=amount >= zero and amount or zero,
|
||||
|
||||
Reference in new issue
Block a user