Hi, with a custom module, I synchronize a lot of products but I would like that their route Make to Order is set on True by default.
How can I do this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi, with a custom module, I synchronize a lot of products but I would like that their route Make to Order is set on True by default.
How can I do this?
Have to to do this sample code then create the product template :
mto_ids = product_routes.search(['|', ('name', '=', 'Make To Order'), ('name', '=', 'Buy')])
route = []
for d in mto_ids:
route.append(d.id)
tmpl_id = product_tempalte.create({'valuation':'manual_periodic', 'name':champ[3], 'standard_price':champ[5], 'description':champ[3],
'route_ids':[(6, 0, route)], 'type':'product'})
How to use the above code, i mean in which file.
i am bit new here
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
4
лют. 19
|
13542 | ||
|
3
лист. 21
|
7869 | ||
|
1
лип. 17
|
7741 | ||
|
1
трав. 25
|
1373 | ||
|
2
січ. 23
|
2954 |