diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 865a7e81f5d..b7b465735c3 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -665,6 +665,11 @@ class sale_order(osv.osv): res.append(sale_line_obj.need_procurement(cr, uid, [line.id for line in order.order_line], context=context)) return any(res) + def action_ignore_delivery_exception(self, cr, uid, ids, context=None): + for sale_order in self.browse(cr, uid, ids, context=context): + self.write(cr, uid, ids, {'state': 'progress' if sale_order.invoice_exists else 'manual'}, context=context) + return True + def action_ship_create(self, cr, uid, ids, context=None): """Create the required procurements to supply sales order lines, also connecting the procurements to appropriate stock moves in order to bring the goods to the diff --git a/addons/sale/sale_workflow.xml b/addons/sale/sale_workflow.xml index b8e29ac6b3c..831a0a9d12c 100644 --- a/addons/sale/sale_workflow.xml +++ b/addons/sale/sale_workflow.xml @@ -187,6 +187,13 @@ function action_ship_create() + + + + ship_ignore + function + action_ignore_delivery_exception() + @@ -272,11 +279,16 @@ ship_recreate - + - + ship_corrected + + + + +