Skip to Content
Menu
This question has been flagged

I'm trying to create a user with a specific pricelist using python and the odoo 13 api.

The user gets correctly created but the pricelist set is the default one with id 1, i'm trying to set the one with id 3.

Here is my code:

user_id = models.execute_kw(db, uid, password,
                            'res.users', 'create',
                            [{'name':"age",
                              'login':'age@age.it',
                              'company_ids':[1],
                              'company_id':1,
                              'password':'age',
                              "in_group_28":False,
                              "in_group_40":False,
                              "in_group_43":False,
                              "in_group_42":False,
                              "in_group_19":False,
                              "in_group_29":False,
                              "in_group_30":False,
                              "in_group_16":False,
                              "in_group_17":False,
                              "in_group_18":True,
                              "in_group_22":False,
                              "in_group_36":False,
                              "in_group_47":False,
                              "in_group_46":False,
                              "in_group_41":False,
                              "in_group_39":False,
                              "in_group_35":True,
                              "in_group_31":False,
                              "in_group_15":False,
                              "in_group_32":False,
                              "in_group_37":False,
                              "in_group_20":False,
                              "in_group_21":True,
                              "in_group_38":False,
                              "in_group_44":False,
                              "in_group_45":True,
                              "in_group_26":False,
                              "in_group_14":False,
                              "in_group_24":True,
                              "in_group_25":False,
                              "sel_groups_2_3":False,
                              "sel_groups_11_12_13":11,
                              "sel_groups_33_34":33,
                              "sel_groups_23_27":23,
                              "sel_groups_1_8_9":1,
                              "in_group_7":True,
                              "in_group_4":False,
                              "in_group_5":False,
                              "in_group_6":True,
                              "in_group_10":False,
                              "property_product_pricelist":[3,"Minuto Vigente"]
                              }])
Avatar
Discard
Related Posts Replies Views Activity
0
Sep 24
3
0
Sep 24
348
1
Dec 24
831
1
Jun 24
667
0
Apr 24
247