跳至內容
選單
此問題已被標幟
1 回覆
2996 瀏覽次數

I have this field in module hat_employee

bank_branch_id = fields.Many2one('bank.branch', "Bank Branch")

Note: bank.branch exists inside another custom module named lib_payroll
this error occurs:

AttributeError: '_unknown' object has no attribute 'id'

So i solved this error by adding lib_payroll in depends of manifest file , but another error occurs these modules make error when i uninstall and it appears as it doesn't exist 

Note: lib_payroll depends on hat_employee too
probably recursion dependencies makes this error, So how can solve this problem? is there any way to solve unknown  related model without adding module in depends? 

頭像
捨棄
最佳答案

Hi,

You cannot cyclic dependency for the modules in Odoo. Suppose if we have two modules,lets say module A and module B, both the modules cannot depend on each other, ie A cannot depend on B and B cannot depend on A, the dependency should be one way, ie either from a depends on b or b depends on b.


So here, you have to go through the written code and resolve the dependency issue and establish a proper dependency between the modules.

Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 23
2621
1
2月 23
3658
1
5月 25
2463
1
4月 25
3487
1
4月 25
4318