Odoo Help

1 Answer

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
Serpent Consulting Services Pvt. Ltd.
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. is an Official Odoo Partner, working on Odoo ever since 2007, experience of 11+ years and witnessed the growth of Odoo.

We are a team of 80+ experts on various verticals. Our portfolio of products can be seen at http://www.serpentcs.com and http://www.serpentcs.in

Our Expertise and Services:

  • Odoo Support

  • Odoo Development

  • Odoo Training

  • Odoo Migration

  • Odoo Implementation

  • Odoo Consulting

Our 290+ Apps on Appstore : https://apps.odoo.com/apps/modules/browse?author=Serpent Consulting Services Pvt. Ltd.


Serpent Consulting Services Pvt. Ltd.
10/20/15, 6:09 AM

Hello Jignesh,

At the end of the method add following code to add reference of product template in "product.supplierinfo".

destination_sock.execute(destination_db, 1, destination_password, 'product.supplierinfo', 'write', seller_list, {'product_tmpl_id': product['product_tmpl_id']})

Hope this will help you.


The type of field values to pass in "vals" for relationship fields is specific:

For a one2many field, a lits of tuples is expected.

Here is the list of tuple that are accepted, with the corresponding semantics:

  • (0, 0, { values }) link to a new record that needs to be created with the given values dictionary

  • (1, ID, { values }) update the linked record with id = ID (write *values* on it)

  • (2, ID) remove and delete the linked record with id = ID (calls unlink on ID, that will delete the object completely, and the link to it as well)


[(0, 0, {'field_name':field_value_record1, ...}), (0, 0, {'field_name':field_value_record2, ...})]



You are reading 'name' field only from product.supplierinfo table. You should either pass list of fields in read method or can pass blank "[]" which will read value of those particular fields or all the fields (in the case of blank list).

Like this:

source_user1 = source_sock.execute(source_db, source_userId, source_password, 'product.supplierinfo', 'read', seller, [])    
Jignesh Mehta
10/20/15, 6:34 AM

Hello SerpentTeam, I have update code and also update seller vals, but i am still facing error. updated vals :- seller_vals = { 'name' : source_user1['name'] or False, 'delay' : source_user1['delay'] or False, 'min_qty' : source_user1['min_qty'] or False, 'company_id' : company_id or False, } Error Log :- Traceback (most recent call last): File "product_migration.py", line 143, in 'delay' : source_user1['delay'] or False, KeyError: 'delay' delay field already in the "product.supplierinfo".

Serpent Consulting Services Pvt. Ltd., Serpent Consulting Services Pvt. Ltd.
10/20/15, 8:00 AM

You are only reading 'name' field from product.supplierinfo table as you are passing only ['name'] in the read method during rpc call. See my updated answer please.

Jignesh Mehta
10/20/15, 9:08 AM

Thank u so much @Serpent Consulting Services Pvt. Ltd.

Ask a Question
Keep Informed
2 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now