添加功能
This commit is contained in:
@@ -6,6 +6,7 @@ class HrPayrollStructure(models.Model):
|
||||
_order = 'sequence asc'
|
||||
|
||||
lv_id = fields.Many2one('hr.payroll.structure.type', string="级别")
|
||||
lv_name = fields.Char(related='lv_id.name', string='级别名称', store=True)
|
||||
name = fields.Char(string="职级名称")
|
||||
sequence = fields.Char(related='lv_id.sequence', string='级别序号', store=True)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
|
||||
@@ -8,7 +8,8 @@ class InheritHrSalaryRule(models.Model):
|
||||
category_id = fields.Many2one('hr.salary.rule.category', required=False, string='类别')
|
||||
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",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<xpath expr="//field[@name='name']" position="before">
|
||||
<field name="sequence"/>
|
||||
<field name="lv_id"/>
|
||||
<field name="lv_name" column_invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="yuthon_company"/>
|
||||
@@ -52,7 +53,7 @@
|
||||
<group expand="0">
|
||||
<filter name="group_date" string="查询年月" context="{'group_by': 'create_time'}"/>
|
||||
<filter name="group_company" string="所属公司" context="{'group_by': 'yuthon_company'}"/>
|
||||
<filter name="group_lv_id" string="级别" context="{'group_by': 'lv_id'}"/>
|
||||
<filter name="group_lv_name" string="级别" context="{'group_by': 'lv_name'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -61,27 +62,27 @@
|
||||
<field name="name">全部</field>
|
||||
<field name="res_model">hr.payroll.structure</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="context">{'search_default_group_lv_id': 1}</field>
|
||||
<field name="context">{'search_default_group_lv_name': 1}</field>
|
||||
</record>
|
||||
<record id="action_view_hr_payroll_structure_list_form1" model="ir.actions.act_window">
|
||||
<field name="name">天河投资</field>
|
||||
<field name="res_model">hr.payroll.structure</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="context">{'search_default_group_lv_id': 1}</field>
|
||||
<field name="context">{'search_default_group_lv_name': 1}</field>
|
||||
<field name="domain">[('yuthon_company', '=' , 'thtz')]</field>
|
||||
</record>
|
||||
<record id="action_view_hr_payroll_structure_list_form2" model="ir.actions.act_window">
|
||||
<field name="name">天河粮储</field>
|
||||
<field name="res_model">hr.payroll.structure</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="context">{'search_default_group_lv_id': 1}</field>
|
||||
<field name="context">{'search_default_group_lv_name': 1}</field>
|
||||
<field name="domain">[('yuthon_company', '=', 'thlc')]</field>
|
||||
</record>
|
||||
<record id="action_view_hr_payroll_structure_list_form3" model="ir.actions.act_window">
|
||||
<field name="name">天河物管</field>
|
||||
<field name="res_model">hr.payroll.structure</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="context">{'search_default_group_lv_id': 1}</field>
|
||||
<field name="context">{'search_default_group_lv_name': 1}</field>
|
||||
<field name="domain">[('yuthon_company', '=', 'thwg')]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -149,6 +149,8 @@ class YuthonSalaryWizard(models.Model):
|
||||
for salary, r in zip(salary_dates, row[3:15]):
|
||||
name_pinyin = pinyin(salary.value, style=Style.FIRST_LETTER)
|
||||
abbreviation = "".join([p[0][0] for p in name_pinyin]).upper()
|
||||
if type(r.value) == str:
|
||||
r.value = 0
|
||||
salary_date = {
|
||||
'sequence': row[0].value,
|
||||
'code': yuthon_company2 + abbreviation,
|
||||
|
||||
Reference in New Issue
Block a user