[IMP] overrided _run_move_create method to get standard price of a product
bzr revid: bde@tinyerp.com-20130826101914-24jt4eqx8zqpvvbg
This commit is contained in:
parent
b97a9da42d
commit
30685ddffb
|
@ -1082,4 +1082,10 @@ class procurement_order(osv.osv):
|
|||
_defaults = {
|
||||
'invoice_state': 'none',
|
||||
}
|
||||
|
||||
|
||||
def _run_move_create(self, cr, uid, procurement, context=None):
|
||||
res = super(procurement_order, self)._run_move_create(cr, uid, procurement, context=context)
|
||||
res.update({
|
||||
'price_unit': procurement.sale_line_id and procurement.sale_line_id.product_id and procurement.sale_line_id.product_id.standard_price or 0.0,
|
||||
})
|
||||
return res
|
||||
|
|
|
@ -86,7 +86,6 @@ class procurement_order(osv.osv):
|
|||
'rule_id': procurement.rule_id.id,
|
||||
'origin': procurement.origin,
|
||||
'picking_type_id': procurement.rule_id.picking_type_id.id,
|
||||
'price_unit': procurement.sale_line_id.product_id and procurement.sale_line_id.product_id.standard_price,
|
||||
}
|
||||
|
||||
def _run(self, cr, uid, procurement, context=None):
|
||||
|
|
Loading…
Reference in New Issue