Commit b43a53ac authored by Nhomar Hernández's avatar Nhomar Hernández 💬
Browse files

Merge pull request #54 from vauxoo-dev/7.0-prod_cost_aveg_update_at_date_of_transaction-ifrs-hbto

7.0 prod cost aveg update at date of transaction ifrs hbto
parents 2666c279 b72afdbd
......@@ -141,9 +141,10 @@ class stock_partial_picking(osv.osv_memory):
return {'cost': cost, 'currency': company_currency}
else:
# use price set on the purchase order
# valuated at the currency rate when transaction happens
pur_currency = purchase_line.order_id.currency_id.id
company_currency = purchase_line.company_id.currency_id.id
cost = self.pool.get('res.currency').compute(cr, uid, pur_currency, company_currency, purchase_line.price_unit, round=False, context={'date': purchase_line.date_order})
cost = self.pool.get('res.currency').compute(cr, uid, pur_currency, company_currency, purchase_line.price_unit, round=False, context={'date': fields.date.today()})
return {'cost': cost, 'currency': company_currency}
return super(stock_partial_picking, self)._product_cost_for_average_update(cr, uid, move)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment