Skip to content
Snippets Groups Projects
Commit bb3b2ab6 authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] stock_location: avoid possible recursion in workflow, plus make source...

[FIX] stock_location: avoid possible recursion in workflow, plus make source location required for pulled flow

bzr revid: odo@openerp.com-20101015132725-2cwi0tiwb4xbjhmw
parent 824042bb
No related branches found
No related tags found
No related merge requests found
......@@ -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"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment