This question has been flagged
1 Reply
4909 Views

Hi , my name is Fausto Montepietra : i need to set a tag field in res.partner model using the odoo web service api (agents field in res.partner model extended by the sale_commissions addon).This is an example of the code that i'm using without success:

models.execute_kw(db, uid, password, 'res.partner', 'write', [[id], {
'agents': [agent_id]
}])

*agents is a many to many tag field

**i'm using odoo 10.0

can someone point me in the right direction?

Thanks

Avatar
Discard
Best Answer

From the offical docs

https://www.odoo.com/documentation/10.0/api_integration.html

"

while most value types are what would be expected (integer for Integer, string for Char or Text),

Date, Datetime and Binary fields use string values

One2many and Many2many use a special command protocol detailed in the documentation to the write method.

"

https://www.odoo.com/documentation/10.0/reference/orm.html#odoo.models.Model.write



Avatar
Discard