diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index e64c12a2359..be4169c4624 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -70,7 +70,7 @@ class stock_picking(osv.osv): def get_currency_id(self, cursor, user, picking): if picking.purchase_id: - return picking.purchase_id.pricelist_id.currency_id.id + return picking.purchase_id.currency_id.id else: return super(stock_picking, self).get_currency_id(cursor, user, picking) @@ -129,7 +129,7 @@ class stock_partial_picking(osv.osv_memory): def _product_cost_for_average_update(self, cr, uid, move): if move.picking_id.purchase_id: return {'cost': move.purchase_line_id.price_unit, - 'currency': move.picking_id.purchase_id.pricelist_id.currency_id.id} + 'currency': move.picking_id.purchase_id.currency_id.id} return super(stock_partial_picking, self)._product_cost_for_average_update(cr, uid, move) # Redefinition of the new field in order to update the model stock.picking.in in the orm diff --git a/addons/sale/wizard/sale_line_invoice.py b/addons/sale/wizard/sale_line_invoice.py index 3b04319f5c7..06aae9ea6d5 100644 --- a/addons/sale/wizard/sale_line_invoice.py +++ b/addons/sale/wizard/sale_line_invoice.py @@ -68,7 +68,7 @@ class sale_order_line_make_invoice(osv.osv_memory): 'account_id': a, 'partner_id': order.partner_invoice_id.id, 'invoice_line': [(6, 0, lines)], - 'currency_id' : order.pricelist_id.currency_id.id, + 'currency_id' : order.currency_id.id, 'comment': order.note, 'payment_term': pay_term, 'fiscal_position': order.fiscal_position.id or order.partner_id.property_account_position.id, diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 4cb00245ade..68446778323 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -141,7 +141,7 @@ class sale_advance_payment_inv(osv.osv_memory): 'account_id': sale.partner_id.property_account_receivable.id, 'partner_id': sale.partner_invoice_id.id, 'invoice_line': [(0, 0, inv_line_values)], - 'currency_id': sale.pricelist_id.currency_id.id, + 'currency_id': sale.currency_id.id, 'comment': '', 'payment_term': sale.payment_term.id, 'fiscal_position': sale.fiscal_position.id or sale.partner_id.property_account_position.id