Test Autoreconciliation of posted move with just one line of zero
issue3208 review867002
This commit is contained in:
+1
-1
@@ -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()
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user