dbv10_product_category = model_1.execute_kw (db_odoo10 , odoo_10 , password_db_odoo10 ,
' product.category ' , 'search_read' , [[]] , { 'fields' : [ 'id' , 'name' ]}) dbv10_product_template_modèle_1.execbute_kw , odoo_10 , password_db_odoo10 , ' product.template ' , 'search_read' , [[]] , { 'fields' : [ 'id' , 'name' , 'type' ,'Liste des prix'
,
'Standard_price' , 'categ_id' ]}) TOTAL_COUNT = 0 pour le produit en dbv10_product_template: pour categ en dbv10_product_category: print ( 'produits ..' , produit) TOTAL_COUNT + = 1 new_users = model_2.execute_kw (db_odoo13 , odoo_13 , password_db_odoo13 , 'product.template' , 'create' , [{ 'name' : product [ 'name' ] , 'type' :produit [ 'type'
] ,
'list_price' : product [ 'list_price' ] , 'standard_price' : product [ 'standard_price' ] , 'categ_id' : categ [ 'id' ] }]) print ( 'Total created ...' , total_count)
when i run this snippet, i have duplicata of product.
comment puis-je résoudre ce problème?
Please share correct code format, and write question what you want ?
TOTAL_COUNT + = 1 new_users = model_2.execute_kw (db_odoo13 , odoo_13 , password_db_odoo13 , 'product.template' , 'create'
As per this line you are creating a new product.