[IMP]stock: code improvement is done

bzr revid: mma@tinyerp.com-20120319090958-56ueh2bfqu9t4sw1
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-03-19 14:39:58 +05:30
parent 6e5273d5f9
commit 7a5a080526
2 changed files with 6 additions and 6 deletions

View File

@ -741,7 +741,7 @@ class stock_picking(osv.osv):
wf_service = netsvc.LocalService("workflow")
for pick in self.browse(cr, uid, ids):
if pick.state == 'draft':
wf_service.trg_validate(uid, 'stock.picking', pick.id,'button_confirm', cr)
wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_confirm', cr)
move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed']
if not move_ids:
raise osv.except_osv(_('Warning !'),_('Not enough stock, unable to reserve the products.'))

View File

@ -84,16 +84,16 @@ class stock_partial_picking(osv.osv_memory):
separator_extended = ''
for field in res['fields']:
if type == 'in':
separator_extended = '''<separator colspan="4" string="Receive Products"/>'''
for node in nodes:
separator_extended = '''<separator colspan="4" string="Receive Products"/>'''
node.set('string', '_Receive')
if type == 'internal':
elif type == 'internal':
separator_extended = '''<separator colspan="4" string="Move Products"/>'''
for node in nodes:
separator_extended = '''<separator colspan="4" string="Move Products"/>'''
node.set('string', '_Move')
if type == 'out':
elif type == 'out':
separator_extended = '''<separator colspan="4" string="Deliver Products"/>'''
for node in nodes:
separator_extended = '''<separator colspan="4" string="Deliver Products"/>'''
node.set('string', '_Deliver')
res['arch'] = etree.tostring(doc)