Odoo Aide

0

0
1 Réponse
3
Avatar

Thayif kabir Inde

--Thayif kabir--

9225
| 6 3 9
Calicut, Inde
--Thayif kabir--


Thayif kabir Inde
19/07/2019 07:18

Hi,

Try using this code to convert currency

amount_convert = company_currency.with_context(date=self.date).compute(amount, convert_currency)

By default odoo currency conversion during payments refer this link

To setup  multi currencies and conversion rate check this link

There is similar question check this

4 Commentaires
Usman Pakistan
19/07/2019 11:29

for sr_line in self.ssr_line:

convert_currency = self.vendor.property_purchase_currency_id.id or self.env.user.company_id.currency_id.id

amount_convert = company_currency.with_context(date=self.date).compute(sr_line.vendor_price, convert_currency)

Thayif kabir Inde
19/07/2019 23:46

company currency is current company currency_id and convert currency is currency_id to which you want to convert

Usman Pakistan
20/07/2019 08:58

i use

currency.with_context(dict(self._context or {}, date=fields.datetime.today())).rate

for my requirement can you pls update your answer i will acpt your answer

Thayif kabir Inde
21/07/2019 11:16

Sorry I don't get it . Did you need the exact answer for your requirement.

Poser une question
Writer
5118
Usman
Keep Informed
1 Abonné(e)s
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