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'>
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up