[REF] project_mrp: small refactor in _get_project in procurement.order model
bzr revid: hmo@tinyerp.com-20111215054947-zmk473sgeeap9wee
This commit is contained in:
parent
e9cb0c67c8
commit
a50550225c
|
@ -60,10 +60,8 @@ class procurement_order(osv.osv):
|
|||
|
||||
def _get_project(self, cr, uid, procurement, context=None):
|
||||
project_project = self.pool.get('project.project')
|
||||
project = None
|
||||
if procurement.product_id.project_id:
|
||||
project = procurement.product_id.project_id
|
||||
elif procurement.sale_line_id:
|
||||
project = procurement.product_id.project_id
|
||||
if not project and procurement.sale_line_id:
|
||||
analytic_account = procurement.sale_line_id.order_id.project_id
|
||||
if analytic_account:
|
||||
project_ids = project_project.search(cr, uid, [('analytic_account_id', '=', account_id)])
|
||||
|
|
Loading…
Reference in New Issue