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 belowINSERT 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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
6660
Views
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Oct 18
|
2807 | ||
|
2
Dec 16
|
4810 | ||
|
2
Aug 16
|
4272 | ||
|
0
Mar 15
|
5274 | ||
|
0
Jun 20
|
2515 |