!3105 添加功能

Merge pull request !3105 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-06-05 08:43:02 +00:00
committed by Gitee
3 changed files with 12 additions and 10 deletions
@@ -12,6 +12,7 @@ class PropertySplitApproval(models.Model):
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
property_id = fields.Many2one('yuthon.property', string='物业名称')
units = fields.Char(related='property_id.units', string='单元')
effective_date = fields.Date(string='生效日期', default=fields.Date.today())
property_floor_id = fields.Many2one(related='property_id.property_floor_id', string='楼层')
asset_type_id = fields.Many2one(related='property_id.asset_type_id', string='资产类型')
building_area = fields.Float(related='property_id.building_area', string='建筑面积')
@@ -478,16 +478,16 @@
<page string="附件">
<group col="2">
<group>
<field name="license_id" widget="preview_many2one" readonly="1"/>
<field name="legal_entity_id" widget="preview_many2one" readonly="1"/>
<field name="handover_time" widget="preview_many2one" readonly="1"/>
<field name="lease_contract" widget="preview_many2one" readonly="1"/>
<field name="license_id" widget="preview_many2one"/>
<field name="legal_entity_id" widget="preview_many2one"/>
<field name="handover_time" widget="preview_many2one"/>
<field name="lease_contract" widget="preview_many2one"/>
</group>
<group>
<field name="power_attorney_id" widget="preview_many2one" readonly="1"/>
<field name="asset_valuation_id" widget="preview_many2one" readonly="1"/>
<field name="confirmation_transaction_id" widget="preview_many2one" readonly="1"/>
<field name="other_id" widget="preview_many2one" readonly="1"/>
<field name="power_attorney_id" widget="preview_many2one"/>
<field name="asset_valuation_id" widget="preview_many2one"/>
<field name="confirmation_transaction_id" widget="preview_many2one"/>
<field name="other_id" widget="preview_many2one"/>
</group>
</group>
</page>
+3 -2
View File
@@ -115,7 +115,7 @@ class InheritHrPayslip(models.Model):
# 粮储常用项
quality_allowance = fields.Float(string='质检员津贴')
environmental_allowance = fields.Float(string='环境作业津贴')
performance_deduction = fields.Float(string='扣发绩效奖金', compute='_compute_deduction', store=True)
commuting_deduction = fields.Float(string='扣发通信补贴', compute='_compute_deduction', store=True)
base_salary_deduction = fields.Float(string='扣发基本工资', compute='_compute_deduction', store=True)
@@ -129,9 +129,10 @@ class InheritHrPayslip(models.Model):
def action_refresh_from_work_entries(self):
payslip_records = self.browse(self._context.get('active_ids', self._context.get('active_id')))
payslips = payslip_records or self
# 过滤出状态为草稿或已验证的工资单
# 过滤出状态为草稿或已验证的工资单 以及试用期的
payslips = payslips.filtered(
lambda slip: slip.state in ['draft', 'verify']
and not slip.employee_id.contract_id.is_probation
)
# delete old payslip lines
payslips.line_ids.unlink()