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

I'm having this error while trying to update some modules

File "/opt/odoo/v10/OCB/odoo/fields.py", line 544, in _setup_related_full
    field = target._fields[name]
KeyError: 'partner'

I searched about this error, it seems it's something with a related field.

Since i can't debug in production server, i tried to reproduce it on local development machine, but everything works fine.

I'm really lost at this point, tried to reset last git pulls, but problem persists.

Searched for 'partner' related fields in all my custom modules, but found nothing.

How can i track without debugging where the problem come from?

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

make sure that there is no modules which is not in these following state Installed. not Uninstallable, Not installed

Tác giả

Thanks for the reply, but this does not work for me, there are no modules out of the installable/uninstalable, and i can install some modules without any problem son there is no module pending that could be breaking the installation

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

Hi

I do have the same problem with an integer field. Has anyone found a soulution?
Thanks for sharing it with me.


Update on May 2nd: I found a solution working for me: I had to

  • delete the database I was working on,

  •  delete the folder of my module and reupload it,

  •  create a new database


It's not the best solutions if you have a lot of data in your DB or a lot of modules installed as you have to reinstall them all. For my test-server it worked perfectly fine.

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

What is the issue u face ? It will be nice if you can show the code that u have added

There were so many changes in the code since the last version I uploaded on the server… But the error only occurs in one model.

I renamed and integer-field from 'workload' to 'base_workload' and adapted the views (form and tree view). Now when I try to install the model, it sais "field 'base_workload' does not exist". When I remove those fields from the view it sais the same about another field and so on.

Also I just realized that the pre-installed Project-model does not work anymore as well.

There is an uninstallable app (Project_forecast), might this cause the issue?

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

Hi,

   Make sure you have no such fields named 'partner' in your custom modules and  also check the dependencies .This issue is shown when odoo cannot find a field.      

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

Why i must add that field and for what reason and where? I have about 20 custom modules, and have no problem with any of them in local development instance, which currently is a copy of the production server, there are non unmeet dependencies, and there only 1 partner field added in hr_employee, and is working fine.

Hi Reinhart,

Did you add a many2one field in hr_employee?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 18
9463
1
thg 10 21
3665
1
thg 10 18
15245
0
thg 1 17
8103
1
thg 10 15
4307