Skip line with debit and credit equals to zero in FEC

issue7425
review72311002
This commit is contained in:
Cédric Krier
2018-09-17 17:44:37 +02:00
parent 6adda2ab15
commit 019f88014c
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -261,6 +261,7 @@ class AccountFrFEC(Wizard):
domain = [
('move.period.fiscalyear', '=', self.start.fiscalyear.id),
('move.state', '=', 'posted'),
['OR', ('debit', '!=', 0), ('credit', '!=', 0)],
]
if self.start.deferral_period:
domain.append(('move.period', '!=', self.start.deferral_period.id))
+5
View File
@@ -84,6 +84,8 @@ Create some moves::
>>> move.post_number = '1'
>>> move.click('post')
With an empty line::
>>> move = Move()
>>> move.period = period
>>> move.journal = journal_revenue
@@ -95,6 +97,9 @@ Create some moves::
>>> line.account = receivable
>>> line.debit = Decimal(10)
>>> line.party = party
>>> line = move.lines.new()
>>> line.account = cash
>>> line.debit = line.credit = Decimal(0)
>>> move.post_date = period.start_date
>>> move.post_number = '1'
>>> move.click('post')