[FIX] sale: remove unnecessary write call changing state when creating invoice in 'Order Lines to Invoice' menu (opw 600073).

If sale order was with invoice based on delivery order mode, a done sale order would be put back to progress state.

bzr revid: mat@openerp.com-20140402082004-rc6pcg3igrw9achj
This commit is contained in:
Martin Trigaux
2014-04-02 10:20:04 +02:00
-1
View File
@@ -101,7 +101,6 @@ class sale_order_line_make_invoice(osv.osv_memory):
break
if flag:
wf_service.trg_validate(uid, 'sale.order', order.id, 'manual_invoice', cr)
sales_order_obj.write(cr, uid, [order.id], {'state': 'progress'})
if not invoices:
raise osv.except_osv(_('Warning!'), _('Invoice cannot be created for this Sales Order Line due to one of the following reasons:\n1.The state of this sales order line is either "draft" or "cancel"!\n2.The Sales Order Line is Invoiced!'))