Skip posted moved/invoices in post
issue4283 review13661002
This commit is contained in:
1 parent
b1567ac8c4
commit
0e2c476e07
1 file changed
+2
-2
+2
-2
@@ -1334,10 +1334,10 @@ class Invoice(Workflow, ModelSQL, ModelView):
|
||||
for invoice in invoices:
|
||||
invoice.set_number()
|
||||
moves.append(invoice.create_move())
|
||||
cls.write(invoices, {
|
||||
cls.write([i for i in invoices if i.state != 'posted'], {
|
||||
'state': 'posted',
|
||||
})
|
||||
Move.post(moves)
|
||||
Move.post([m for m in moves if m.state != 'posted'])
|
||||
for invoice in invoices:
|
||||
if invoice.type in ('out_invoice', 'out_credit_note'):
|
||||
invoice.print_invoice()
|
||||
|
||||
Reference in new issue
Block a user