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

 I installed a bespoke module in my Odoo V11who works perfectly with empty database. Then I import database of my old Odoo 8 with csv files.

But after it is like Odoo don't find the new models and the fields I add.

For exemple I add app_product_key in the model res_partner:


But when I tried to acces my database with xml-rpc with this field as identification I get:

2018-07-26 10:15:51,679 22263 ERROR probespoke odoo.http: Invalid field 'app_product_key' in leaf "<osv.ExtendedLeaf: ('app_product_key', '=', 'fonapp2016') on res_partner (ctx: )>"
Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/http.py", line 118, in dispatch_rpc
    result = dispatch(method, params)
  File "/opt/odoo/odoo/odoo/service/model.py", line 39, in dispatch
    res = fn(db, uid, *params)
  File "/opt/odoo/odoo/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/service/model.py", line 160, in execute
    res = execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/odoo/odoo/odoo/service/model.py", line 149, in execute_cr
    return odoo.api.call_kw(recs, method, args, kw)
  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/odoo/models.py", line 1480, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/opt/odoo/odoo/odoo/addons/base/res/res_partner.py", line 639, in _search
    count=count, access_rights_uid=access_rights_uid)
  File "/opt/odoo/odoo/odoo/models.py", line 3769, in _search
    query = self._where_calc(args)
  File "/opt/odoo/odoo/odoo/models.py", line 3564, in _where_calc
    e = expression.expression(domain, self)
  File "/opt/odoo/odoo/odoo/osv/expression.py", line 668, in __init__
    self.parse()
  File "/opt/odoo/odoo/odoo/osv/expression.py", line 846, in parse
    raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'app_product_key' in leaf "<osv.ExtendedLeaf: ('app_product_key', '=', 'fonapp2016') on res_partner (ctx: )>"

And I got same error for other fields I add in other module.

Why Odoo consider this fields has no-existent?


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

Is your module succesfully installed and found on the system? Can you update the module from the apps list?

Tác giả Câu trả lời hay nhất

I dump the database and restart from scratch, this error dissapear!

(how can I close this issue?)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 23
2527
1
thg 7 22
7290
3
thg 2 21
17454
7
thg 8 19
9232
5
thg 5 19
3261