Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Expect singleton: res.currency

Avatar
odoo
1 Comment
Avatar
Discard
Avatar
odoo
-

In the qweb I am commanding to call the field in this way: 



2 Answers
0
Avatar
odoo
Best Answer

Hi,

First of all you have to correct the data type of the field amount_response, is it expected to hold integer or a string ? As per written function it has to be string, so field type should be Char or Text. Then modify the function as follows and see:

def _amount_response(self):
for rec in self:
amount_response = ''
if rec.currency_id:
amount_response = str(rec.currency_id.amount_to_text(rec.amount_total))
rec.amount_response = amount_response

Thanks

Avatar
Discard
0
Avatar
odoo
Best Answer

You are getting multiple currency in currency_id instead of one currency.


Avatar
Discard