Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3626 Lượt xem
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")

   in hr.xml file i have this field<field name ='hr_wage' />

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 21
9384
4
thg 1 20
3191
0
thg 11 18
4416
1
thg 1 25
1854
3
thg 10 22
5885