@@ -5,15 +5,14 @@ class HrPayrollStructure(models.Model):
|
||||
_inherit = 'hr.payroll.structure'
|
||||
_order = 'sequence asc'
|
||||
|
||||
lv_id = fields.Many2one('hr.payroll.structure.type', string="级别")
|
||||
lv_name = fields.Char(related='lv_id.name', string='级别名称', store=True)
|
||||
type_id = fields.Many2one('hr.payroll.structure.type', string="级别")
|
||||
lv_name = fields.Char(related='type_id.name', string='级别名称', store=True)
|
||||
name = fields.Char(string="职级名称")
|
||||
sequence = fields.Char(related='lv_id.sequence', string='级别序号', store=True)
|
||||
sequence = fields.Char(related='type_id.sequence', string='级别序号', store=True)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
create_time = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
end_time = fields.Date(string="失效日期")
|
||||
is_enable = fields.Boolean(string="启用", default=True)
|
||||
type_id = fields.Many2one('hr.payroll.structure.type', string="岗位类别",required=False)
|
||||
|
||||
@api.model
|
||||
def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
|
||||
@@ -36,3 +35,11 @@ class HrPayrollStructure(models.Model):
|
||||
return (False, 0) # 首位非0的放前面
|
||||
res.sort(key=sort_by_sequence_number)
|
||||
return res
|
||||
|
||||
def action_yuthon_salary(self):
|
||||
pass
|
||||
# structure_ids = self.env["hr.payroll.structure"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
# for record in structure_ids:
|
||||
# type_id = self.env['hr.payroll.structure.type'].search([('id', '=', record.id)])
|
||||
# if not type_id.default_struct_id:
|
||||
# type_id.default_struct_id = record.id
|
||||
|
||||
@@ -9,7 +9,7 @@ class InheritHrSalaryRule(models.Model):
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='所属公司')
|
||||
amount_fix = fields.Float(string='固定金额', group_operator=None)
|
||||
|
||||
|
||||
def action_yuthon_salary_wizard(self):
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position="before">
|
||||
<field name="sequence"/>
|
||||
<field name="lv_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="lv_name" column_invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
@@ -34,7 +34,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='country_id']" position="after">
|
||||
<field name="sequence"/>
|
||||
<field name="lv_id"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="create_time"/>
|
||||
<field name="end_time"/>
|
||||
@@ -85,4 +84,11 @@
|
||||
<field name="context">{'search_default_group_lv_name': 1}</field>
|
||||
<field name="domain">[('yuthon_company', '=', 'thwg')]</field>
|
||||
</record>
|
||||
<record id="all_paroll_write_salary" model="ir.actions.server">
|
||||
<field name="name">批量更新职级类型</field>
|
||||
<field name="model_id" ref="hr_payroll.model_hr_payroll_structure"/>
|
||||
<field name="binding_model_id" ref="hr_payroll.model_hr_payroll_structure"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.action_yuthon_salary()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user