diff --git a/sale_auto_order_policy/__openerp__.py b/sale_auto_order_policy/__openerp__.py index a7808bc..c0c3c5c 100644 --- a/sale_auto_order_policy/__openerp__.py +++ b/sale_auto_order_policy/__openerp__.py @@ -26,12 +26,12 @@ 'version': '0.1', 'category': 'Sales Management', 'license': 'AGPL-3', - 'summary': "Order Policy = 'On Delivery Order' by default, switches to 'On Demand' when service-only", + 'summary': "Order Policy = 'On Delivery Order' by default", 'description': """ Sale Auto Order Policy ====================== -With this module, the Order Policy on Quotations is set to 'On Delivery Order' by default. If the Quotation only contains service lines, the Order Policy is switched to 'On Demand' when the Quotation is confirmed. +With this module, the Order Policy on Quotations is set to 'On Delivery Order' by default. If the Quotation only contains service lines, the Order Policy is switched to 'On Demand' when the Quotation is confirmed (native feature). Please contact Alexis de Lattre from Akretion for any help or question about this module. """, diff --git a/sale_auto_order_policy/sale.py b/sale_auto_order_policy/sale.py index dff6571..ab52da1 100644 --- a/sale_auto_order_policy/sale.py +++ b/sale_auto_order_policy/sale.py @@ -30,14 +30,6 @@ class sale_order(orm.Model): 'order_policy': 'picking', } - def action_button_confirm(self, cr, uid, ids, context=None): - assert len(ids) == 1, 'Only one ID' - so = self.browse(cr, uid, ids[0], context=context) - service_only = True - for line in so.order_line: - if line.product_id and line.product_id.type != 'service': - service_only = False - if service_only: - so.write({'order_policy': 'manual'}) - return super(sale_order, self).action_button_confirm( - cr, uid, ids, context=context) + # The function action_wait in sale_stock/sale_stock.py line 224 + # ensures that the order_policy switches to 'manual' when + # we only have services in the order