Odoo Help

0
1 Answer
0
sdbs_ml
10/7/16, 2:32 AM

(I had to try to write this in pieces (with editing the answer), because the first time I tried to post an answer, it simply got lost in the system - didn't even get a warning message - and I wasted my time)

OK, I think I got somewhere; first of all, I inspected the database with the `pgAdmin III` tool, and could see that `res_partner_check_name` is indeed a constraint in the `res_partner` database:

Then, I noticed on the server, in the log file `/var/log/postgresql/postgresql-9.3-main.log`:

2016-10-06 17:35:47 CEST STATEMENT:  INSERT INTO "res_partner" ("id", "notify_email", "color", "company_type", "use_parent_address", "active", "supplier", "tz", "opt_out", "company_id", "parent_id", "type", "is_company", "lang", "employee", "customer", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('res_partner_id_seq'), 'always', 0, 'person', false, true, false, 'Europe/Copenhagen', false, 1, 4640, 'contact', false, 'da_DK', false, true, 32, 32, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
2016-10-06 17:35:54 CEST ERROR: new row for relation "res_partner" violates check constraint "res_partner_check_name"
2016-10-06 17:35:54 CEST DETAIL: Failing row contains (4689, null, 1, null, null, 2016-10-06 15:35:02.084982, 0, person, null, null, null, null, null, null, null, 4688, f, null, null, f, Europe/Copenhagen, null, t, null, null, null, f, null, 2016-10-06 15:35:02.084982, t, null, 32, da_DK, 32, null, null, contact, f, null, null, null, null, always, null, f, null, null, null, null, null, null).

So indeed, there is no name inserted here...

Ultimately, this is what the problem was - in my Vendors .csv, I had a field that was a bank account; I had tried to map this to a relational field "Contacts / Banks / Account Number", and it was this causing the validation errors - apparently this mapping triggered somehow the row insertion noted above. As soon as I set the mapping of this field to "Don't import", validation passed without the above errors - and I could import my Vendors data.

Ask a Question
Writer
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now