[FIX] stock_location: avoid possible recursion in workflow, plus make source location required for pulled flow
bzr revid: odo@openerp.com-20101015132725-2cwi0tiwb4xbjhmw
This commit is contained in:
parent
824042bb1c
commit
bb3b2ab637
|
@ -42,8 +42,6 @@ class procurement_order(osv.osv):
|
|||
for procurement in self.browse(cr, uid, ids):
|
||||
for line in procurement.product_id.flow_pull_ids:
|
||||
if line.location_id==procurement.location_id:
|
||||
if not line.location_src_id:
|
||||
self.write(cr, uid, procurement.id, {'message': _('No source location defined to generate the picking !')})
|
||||
return (line.type_proc=='move') and (line.location_src_id)
|
||||
return False
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<page string="Logistic Flow">
|
||||
<field name="flow_pull_ids" editable="bottom" colspan="4" nolabel="1">
|
||||
<tree string="Pulled flows">
|
||||
<field name="location_id"/>
|
||||
<field name="location_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
|
||||
<field name="type_proc"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
|
@ -59,7 +59,7 @@
|
|||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<group col="4" colspan="4" attrs="{'invisible':[('type_proc','!=','move')]}">
|
||||
<field name="location_src_id"/>
|
||||
<field name="location_src_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
|
||||
<field name="picking_type"/>
|
||||
<field name="partner_address_id"/>
|
||||
<field name="procure_method"/>
|
||||
|
|
Loading…
Reference in New Issue