Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am trying to loop through a database and retrieve the currency conversion rate. I have been trying to figure it out on my own and looking through documentation and sample code, but to no avail. The primary problem is with the search function. I can't figure out what I can do to make it work properly.
Here is the code:
id = self.supplier_name.currency.id
curr_rec = self.env['res.currency.rate'].search([id,'=', 'currency_id'])
for rec in curr_rec:
if curr_rec == 'res.currency.rate.currency_id':
self.price_EUR = self.price * self.supplier_name.currency.rate
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/23/15, 9:07 AM|
|Seen: 589 times|
|Last updated: 12/23/15, 2:00 PM|