تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1473 أدوات العرض

Hello,


I added a new model Sector

And on this model Sector and the model hr.employee, i added 2 Many2many fields with a model_relation table : sector_employee_rel

How can i add field in this model sector_employee_rel

I tried to inherit this table mut i've got an error : 

TypeError: Model 'sector_employee_rel' does not exist in registry.

Is there something special to do for inheriting model_relation ?

الصورة الرمزية
إهمال
أفضل إجابة

may be because of redundancy in depends [ ], section of __manifest__.py

EDIT: i can't share a link here ...  please add the module which contains model_relation table  model. the same problem resolved when i did it and here i found a link of Answered post but i am not allowed to include links.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Hi G.Ahmed,

Why a redundancy, there is only one manifest for all my models in my custom module ?

الصورة الرمزية
إهمال