Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
5315 Tampilan

Upon installing the stock module from GUI or CLI, I'm getting this output. Ideas?


```

2017-09-07 15:01:02,705 11705 INFO server openerp.sql_db: bad query: ALTER TABLE "procurement_rule" ADD FOREIGN KEY ("route_id") REFERENCES "stock_location_route" ON DELETE set null 2017-09-07 15:01:02,\705 11705 ERROR server openerp.modules.registry: Failed to load registry Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 386, in new

    openerp.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 340, in load_modules

    loaded_modules, update_module)

  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 239, in load_marked_modules

    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)

  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 137, in load_module_graph

    init_module_models(cr, package.name, models)

  File "/usr/lib/python2.7/dist-packages/openerp/modules/module.py", line 307, in init_module_models

    obj._auto_end(cr, {'module': module_name})

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

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

  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 2720, in _auto_end

    cr.execute('ALTER TABLE "%s" ADD FOREIGN KEY ("%s") REFERENCES "%s" ON DELETE %s' % (t, k, r, d))

  File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 154, in wrapper

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

  File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 233, in execute

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

IntegrityError: insert or update on table "procurement_rule" violates foreign key constraint "procurement_rule_route_id_fkey"

DETAIL: Key (route_id)=(3) is not present in table "stock_location_route".

```

Avatar
Buang

Would you mind to let us know what you exactly did in order to get to this situation?

Penulis

Sure....nothing too out of the ordinary. Went to install Inventory Management (stock) module in the Apps tab. Clicked Install. Got a non-descript error on screen, while log output was the error seen above.

Jawaban Terbai

Hello Have you tried the process in a new database?

If the same problem occurs, switch the module file

Avatar
Buang
Penulis

Pretty sure it's just that database. I installed the module in an identical Odoo install as a test without an issue.

Post Terkait Replies Tampilan Aktivitas
2
Des 18
11663
1
Mar 17
6082
1
Des 23
4236
0
Agu 20
2747
5
Nov 17
8751