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
- Účetnictví
- Sklad
- PoS
- Project
- MRP
This question has been flagged
6694
Zobrazení
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit seRelated Posts | Odpovědi | Zobrazení | Aktivita | |
---|---|---|---|---|
|
0
říj 18
|
2814 | ||
|
2
pro 16
|
4827 | ||
|
2
srp 16
|
4284 | ||
|
0
bře 15
|
5284 | ||
|
0
čvn 20
|
2527 |