跳至內容
選單
此問題已被標幟
3662 瀏覽次數
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' />

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
9月 21
9397
4
1月 20
3208
0
11月 18
4441
1
1月 25
1902
3
10月 22
5918