[IMP] change currency for diffrent invoice methods

bzr revid: rma@tinyerp.com-20130523122045-zy0nf24nkbepymd8
This commit is contained in:
Randhir Mayatra (OpenERP) 2013-05-23 17:50:45 +05:30
parent c96dc3303f
commit dc36531d7c
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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,

View File

@ -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