Reviewers: ,


Please review this at http://codereview.tryton.org/780003/

Affected files:
  M invoice.py


Index: invoice.py
===================================================================

--- a/invoice.py
+++ b/invoice.py
@@ -1285,9 +1285,13 @@
         for invoice in invoices:
             invoice.set_number()
             moves.append(invoice.create_move())
+        Move.post(moves)
+        cls.write(invoices, {
+                'state': 'posted',
+                })
+        for invoice in invoices:
             if invoice.type in ('out_invoice', 'out_credit_note'):
                 invoice.print_invoice()
-        Move.post(moves)

     @classmethod
     @ModelView.button_action('account_invoice.wizard_pay')



Reply via email to