Skip to Content
Menu
This question has been flagged
1 Reply
5128 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
Related Posts Replies Views Activity
1
Dec 23
1237
2
Oct 23
3953
0
Sep 23
1859
3
Sep 23
1001
0
May 23
1445