how to create a record using XMLRPC and assigned id without it auto-incrementing?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
1837
Views
# db1_leads = models_1.execute_kw(db1, uid_db1, password1, 'product.uom.categ', 'search_read', [[]], {'fields': [
# 'name',
# ]})
# total_count=0
# for leads in db1_leads:
# total_count +=1
# print("LEADS :",leads)
# search_category_id = models_2.execute_kw(db2, uid_db2, password2, 'uom.category', 'search', [[['name', '=', leads['name']]]])
# if search_category_id:
# for categ_id in search_category_id:
# a = models_2.execute_kw(db2, uid_db2, password2, 'uom.category', 'write', [categ_id, {
# 'old_category_id': leads['id'],
# }])
# else:
# new_lead = models_2.execute_kw(db2, uid_db2, password2, 'uom.category', 'create', [{
# 'name' : leads['name'],
# 'old_category_id' : leads['id'],
# }])
# print("PHYTEC UOM CATEGORY Total Count :",total_count)
I think above code will help you, or
check this link :
https://www.odoo.com/documentation/13.0/webservices/odoo.html
I think above code will help you, or
check this link :
https://www.odoo.com/documentation/13.0/webservices/odoo.html
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up