Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3656 Visualizações
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' />

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
3
set. 21
9390
4
jan. 20
3201
0
nov. 18
4433
1
jan. 25
1885
3
out. 22
5904