Hi there
How do I add context to a write or create method via the XML RPC webservice
for example I would like to add:
{'context': [['lang', 'nl_BE']]}
Is there a way to do this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi there
How do I add context to a write or create method via the XML RPC webservice
for example I would like to add:
{'context': [['lang', 'nl_BE']]}
Is there a way to do this?
Hi,
Try this,
api.execute_kw(db, uid, pwd, 'res.country', 'write', [[]], {'fields': ['id', 'name'], 'context' :{'lang': 'nl_BE'})
Regards
Hi there. Thanks for your answer
but it doesn't work.
This works:
models.execute_kw(self.dbName, self.uid, self.dbPassword, 'res.country', 'write', [[45],{'name':'Cook eilanden'}])
But this doesn't work:
self.models.execute_kw(self.dbName, self.uid, self.dbPassword, 'res.country', 'write', [[45],{'name':'Cook eilanden'}], {'fields': ['id', 'name'], 'context' :{'lang': 'nl_BE'}})
= method(recs, *args, **kwargs)\nTypeError: Country.write() got an unexpected keyword argument \'fields\'\n'>
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.