|
@@ -24,6 +24,17 @@ class SaleOrder(models.Model):
|
|
|
'is_delivery':self.is_delivery,
|
|
|
'delivery_type':self.delivery_type,
|
|
|
})
|
|
|
+ self.update_state()
|
|
|
+ inv.signal_workflow('invoice_open')
|
|
|
+ for picking in sale.picking_ids:
|
|
|
+ picking.force_assign()
|
|
|
+ picking.action_done()
|
|
|
+
|
|
|
+ @api.multi
|
|
|
+ def update_state(self):
|
|
|
+ for order in self:
|
|
|
+ order.write({'state': 'done'})
|
|
|
+ return True
|
|
|
|
|
|
class AccountInvoice(models.Model):
|
|
|
_inherit = 'account.invoice'
|