This question has been flagged
    env = request.env(context=dict(request.env.context, show_address=True, no_tag_br=True))
env['res.partner'].sudo().create({'name': qcontext['student_name'], 'grade': qcontext['grade'],
            'school': school.id, 'parent_id': school.partner_id.id, 'lang': values['lang'],
                    'company_type': 'student'})
i am getting and integrity error when i run this command.I know that there is signup function for res_users
is there a similar function for the res_partner?
Error also contain bad query but the query created using the pdb is given below
INSERT INTO "res_partner" ("id", "notify_email", "color", "company_type", "use_parent_address", "active", "supplier", "tz", "opt_out", "parent_id", "company_id", "grade", "type", "is_company", "lang", "employee", "uniqueid", "customer", "school", "name", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('res_partner_id_seq'), 'always', 0, 'student', false, true, false, NULL, false, 46, 1, '9', 'contact', false, 'en_US', false, '/', true, 4, 'Sam', 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
Avatar
Discard