Bharat Devnani (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-812261-bde into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #812261 in OpenERP Addons: "Product_onchange apply wrong the currency 
rate on price : always consider latest date."
  https://bugs.launchpad.net/openobject-addons/+bug/812261

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-812261-bde/+merge/74744

Hello Sir, 

I have applied the patch given by Salvi, with little modifications, now its 
working as expected.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-812261-bde/+merge/74744
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-812261-bde.
=== modified file 'account/invoice.py'
--- account/invoice.py	2011-08-22 11:47:14 +0000
+++ account/invoice.py	2011-09-09 09:44:50 +0000
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+    # -*- coding: utf-8 -*-
 ##############################################################################
 #
 #    OpenERP, Open Source Management Solution
@@ -861,9 +861,14 @@
                 res_amount_currency = total_currency
                 i = 0
                 for t in totlines:
+                    ctx = context.copy()
+                    ctx.update({'date':inv.date_invoice})
                     if inv.currency_id.id != company_currency:
-                        amount_currency = cur_obj.compute(cr, uid,
-                                company_currency, inv.currency_id.id, t[1])
+<<<<<<< TREE
+                        amount_currency = cur_obj.compute(cr, uid, company_currency, inv.currency_id.id, t[1], context=ctx)
+=======
+                                company_currency, inv.currency_id.id, t[1], context=ctx)
+>>>>>>> MERGE-SOURCE
                     else:
                         amount_currency = False
 
@@ -1242,6 +1247,8 @@
 
 class account_invoice_line(osv.osv):
     def _amount_line(self, cr, uid, ids, prop, unknow_none, unknow_dict):
+
+        account_inv_obj = self.pool.get('account.invoice').browse(cr, uid, ids)[0]
         res = {}
         tax_obj = self.pool.get('account.tax')
         cur_obj = self.pool.get('res.currency')

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to