!2971 添加功能

Merge pull request !2971 from dev_zhou
This commit is contained in:
李鹏宇
2025-05-30 07:57:17 +00:00
committed by Gitee
4 changed files with 4 additions and 15 deletions
@@ -171,9 +171,9 @@
</group>
</group>
<group>
<label for="is_logged_by"/>
<label for="is_by_company"/>
<div class="d-inline-flex w-100">
<field name="is_logged_by" string="按本公司:" class="me-2"
<field name="is_by_company" string="按本公司:" class="me-2"
style="max-width: 10rem !important;"/>按本集团
<field name="is_by_group" string=" " class="ms-2"
style="max-width: 10rem !important;"/>自动匹配
@@ -19,6 +19,7 @@ class YuthonOfficialIncomingNormal(models.Model):
main_text = fields.Text(string='正文')
come_file_id = fields.Char(string="来文编号")
incoming_file_id = fields.Char(string="收文编号")
company_id = fields.Many2one('res.company', string="单位") # 数据错误数据
urgency_level = fields.Selection([('normal', '一般'), ('urgent', '紧急'), ('extra_urgent', '特急')], string="紧急程度", default='normal')
secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'), ('secret', '机密'), ('so_secret', '绝密')], string="密级")
time_date = fields.Datetime(string="日期", default=fields.Datetime.now)
@@ -174,9 +174,4 @@ class HrPayrollStructure(models.Model):
self._context.get('active_ids', self._context.get('active_id')))
for payroll in payroll_ids:
for rule in payroll.rule_ids:
rule.sudo().unlink()
def update_lc(self):
category_id = self.env['hr.salary.rule.category'].search([('name', 'in', ['环境作业津贴', '值班费'])])
for category in category_id:
category.write({'amount_select': 'fix'})
rule.sudo().unlink()
@@ -133,11 +133,4 @@
<field name="state">code</field>
<field name="code">action = model.delete_structure()</field>
</record>
<record id="select_update_lc" 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.update_lc()</field>
</record>
</odoo>