Hello guys,
It's impossible to update neither my stock module nor all module (of course). Always get an error.
I would say that updating sotck module delete my custom locations. But one of them is used two or three times in purchase orders. So stock module can't finish his update...
Why does stock module try to delete locations?
I believe I should create my locations in a custom module with XML...
I really need your comments here... 2 days on this error...
Here is the log.
2015-03-14 22:01:45,674 15536 WARNING 03test openerp.addons.base.ir.ir_translation: module stock_invoice_directly: no translation for language fr_CA
2015-03-14 22:01:45,747 15536 INFO 03test openerp.modules.loading: 122 modules loaded in 40.68s, 0 queries
2015-03-14 22:01:46,676 15536 INFO 03test openerp.addons.base.ir.ir_model: Deleting 40@stock.location
2015-03-14 22:01:46,682 15536 ERROR 03test openerp.sql_db: bad query: delete from stock_location where id IN (40)
Traceback (most recent call last):
File "/home/odoo-test/odoo-test/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
IntegrityError: null value in column "location_id" violates not-null constraint
DETAIL: Failing row contains (74, null, 2015-02-11 13:50:17.595482, 1, 5, 2015-01-07 05:00:00, null, null, 8, 43, 4.86, 1, 1112, 2015-02-12 13:50:06, 3, 0.00, done, null, 2, null, 1, null, null, 2015-02-12 13:50:06.545753, null, 2015-02-11, 4.86, 2015-DP000020, null, order, t, 8, 2015-01-08, 40).
CONTEXT: SQL statement "UPDATE ONLY "public"."purchase_order" SET "location_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "location_id""
2015-03-14 22:01:46,685 15536 INFO 03test openerp.modules.loading: loading 1 modules...
2015-03-14 22:01:46,797 15536 INFO 03test openerp.modules.loading: 1 modules loaded in 0.11s, 0 queries
2015-03-14 22:01:46,838 15536 INFO 03test openerp.modules.loading: loading 122 modules...
2015-03-14 22:01:48,595 15536 INFO 03test openerp.modules.loading: 122 modules loaded in 1.76s, 0 queries
2015-03-14 22:01:49,098 15536 INFO 03test openerp.modules.loading: Modules loaded.
2015-03-14 22:01:49,100 15536 ERROR 03test openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/home/odoo-test/odoo-test/openerp/http.py", line 525, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo-test/odoo-test/openerp/http.py", line 562, in dispatch
result = self._call_function(**self.params)
File "/home/odoo-test/odoo-test/openerp/http.py", line 302, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo-test/odoo-test/openerp/service/model.py", line 149, in wrapper
raise openerp.osv.orm.except_orm(_('Integrity Error'), msg)
except_orm: ('Integrity Error', 'The operation cannot be completed, probably due to the following:\n- deletion: you may be trying to delete a record while other records still reference it\n- creation/update: a mandatory field is not correctly set\n\n[object with reference: Purchase Order - purchase.order]')
2015-03-14 22:01:49,101 15536 INFO 03test werkzeug: 192.168.1.1 - - [14/Mar/2015 22:01:49] "POST /web/dataset/call_button HTTP/1.1" 200 -
2015-03-14 22:01:49,102 15536 INFO 03test werkzeug: 192.168.1.1 - - [14/Mar/2015 22:01:49] "POST /longpolling/poll HTTP/1.1" 200 -
2015-03-14 22:01:49,103 15536 INFO 03test werkzeug: 192.168.1.1 - - [14/Mar/2015 22:01:49] "POST /longpolling/poll HTTP/1.1" 200 -
2015-03-14 22:01:49,118 15536 INFO 03test openerp.addons.base.ir.ir_http: Generating routing map
...
Thanks all!!!!
UPDATE #1
- I see that stock module import the defaults location with the file /home/odoo-test/odoo-test/addons/stock/stock_data.xml;
UPDATE #2
- Error is not the same if I use -u stock in terminal.
-
2015-03-15 00:15:56,172 9152 INFO 03test openerp.modules.loading: 122 modules loaded in 40.14s, 0 queries
2015-03-15 00:15:57,087 9152 INFO 03test openerp.addons.base.ir.ir_model: Deleting 40@stock.location
2015-03-15 00:15:57,093 9152 CRITICAL 03test openerp.service.server: Failed to initialize database `03test`.
Traceback (most recent call last):
File "/home/odoo-test/odoo-test/openerp/service/server.py", line 909, in preload_registries
registry = RegistryManager.new(dbname, update_module=update_module)
File "/home/odoo-test/odoo-test/openerp/modules/registry.py", line 346, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo-test/odoo-test/openerp/modules/loading.py", line 390, in load_modules
registry['ir.model.data']._process_end(cr, SUPERUSER_ID, processed_modules)
File "/home/odoo-test/odoo-test/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo-test/odoo-test/openerp/addons/base/ir/ir_model.py", line 1244, in _process_end
self.pool[model].unlink(cr, uid, [res_id])
File "/home/odoo-test/odoo-test/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo-test/odoo-test/openerp/models.py", line 3551, in unlink
'where id IN %s', (sub_ids,))
File "/home/odoo-test/odoo-test/openerp/sql_db.py", line 158, in wrapper
return f(self, *args, **kwargs)
File "/home/odoo-test/odoo-test/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
IntegrityError: null value in column "location_id" violates not-null constraint
DETAIL: Failing row contains (74, null, 2015-02-11 13:50:17.595482, 1, 5, 2015-01-07 05:00:00, null, null, 8, 43, 4.86, 1, 1112, 2015-02-12 13:50:06, 3, 0.00, done, null, 2, null, 1, null, null, 2015-02-12 13:50:06.545753, null, 2015-02-11, 4.86, 2015-DP000020, null, order, t, 8, 2015-01-08, 40).
CONTEXT: SQL statement "UPDATE ONLY "public"."purchase_order" SET "location_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "location_id""