Test Autoreconciliation of posted move with just one line of zero

issue3208
review867002
This commit is contained in:
Cédric Krier
2013-06-06 20:33:15 +02:00
parent df99a699eb
commit 8b3872a7b3
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -1335,10 +1335,10 @@ class Invoice(Workflow, ModelSQL, ModelView):
for invoice in invoices:
invoice.set_number()
moves.append(invoice.create_move())
Move.post(moves)
cls.write(invoices, {
'state': 'posted',
})
Move.post(moves)
for invoice in invoices:
if invoice.type in ('out_invoice', 'out_credit_note'):
invoice.print_invoice()
+11
View File
@@ -266,3 +266,14 @@ Credit invoice with refund::
>>> credit_note_tax_code.reload()
>>> credit_note_tax_code.sum == Decimal(20)
True
Create empty invoice::
>>> invoice = Invoice()
>>> invoice.party = party
>>> invoice.payment_term = payment_term
>>> invoice.save()
>>> Invoice.post([invoice.id], config.context)
>>> invoice.reload()
>>> invoice.state
u'paid'