class Employee(models.Model):
_name = "hr.employee"
_description = "Employee"
_order = 'name_related'
_inherits = {'resource.resource': "resource_id"}
_inherit = ['mail.thread', 'hr.contract']
rel_field = fields.Many2one('hr.contract')
hr_wage = fields.Char(string='wage', related='rel_field.wage')class Contract(models.Model):
_name = 'hr.contract'
_description = 'Contract'
_inherit = ['mail.thread', 'ir.needaction_mixin']wage = fields.Float('Wage', digits=(16, 2), required=True, help="Basic Salary of the employee")
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
3
الردود
11445
أدوات العرض
Hi,
check you have hr module as dependency in your __manifest__.py
....
'depends': [
'hr',
],
....
Best regards
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
2
أبريل 23
|
6129 | ||
|
1
مايو 16
|
9031 | ||
|
0
مايو 16
|
3192 | ||
|
1
أبريل 16
|
9411 | ||
|
1
يناير 24
|
2214 |
i have added hr_contract in __init__.py file too
import hr
import mail_alias
import mail_thread
import res_partner
import res_users
import hr_contract
<field name ='hr_wage' />