@@ -8,11 +8,11 @@
|
||||
<xpath expr="//field[@name='date_end']" position="after">
|
||||
<field name="date_of_entry"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='contract_type_id']" position="attributes">
|
||||
<attribute name="string">用工形式</attribute>
|
||||
<xpath expr="//field[@name='employee_id']" position="after">
|
||||
<field name="contract_type_id" string="用工形式"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position="attributes">
|
||||
<attribute name="string">合同名称</attribute>
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<field name="issue_meeting_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="meeting_booking_id" column_invisible="1"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="issue_library_id"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="attendees"/>
|
||||
|
||||
@@ -370,7 +370,7 @@ class TitleInformationLine(models.Model):
|
||||
equity_area = fields.Float(related='property_message_id.equity_area', string="产权面积", digits=(16, 4))
|
||||
registered_id = fields.Many2one(related='property_message_id.registered_id', string='证载用途')
|
||||
property_use_time = fields.Selection(related='property_message_id.property_use_time', string="产权年限")
|
||||
life_timer = fields.Datetime(related='property_message_id.life_timer', string="使用时间")
|
||||
life_timer = fields.Date(related='property_message_id.life_timer', string="使用时间")
|
||||
title_certificate = fields.Char(related='property_message_id.title_certificate', string="产权证号")
|
||||
|
||||
start_time = fields.Date(string="生效日期", default=fields.Date.today)
|
||||
|
||||
@@ -13,6 +13,6 @@ class YuthonPropertyMessage(models.Model):
|
||||
ctual_area = fields.Float(string="实际面积", digits=(16, 4))
|
||||
equity_area = fields.Float(string="产权面积", digits=(16, 4))
|
||||
property_use_time = fields.Selection([('a', '70年'), ('b', '40年'), ('c', '50年'), ('e', '30年'), ('f', '60年')], string="产权年限")
|
||||
life_timer = fields.Datetime(string="使用时间")
|
||||
life_timer = fields.Date(string="使用时间")
|
||||
registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
|
||||
@@ -46,6 +46,7 @@ class PropertyLeaseContract(models.Model):
|
||||
contract_date = fields.Date(string="合同签订日期")
|
||||
property_documents_ids = fields.Many2many('ir.attachment', string="租赁合同文件")
|
||||
title_address = fields.Char(string="产权地址")
|
||||
handling_opinions = fields.Text(string="经办意见")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="出租方")
|
||||
rent_company = fields.Char(related='company_id.name', string="收租公司名称")
|
||||
rent_account = fields.Char(related='company_id.rent_account', string="收租公司账号")
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
<field name="use_address"/>
|
||||
<field name="address_for_delivery"/>
|
||||
<field name="title_address"/>
|
||||
<field name="handling_opinions"/>
|
||||
<field name="condition" readonly="1" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -163,7 +164,7 @@
|
||||
<field name="rent" string="季租金" invisible="cycle_dict != 'quarter'"/>
|
||||
<field name="rent" string="半年租金" invisible="cycle_dict != 'half'"/>
|
||||
<field name="rent" string="年租金" invisible="cycle_dict != 'year'"/>
|
||||
<field name="unit_price" readonly="1" force_save="1"/>
|
||||
<field name="unit_price" force_save="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="first_pay"/>
|
||||
|
||||
@@ -44,12 +44,12 @@ class SalaryComputeWizard(models.Model):
|
||||
('current_year', '=', self.select_year),
|
||||
('current_month', '=', self.select_time),
|
||||
])
|
||||
# if not attendance_records:
|
||||
# raise ValidationError(
|
||||
# f"在 {self.select_year} 年 {self.select_time} 月没有出勤月度汇总记录,请先完成考勤统计。")
|
||||
# if not all(record.is_state for record in attendance_records):
|
||||
# raise ValidationError(
|
||||
# f"在 {self.select_year} 年 {self.select_time} 月的出勤月度汇总记录未全部确认,请先确认考勤。")
|
||||
if not attendance_records:
|
||||
raise ValidationError(
|
||||
f"在 {self.select_year} 年 {self.select_time} 月没有出勤月度汇总记录,请先完成考勤统计。")
|
||||
if not all(record.is_state for record in attendance_records):
|
||||
raise ValidationError(
|
||||
f"在 {self.select_year} 年 {self.select_time} 月的出勤月度汇总记录未全部确认,请先确认考勤。")
|
||||
for employee in self.employee_ids:
|
||||
contract_id = self.env['hr.contract'].search([('employee_id', '=', employee.id)], limit=1)
|
||||
year = int(self.select_year)
|
||||
@@ -74,13 +74,13 @@ class SalaryComputeWizard(models.Model):
|
||||
'state': 'draft',
|
||||
'payslip_count': 0
|
||||
})
|
||||
# existing_payslip = self.env['hr.payslip'].search([
|
||||
# ('employee_id', '=', employee.id),
|
||||
# ('date_from', '<=', end_date),
|
||||
# ('date_to', '>=', start_date)
|
||||
# ])
|
||||
# if existing_payslip:
|
||||
# raise UserError( f"员工 {employee.name} 在 {start_date} 到 {end_date} 日期范围内已有工资单记录,无法创建新的工资单。")
|
||||
existing_payslip = self.env['hr.payslip'].search([
|
||||
('employee_id', '=', employee.id),
|
||||
('date_from', '<=', end_date),
|
||||
('date_to', '>=', start_date)
|
||||
])
|
||||
if existing_payslip:
|
||||
raise UserError( f"员工 {employee.name} 在 {start_date} 到 {end_date} 日期范围内已有工资单记录,无法创建新的工资单。")
|
||||
payslip = self.env['hr.payslip'].create({
|
||||
'name': employee.name,
|
||||
'employee_id': employee.id,
|
||||
|
||||
Reference in New Issue
Block a user