I cant access employee table ie hr_employee table fields from my new module. It shows error as "AttributeError: 'Field parent_id not found in browse_record(hr.employee, 6)' " Any one please help!!!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Based on the fact parent_id IS defined in hr.employee, there are 2 possibilities I can think of: the model being accessed is actually not hr.employee or the parent_id field has accidentally been removed either by other module or by someone. Check in the PostgreSQL database in table called hr_employee whether there is a column called parent_id. If there is, go to Settings >> Technical >> Database Structure >> Models, see if the Model hr.employee has parent_id listed as a field. If not, try to remedy it by updating hr module.
Thanks John. now if i login as admin i can access the table, but not for other users. Do you have any idea , what the issue is?
Which table is it? Anyways, it's a typical problem, caused by the lack of Access Control List. Settings >> Technical >> Security >> Access Control List. The model that represent that table should have a read access for a certain group or globally.
Hi John .. Thanks you. changing the code to resource_id = self.pool.get('resource.resource').search(cr, uid, [('user_id','=', uid)][0] Emp_id = self.pool.get('hr.employee').search(cr, uid, [('resource_id','=', resource_id)][0] corrected my issue.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 8 25
|
3648 | ||
|
1
thg 10 24
|
3341 | ||
Employee Bank Account Number
Đã xử lý
|
|
2
thg 7 24
|
2214 | |
|
0
thg 5 23
|
2424 | ||
how to create employee as an user
Đã xử lý
|
|
9
thg 12 23
|
33469 |