Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
5338 Vues

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
Ignorer

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

Auteur

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.

Meilleure réponse

Hello Have you tried the process in a new database?

If the same problem occurs, switch the module file

Avatar
Ignorer
Auteur

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

Publications associées Réponses Vues Activité
2
déc. 18
11706
1
mars 17
6128
1
déc. 23
4280
0
août 20
2809
5
nov. 17
8785