From 08cf92d5a8563cda711b47a73f390e2deaf936d6 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Fri, 24 Jan 2014 10:27:58 +0100 Subject: [PATCH] [FIX]sale order workflow: fix problem when clicking on ignore delivery exception bzr revid: csn@openerp.com-20140124092758-tur7cs4d6br30x48 --- addons/sale/sale.py | 5 +++++ addons/sale/sale_workflow.xml | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) 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 + + + + +