[MERGE] lp:759695
bzr revid: qdp-launchpad@openerp.com-20110427091752-xlpi8jhsbcos7dlp
This commit is contained in:
commit
f92aa08ef9
|
@ -710,7 +710,7 @@ class sale_order(osv.osv):
|
|||
'note': line.notes,
|
||||
'company_id': order.company_id.id,
|
||||
})
|
||||
|
||||
|
||||
if line.product_id:
|
||||
proc_id = self.pool.get('procurement.order').create(cr, uid, {
|
||||
'name': line.name,
|
||||
|
@ -1204,15 +1204,20 @@ class sale_config_picking_policy(osv.osv_memory):
|
|||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
ir_values_obj = self.pool.get('ir.values')
|
||||
ir_model_data_obj = self.pool.get('ir.model.data')
|
||||
stock_location_obj = self.pool.get('stock.location')
|
||||
location_id = ir_model_data_obj.get_object_reference(cr, uid, 'stock', 'stock_location_output')
|
||||
location_id = location_id and location_id[1] or False
|
||||
chaining_type = False
|
||||
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)
|
||||
ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], o.order_policy)
|
||||
if o.step == 'two':
|
||||
md = self.pool.get('ir.model.data')
|
||||
location_id = md.get_object_reference(cr, uid, 'stock', 'stock_location_output')
|
||||
location_id = location_id and location_id[1] or False
|
||||
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'manual'})
|
||||
if o.step == 'one':
|
||||
chaining_type = 'transparent'
|
||||
else:
|
||||
chaining_type = 'manual'
|
||||
stock_location_obj.write(cr, uid, [location_id], {'chained_auto_packing': chaining_type})
|
||||
|
||||
sale_config_picking_policy()
|
||||
|
||||
|
|
Loading…
Reference in New Issue