Skip to Content
Menu
This question has been flagged
2 Replies
6303 Views

Fresh install of Odoo server 11, trought Github method.

I like invite some users.


Get first problem.


https://dropbox.tamainut.net/owncloud/s/fBslBcaX4FWK8yj

Avatar
Discard
Author

2018-07-03 06:32:57,126 29751 INFO ws_odoo odoo.modules.loading: 33 modules loaded in 0.07s, 0 queries

2018-07-03 06:32:57,359 29751 INFO ws_odoo odoo.modules.loading: Modules loaded.

2018-07-03 06:32:57,361 29751 DEBUG ws_odoo odoo.modules.registry: Multiprocess signaling check: [Registry - 7 -> 7] [Cache - 181 -> 181]

2018-07-03 06:32:57,362 29751 INFO ws_odoo odoo.addons.base.ir.ir_http: Generating routing map

2018-07-03 06:32:57,395 29751 DEBUG ws_odoo odoo.api: call res.users().web_dashboard_create_users(['foulki@protonmail.com'])

2018-07-03 06:32:57,478 29751 ERROR ws_odoo odoo.sql_db: bad query: b'INSERT INTO "res_partner" ("id", "lang", "partner_share", "color", "email", "type", "is_company", "supplier", "employee", "company_id", "customer", "active", "opt_out", "tz", "name", "message_bounce", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval(\'res_partner_id_seq\'), \'es_ES\', false, 0, \'foulki@protonmail.com\', \'contact\', false, false, false, 1, true, true, false, NULL, \'foulki\', 0, 1, 1, (now() at time zone \'UTC\'), (now() at time zone \'UTC\')) RETURNING id'

ERROR: null value in column "invoice_warn" violates not-null constraint

DETAIL: Failing row contains (72, foulki, 1, null, null, null, null, null, es_ES, null, null, null, null, null, null, null, t, t, f, f, null, contact, null, null, null, null, null, null, foulki@protonmail.com, null, null, f, null, 0, f, null, null, null, null, 1, 2018-07-03 06:32:57.39597, 1, 2018-07-03 06:32:57.39597, null, null, 0, f, null, null, null, null, null, null, null, null, null).

2018-07-03 06:32:57,479 29751 DEBUG ws_odoo odoo.service.model: IntegrityError

Traceback (most recent call last):

File "/opt/odoo/odoo/odoo/service/model.py", line 97, in wrapper

return f(dbname, *args, **kwargs)

File "/opt/odoo/odoo/odoo/http.py", line 335, in checked_call

result = self.endpoint(*a, **kw)

File "/opt/odoo/odoo/odoo/http.py", line 936, in __call__

return self.method(*args, **kw)

File "/opt/odoo/odoo/odoo/http.py", line 515, in response_wrap

response = f(*args, **kw)

File "/opt/odoo/odoo/addons/web/controllers/main.py", line 931, in call_kw

return self._call_kw(model, method, args, kwargs)

File "/opt/odoo/odoo/addons/web/controllers/main.py", line 923, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/opt/odoo/odoo/odoo/api.py", line 687, in call_kw

return call_kw_model(method, model, args, kwargs)

File "/opt/odoo/odoo/odoo/api.py", line 672, in call_kw_model

result = method(recs, *args, **kwargs)

File "/opt/odoo/odoo/addons/web_settings_dashboard/models/res_users.py", line 23, in web_dashboard_create_users

user = self.with_context(signup_valid=True).create(default_values)

File "/opt/odoo/odoo/addons/sales_team/models/res_users.py", line 17, in create

user = super(ResUsers, self).create(vals)

File "/opt/odoo/odoo/addons/auth_signup/models/res_users.py", line 144, in create

user = super(ResUsers, self).create(values)

File "/opt/odoo/odoo/addons/mail/models/res_users.py", line 57, in create

user = super(Users, self).create(values)

File "/opt/odoo/odoo/odoo/addons/base/res/res_users.py", line 850, in create

user = super(UsersView, self).create(values)

File "/opt/odoo/odoo/odoo/addons/base/res/res_users.py", line 687, in create

return super(UsersImplied, self).create(values)

File "/opt/odoo/odoo/odoo/addons/base/res/res_users.py", line 335, in create

user = super(Users, self).create(vals)

File "/opt/odoo/odoo/odoo/models.py", line 3373, in create

record = self.browse(self._create(old_vals))

File "/opt/odoo/odoo/odoo/models.py", line 3430, in _create

parent_id = self.env[parent_model].create(parent_vals).id

File "/opt/odoo/odoo/odoo/addons/base/res/res_partner.py", line 534, in create

partner = super(Partner, self).create(vals)

File "/opt/odoo/odoo/addons/mail/models/mail_thread.py", line 236, in create

thread = super(MailThread, self).create(values)

File "/opt/odoo/odoo/odoo/models.py", line 3373, in create

record = self.browse(self._create(old_vals))

File "/opt/odoo/odoo/odoo/models.py", line 3466, in _create

cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))

File "/opt/odoo/odoo/odoo/sql_db.py", line 155, in wrapper

return f(self, *args, **kwargs)

File "/opt/odoo/odoo/odoo/sql_db.py", line 232, in execute

res = self._obj.execute(query, params)

psycopg2.IntegrityError: null value in column "invoice_warn" violates not-null constraint

DETAIL: Failing row contains (72, foulki, 1, null, null, null, null, null, es_ES, null, null, null, null, null, null, null, t, t, f, f, null, contact, null, null, null, null, null, null, foulki@protonmail.com, null, null, f, null, 0, f, null, null, null, null, 1, 2018-07-03 06:32:57.39597, 1, 2018-07-03 06:32:57.39597, null, null, 0, f, null, null, null, null, null, null, null, null, null).

2018-07-03 06:32:57,483 29751 INFO ws_odoo werkzeug: 79.150.116.102 - - [03/Jul/2018 06:32:57] "POST /web/dataset/call_kw/res.users/web_dashboard_create_users HTTP/1.1" 200 -

2018-07-03 06:32:57,522 29751 DEBUG ws_odoo odoo.modules.registry: Multiprocess signaling check: [Registry - 7 -> 7] [Cache - 181 -> 181]

2018-07-03 06:32:57,530 29751 INFO ? odoo.addons.bus.models.bus: Bus.loop listen imbus on db postgres

Best Answer

Hi Abdelkarim,
'psycopg2.IntegrityError: null value in column "invoice_warn" violates not-null constraint'

This means you have already at least a record in the res.partner table in the database where the field invoice_warn is empty, and in the database it has a condition that it should be not empty.

Solution:

Query the database to get the record where this field is empty.

- Update the records and fill the field by directly querying the database.

Or

- If you do not care about the records, delete them.

Or remove the requirement on the field if you can accept it to be empty.

Avatar
Discard
Related Posts Replies Views Activity
1
Feb 24
24
4
Sep 15
4390
0
Nov 24
149
3
Nov 24
543
2
Aug 23
1672