diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 1be4b4a2477..407e9ea473a 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -1057,6 +1057,8 @@ sale_order_line()
class sale_config_picking_policy(osv.osv_memory):
_name = 'sale.config.picking_policy'
+ _inherit = 'res.config'
+
_columns = {
'name': fields.char('Name', size=64),
'picking_policy': fields.selection([
@@ -1082,7 +1084,7 @@ class sale_config_picking_policy(osv.osv_memory):
'step': lambda *a: 'one'
}
- def set_default(self, cr, uid, ids, context=None):
+ def execute(self, cr, uid, ids, context=None):
for o in self.browse(cr, uid, ids, context=context):
ir_values_obj = self.pool.get('ir.values')
ir_values_obj.set(cr, uid, 'default', False, 'picking_policy', ['sale.order'], o.picking_policy)
@@ -1099,23 +1101,5 @@ class sale_config_picking_policy(osv.osv_memory):
location_id = md._get_id(cr, uid, 'stock', 'stock_location_output')
location_id = md.browse(cr, uid, location_id, context).res_id
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
-
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
- def action_cancel(self, cr, uid, ids, context=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
sale_config_picking_policy()
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index a7535336982..e750a669156 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -508,21 +508,26 @@
Configure Picking Policy for Sale Order
sale.config.picking_policy
form
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -530,6 +535,7 @@
Configure Picking Policy for Sale Order
ir.actions.act_window
sale.config.picking_policy
+
form
form
new
@@ -537,8 +543,6 @@
- Select the default picking policy for Sale Order
- This Configuration step use to set default picking policy when make sale order