Hello,
I have created a boolean filed in Res.company and I want to use the same filed of hr.employee.
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I have created a boolean filed in Res.company and I want to use the same filed of hr.employee.
Thanks
Hello el mehdi,
First You can add field in res.company using _inherit
You can inherit the hr.employee model and add boolean field which is related to company.
Ex:-
class Company(models.Model):
_inherit = 'res.company'
boolean_field_com = fields.Boolean('Boolean String Company')
class Employees(models.Model):
_inherit = 'hr.employee'
boolean_field_emp = fields.Boolean('Boolean String Employee', related='company_id.boolean_field_com')
Hope it works for you.
Thanks,
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
How to add "vat" field to Sales Order Model?
Diselesaikan
|
1
Jun 18
|
4502 | ||
|
1
Okt 23
|
2369 | |||
|
can we relate a field to a related field ?
Diselesaikan
|
1
Mar 15
|
4182 | ||
|
3
Mei 25
|
3320 | |||
|
1
Apr 25
|
2385 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Hello Mehta,
Thanks for the answer.
I try your code
i only have another boolean filed, the fields are not related.Thanks