line: gain/loss ok + test
This commit is contained in:
parent
32eac5aa6c
commit
6ab88d9fb5
2 changed files with 138 additions and 4 deletions
3
line.py
3
line.py
|
@ -182,8 +182,7 @@ class Line(SecondUomMixin, metaclass=PoolMeta):
|
|||
((tab_mvmv_counterpart.reference == tab_line.id) | \
|
||||
(tab_mvmv_counterpart.id == tab_line.reference)) & \
|
||||
tab_mvmv_counterpart.bookingtype.in_(['mvin', 'mvout']) & \
|
||||
(tab_mvmv_counterpart.booktransf != None) & \
|
||||
(tab_mvmv_counterpart.booktransf == getattr(cfg1.gainloss_book, 'id', None)),
|
||||
(tab_mvmv_counterpart.cashbook == getattr(cfg1.gainloss_book, 'id', None)),
|
||||
type_ = 'LEFT OUTER',
|
||||
).select(
|
||||
tab_line.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue