diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index a279c411565..02fbe2d2615 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -40,8 +40,8 @@ class stock_move(osv.osv): # no average price costing or cost not specified during picking validation, we will # plug the purchase line values if they are found. if move.purchase_line_id and move.picking_id.purchase_id.pricelist_id: - reference_amount, reference_currency_id = move.purchase_line_id.price_unit, move.picking_id.purchase_id.pricelist_id.currency_id.id - return reference_amount * move.product_qty, reference_currency_id + reference_amount, reference_currency_id = move.purchase_line_id.price_unit * move.product_qty, move.picking_id.purchase_id.pricelist_id.currency_id.id + return reference_amount , reference_currency_id stock_move() diff --git a/addons/stock/stock.py b/addons/stock/stock.py index b4199335179..6ef49e1fea6 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1463,7 +1463,7 @@ class stock_move(osv.osv): _description = "Stock Move" _order = 'date_expected desc, id' _log_create = False - + def action_partial_move(self, cr, uid, ids, context=None): if context is None: context = {} partial_id = self.pool.get("stock.partial.move").create( @@ -2161,7 +2161,7 @@ class stock_move(osv.osv): 'ref': move.picking_id and move.picking_id.name or False, 'date': time.strftime('%Y-%m-%d'), 'partner_id': partner_id, - 'debit': reference_amount * move.product_qty, + 'debit': reference_amount, 'account_id': dest_account_id, } credit_line_vals = { @@ -2171,7 +2171,7 @@ class stock_move(osv.osv): 'ref': move.picking_id and move.picking_id.name or False, 'date': time.strftime('%Y-%m-%d'), 'partner_id': partner_id, - 'credit': reference_amount * move.product_qty, + 'credit': reference_amount, 'account_id': src_account_id, }