Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
5322 Lượt xem

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".

```

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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.

Câu trả lời hay nhất

Hello Have you tried the process in a new database?

If the same problem occurs, switch the module file

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 18
11666
1
thg 3 17
6090
1
thg 12 23
4242
0
thg 8 20
2755
5
thg 11 17
8759