@@ -383,6 +383,7 @@ class HolidaysRequestBatch(models.Model):
|
||||
workflow_record_id = self.env['soong.workflow.record'].search([
|
||||
('code', '=', self.code)
|
||||
])
|
||||
|
||||
for line in self.hour_leave_ids:
|
||||
if line.holiday_status_id.name == '年假':
|
||||
match = re.search(r'(\d+(?:\.\d+)?)', line.number_of_hours_text or '')
|
||||
@@ -390,12 +391,13 @@ class HolidaysRequestBatch(models.Model):
|
||||
for leave in self.leave_ids:
|
||||
if leave.holiday_status_id.name == '年假':
|
||||
days += leave.number_of_days
|
||||
|
||||
leave_list.append((0, 0, {
|
||||
'vacation_id': reports_id.id,
|
||||
'update_type': 'reduce',
|
||||
'workflow_record_id':workflow_record_id.id,
|
||||
'update_date': fields.Datetime.now(),
|
||||
'update_lines': days,
|
||||
'update_lines': days,
|
||||
'text': '审批'
|
||||
}))
|
||||
reports_id.write({'leave_ids': leave_list})
|
||||
@@ -484,22 +486,14 @@ class HolidaysRequestBatch(models.Model):
|
||||
else:
|
||||
self.name = ""
|
||||
|
||||
|
||||
@api.depends('users_id')
|
||||
def _compute_holiday_allowance(self):
|
||||
number_of_days = 0
|
||||
for record in self:
|
||||
holiday_status_id = self.env['hr.leave.type'].search([('name', '=', '年假')])
|
||||
leave_ids = self.env['hr.leave.allocation'].search([('employee_id', '=', record.users_id.employee_id.id),
|
||||
('holiday_status_id', '=', holiday_status_id.id)])
|
||||
employee = self.env['hr.employee'].search([('id', '=', record.users_id.employee_id.id)])
|
||||
all_overtime_hours = round(employee.all_overtime_hours / 8, 1)
|
||||
if leave_ids:
|
||||
for leave_id in leave_ids:
|
||||
number_of_days += leave_id.number_of_days
|
||||
else:
|
||||
number_of_days = 0
|
||||
record.holiday_allowance = (f"年假{number_of_days}天, 补休{all_overtime_hours}天")
|
||||
reports_id = self.env['yuthon.vacation.reports'].search([('employee_id', '=', record.users_id.employee_id.id)])
|
||||
if reports_id:
|
||||
leave = round(reports_id.leave / 8, 1)
|
||||
working_overtime = round(reports_id.working_overtime / 8, 1)
|
||||
record.holiday_allowance = (f"年假{leave}天, 补休{working_overtime}天")
|
||||
|
||||
class HrLeaveLine(models.Model):
|
||||
_name = 'hr.leave.line'
|
||||
|
||||
@@ -101,23 +101,68 @@ class HrLeaveAllocation(models.Model):
|
||||
leave_ids = self.env["hr.leave.allocation"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for leave in leave_ids:
|
||||
leave.employee_id.write({'remainder_year': leave.number_of_hours_display,
|
||||
'quota_issued': leave.number_of_hours_display})
|
||||
leave.employee_id.write({'quota_issued': leave.number_of_hours_display})
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
# 调用原始创建方法获取记录
|
||||
allocation = super(HrLeaveAllocation, self).create(vals)
|
||||
# 处理年假类型的分配
|
||||
if allocation.holiday_status_id.name == '年假':
|
||||
employee = allocation.employee_id
|
||||
days = allocation.number_of_hours_display
|
||||
# 累计员工字段
|
||||
employee.write({
|
||||
'remainder_year': employee.remainder_year + days,
|
||||
'quota_issued': employee.quota_issued + days
|
||||
})
|
||||
reports_id = self.env['yuthon.vacation.reports'].search([
|
||||
('employee_id', '=', employee.id)
|
||||
], limit=1)
|
||||
# 创建假期明细记录
|
||||
self.env['yuthon.vacation.line'].create({
|
||||
'vacation_id': reports_id.id,
|
||||
'update_type': 'add',
|
||||
'update_date': fields.Datetime.now(),
|
||||
'update_lines': days,
|
||||
'text': allocation.name
|
||||
})
|
||||
return allocation
|
||||
|
||||
def unlink(self):
|
||||
"""删除记录时同步删除对应的假期明细行"""
|
||||
for record in self:
|
||||
# 检查是否有需要同步的员工记录
|
||||
if record.employee_id and record.holiday_status_id.name == '年假':
|
||||
employee = record.employee_id
|
||||
days = record.number_of_hours_display
|
||||
lines_to_delete = self.env['yuthon.vacation.line'].search([
|
||||
('vacation_id.employee_id', '=', employee.id),
|
||||
('update_type', '=', 'add'),
|
||||
('update_lines', '=', days),
|
||||
('text', '=', record.name)
|
||||
])
|
||||
if lines_to_delete:
|
||||
lines_to_delete.unlink()
|
||||
employee.write({
|
||||
'quota_issued': employee.quota_issued - days
|
||||
})
|
||||
return super(HrLeaveAllocation, self).unlink()
|
||||
|
||||
def update_vacation(self):
|
||||
leave_ids = self.env["hr.leave.allocation"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for leave in leave_ids:
|
||||
leave_list = []
|
||||
if leave.holiday_status_id.name == '年假':
|
||||
reports_id = self.env['yuthon.vacation.reports'].search([('employee_id', '=', leave.employee_id.id)])
|
||||
if reports_id:
|
||||
leave_list.append([0, 0, {'vacation_id': reports_id.id,
|
||||
'update_type': 'add',
|
||||
'update_date': fields.Datetime.now(),
|
||||
'update_lines': leave.number_of_hours_display,
|
||||
'text': leave.name
|
||||
}])
|
||||
reports_id.write({'leave_ids': leave_list})
|
||||
|
||||
# def allocation_date(self):
|
||||
# date = datetime(2025, 1, 1)
|
||||
# leave_id = self.env['hr.leave.allocation'].search([])
|
||||
|
||||
@@ -13,7 +13,6 @@ class YuthonVacationReports(models.Model):
|
||||
leave_ids = fields.One2many('vacation.leave.line', 'vacation_id', string='年假明细')
|
||||
overtime_ids = fields.One2many('vacation.over.line', 'vacation_id', string='加班明细')
|
||||
meal_fee_ids = fields.One2many('vacation.meal.line', 'vacation_id', string='误餐明细')
|
||||
allocate_credits = fields.Float(string='分配额度')
|
||||
|
||||
leave = fields.Float(string='年假', compute='_compute_leave', store=True)
|
||||
working_overtime = fields.Float(string='加班时', compute='_compute_working_overtime', store=True)
|
||||
@@ -136,7 +135,6 @@ class VacationLeaveLine(models.Model):
|
||||
workflow_record_id = fields.Many2one('soong.workflow.record', string='流程')
|
||||
update_type= fields.Selection([('add', '增加'), ('reduce', '减少')], string='更新类型')
|
||||
update_date = fields.Date(string='更新时间')
|
||||
allocate_credits = fields.Float(string='分配额度')
|
||||
update_lines = fields.Float(string='更新额度')
|
||||
text = fields.Text(string='备注')
|
||||
|
||||
@@ -144,6 +142,21 @@ class VacationLeaveLine(models.Model):
|
||||
def create(self, vals):
|
||||
return super(VacationLeaveLine, self).create(vals)
|
||||
|
||||
def _sync_to_employee(self, reverse=False):
|
||||
"""将年假数据同步到关联员工"
|
||||
:param reverse: 是否反向操作(用于删除场景)
|
||||
"""
|
||||
sign = -1 if reverse else 1
|
||||
employee = self.vacation_id.employee_id
|
||||
employee.write({
|
||||
'user_year': employee.user_year + self.update_lines * sign,
|
||||
})
|
||||
|
||||
def unlink(self):
|
||||
"""删除记录时同步扣减员工加班时长"""
|
||||
self._sync_to_employee(reverse=True)
|
||||
return super(VacationLeaveLine, self).unlink()
|
||||
|
||||
class VacationOverline(models.Model):
|
||||
_name = 'vacation.over.line'
|
||||
_description = '加班明细'
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.action_uninstall_wizard()</field>
|
||||
</record>
|
||||
<record id="all_holiday_update_vacation" model="ir.actions.server">
|
||||
<field name="name">更新报表</field>
|
||||
<field name="model_id" ref="hr_holidays.model_hr_leave_allocation"/>
|
||||
<field name="binding_model_id" ref="hr_holidays.model_hr_leave_allocation"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.update_vacation()</field>
|
||||
</record>
|
||||
<record id="all_update_employee" model="ir.actions.server">
|
||||
<field name="name">一次性更新</field>
|
||||
<field name="model_id" ref="hr_holidays.model_hr_leave_allocation"/>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
<field name="update_type"/>
|
||||
<field name="update_date"/>
|
||||
<field name="update_lines"/>
|
||||
<field name="allocate_credits"/>
|
||||
<field name="text"/>
|
||||
<button name="unlink" string="删除" invisible="workflow_record_id" type="object" class="btn-primary"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -136,7 +136,6 @@ class GoApprovals(models.Model):
|
||||
|
||||
def end_approval(self):
|
||||
if self.meal:
|
||||
self.users_id.employee_id.meal_number += 1
|
||||
# 创建日志
|
||||
go_approval_list = []
|
||||
reports_id = self.env['yuthon.vacation.reports'].search([
|
||||
@@ -153,7 +152,7 @@ class GoApprovals(models.Model):
|
||||
'update_lines': 1 ,
|
||||
'text': '审批'
|
||||
}))
|
||||
reports_id.write({'meal_fee_ids': go_approval_list})
|
||||
reports_id.write({'meal_fee_ids': [(0, 0, go_approval_list)]})
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -164,12 +164,6 @@ class OvertimeApprovals(models.Model):
|
||||
for record in self:
|
||||
employee_id = self.env['hr.employee'].search([('id', '=', record.users_id.employee_id.id)])
|
||||
meal_number = employee_id.meal_number
|
||||
if record.type_overtime == 'work':
|
||||
employee_id.write({'normal_overtime_hours': employee_id.normal_overtime_hours + record.real_duration})
|
||||
elif record.type_overtime == 'weekend':
|
||||
employee_id.write({'weekend_overtime_hours': employee_id.weekend_overtime_hours + record.real_duration})
|
||||
else:
|
||||
employee_id.write({'holiday_overtime_hours': employee_id.holiday_overtime_hours + record.real_duration})
|
||||
record.overtime_hours = employee_id.holiday_overtime_hours + employee_id.weekend_overtime_hours + employee_id.normal_overtime_hours
|
||||
if self.meal == 'yes':
|
||||
meal_number +=1
|
||||
@@ -214,7 +208,7 @@ class OvertimeApprovals(models.Model):
|
||||
'update_date': fields.Datetime.now(),
|
||||
'text': '审批'
|
||||
}
|
||||
reports_id.write({'overtime_ids': overtime_data})
|
||||
reports_id.write({'overtime_ids': [(0, 0, overtime_data)]})
|
||||
|
||||
@api.depends('users_id', 'duration')
|
||||
def _compute_name(self):
|
||||
|
||||
@@ -118,7 +118,7 @@ class YuthonHrEmployee(models.Model):
|
||||
is_accum_salary = fields.Boolean(string="是否公积金", compute="_compute_company_old", store=True)
|
||||
# 假期
|
||||
user_year= fields.Float(string="已用年假")
|
||||
remainder_year = fields.Float(string="剩余年假")
|
||||
remainder_year = fields.Float(string="剩余年假", compute="_compute_remainder_year", store=True)
|
||||
cumulative_hours = fields.Float(string="累计剩余探亲假")
|
||||
all_year = fields.Float(string="年假总数(小时)")
|
||||
previous_balance = fields.Float(string="上年结余")
|
||||
@@ -201,6 +201,14 @@ class YuthonHrEmployee(models.Model):
|
||||
subsidy_amount = fields.Float(string="岗位补贴金额", compute='_compute_subsidy_amount', store=True)
|
||||
security_amount = fields.Float(string="安全委员会金额", compute='_compute_subsidy_amount', store=True)
|
||||
|
||||
@api.depends('quota_issued', 'user_year')
|
||||
def _compute_remainder_year(self):
|
||||
for record in self:
|
||||
if record.quota_issued > record.user_year:
|
||||
record.remainder_year = record.quota_issued - record.user_year
|
||||
else:
|
||||
record.remainder_year = 0
|
||||
|
||||
@api.depends('user_role_ids', 'user_role_id', 'department_id', 'skills_certificates_ids')
|
||||
def _compute_subsidy_amount(self):
|
||||
for record in self:
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<button name="receivable_log_wizard" string="日志" type="object" class="oe_highlight"/>
|
||||
<field name="due_date"/>
|
||||
<field name="payout_date"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="management_type_id"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="discount_amount"/>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<field name="model">property.deposit.list</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="押金列表" editable="bottom" limit="20" create="false" delete="false" edit="0">
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="is_push" optional="hide"/>
|
||||
<button name="unlink" string="删除" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<tree string="抄表" editable="bottom" limit="20">
|
||||
<field name="code"/>
|
||||
<field name="position" optional="hide"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="users_id" optional="hide" widget="ztree_select"/>
|
||||
<field name="property_state" optional="hide"/>
|
||||
<field name="payment_account" optional="hide"/>
|
||||
@@ -42,8 +42,8 @@
|
||||
<field name="code"/>
|
||||
<field name="employee_ids" widget="many2many_tags" readonly="1" options="{'no_create': True}"/>
|
||||
<field name="position"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="property_state"/>
|
||||
<field name="other"/>
|
||||
<field name="payment_account"/>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<button name="put_assessment_approval" type="object" string="提交评估申请" class="btn btn-primary"/>
|
||||
</header>
|
||||
<field name="name"/>
|
||||
<field name="property_ids" widget="many2many_tags" optional="hide"/>
|
||||
<field name="property_ids" widget="many2many_tags" optional="hide" options="{'no_create': True}"/>
|
||||
<field name="evaluation_area"/>
|
||||
<field name="assessment_category"/>
|
||||
<field name="owner_id"/>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<field name="model">property.management.list</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" string="管理费列表" limit="20">
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="area"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="due_date"/>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<group col="2" string="默认关联设置">
|
||||
<group>
|
||||
<field name="meter_reading_date"/>
|
||||
<field name="yuthon_property_id"/>
|
||||
<field name="yuthon_property_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="standards_id"/>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="仪表档案" limit="20">
|
||||
<field name="name"/>
|
||||
<field name="yuthon_property_id" string="物业信息"/>
|
||||
<field name="yuthon_property_id" string="物业信息" options="{'no_create': True}"/>
|
||||
<field name="unit_number"/>
|
||||
<field name="device_number"/>
|
||||
<field name="gauge_model"/>
|
||||
@@ -62,10 +62,10 @@
|
||||
<group col="2" string="默认关联设置">
|
||||
<group>
|
||||
<field name="meter_reading_date"/>
|
||||
<field name="yuthon_property_id"/>
|
||||
<field name="yuthon_property_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="standards_id"/>
|
||||
<field name="standards_id" options="{'no_create': True}"/>
|
||||
<field name="late_fee_standard"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" string="其他费用">
|
||||
<field name="contract_code"/>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<field name="model">property.penalty.list</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" string="违约金列表">
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="rent_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="rent_id" options="{'no_create': True}"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
<field name="base"/>
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" string="租金列表" decoration-danger = "charge_status == 'unpaid'"
|
||||
decoration-success="charge_status == 'fully_paid'" js_class="custom_rent_list_button" limit="20">
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="company_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="admin_id" options="{'no_create': True}"/>
|
||||
<field name="company_id" options="{'no_create': True}"/>
|
||||
<field name="due_date"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="discount_amount"/>
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="电费列表" editable="bottom" limit="20">
|
||||
<field name="contract_code" optional="hide"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="tariff_meter_number" optional="hide"/>
|
||||
<field name="due_date"/>
|
||||
<field name="tariff_meter_reading" optional="hide"/>
|
||||
<field name="fee_id" optional="hide"/>
|
||||
<field name="fee_id" optional="hide" options="{'no_create': True}"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="deduction_amount" optional="hide"/>
|
||||
<field name="remarks"/>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="水费列表" editable="bottom" limit="20">
|
||||
<field name="contract_code" optional="hide"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="water_meter_number" optional="hide"/>
|
||||
<field name="due_date"/>
|
||||
<field name="water_meter_reading" optional="hide"/>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<tree string="抄表" editable="bottom" limit="20">
|
||||
<field name="code"/>
|
||||
<field name="position" optional="hide"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="users_id" optional="hide" widget="ztree_select"/>
|
||||
<field name="property_state" optional="hide"/>
|
||||
<field name="payment_account" optional="hide"/>
|
||||
@@ -42,8 +42,8 @@
|
||||
<field name="code"/>
|
||||
<field name="employee_ids" widget="many2many_tags" readonly="1" options="{'no_create': True}"/>
|
||||
<field name="position"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="property_state"/>
|
||||
<field name="other"/>
|
||||
<field name="payment_account"/>
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
<field name="disassembly_information_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="yuthon_property_id" column_invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="rent_area"/>
|
||||
<field name="start_time"/>
|
||||
<field name="end_date"/>
|
||||
|
||||
@@ -1000,7 +1000,7 @@ class PropertyLeaseContract(models.Model):
|
||||
rec.mange_fee_ids = [(5, 0, 0)]
|
||||
rec.admin_id = rec.lease_ids[0].admin_line_id.id if rec.lease_ids else ''
|
||||
rec.tenure_type = rec.lease_ids[0].address_id.tenure_type if rec.lease_ids else ''
|
||||
rec.lessor_id = rec.lease_ids[0].address_id.lessor_id.id if rec.lease_ids else ''
|
||||
rec.lessor_id = rec.lease_ids[0].address_id.company_id.id if rec.lease_ids else ''
|
||||
rec.precinct_id = rec.lease_ids[0].address_id.precinct_id.id if rec.lease_ids else ''
|
||||
rec.total_area = sum([lease.property_area for lease in rec.lease_ids])
|
||||
rec.electricity_fee_ids = electricity_list
|
||||
@@ -1009,7 +1009,7 @@ class PropertyLeaseContract(models.Model):
|
||||
def trigger_lease_ids(self):
|
||||
property_ids = self.env["property.lease.contract"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in property_ids:
|
||||
lessor_id = record.lease_ids[0].address_id.lessor_id.id if record.lease_ids else ''
|
||||
lessor_id = record.lease_ids[0].address_id.company_id.id if record.lease_ids else ''
|
||||
admin_id = record.lease_ids[0].admin_line_id.id if record.lease_ids else ''
|
||||
tenure_type = record.lease_ids[0].address_id.tenure_type if record.lease_ids else ''
|
||||
record.sudo().write({'lessor_id': lessor_id,
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<field name="property_contract_ids" create="false" edit="false" delete="false">
|
||||
<tree editable="bottom">
|
||||
<field name="tenant_id" column_invisible="1"/>
|
||||
<field name="lease_contract_id"/>
|
||||
<field name="property_ids" widget="many2many_tags"/>
|
||||
<field name="lease_contract_id" options="{'no_create': True}"/>
|
||||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="rent"/>
|
||||
<field name="start_time"/>
|
||||
<field name="end_date"/>
|
||||
|
||||
@@ -28,23 +28,13 @@
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_rent_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="before">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='is_reconciliation']" position="after">
|
||||
<button name="push_rent" type="object" string="推送" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_property_rent_list_search" model="ir.ui.view">
|
||||
<field name="name">property.lease.contract.search</field>
|
||||
<field name="model">property.rent.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_rent_list_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='group_property_id']" position="after">
|
||||
<filter name="group_contract_id" string="合同" context="{'group_by':'contract_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_rent_list_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_rent_list"/>
|
||||
@@ -82,11 +72,11 @@
|
||||
<field name="model">property.deposit.list</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="押金累计欠收报表" editable="bottom" create="false">
|
||||
<field name="property_id"/>
|
||||
<field name="contract_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="contract_id" options="{'no_create': True}"/>
|
||||
<field name="admin_id" options="{'no_create': True}"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="company_id"/>
|
||||
<field name="company_id" options="{'no_create': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -130,7 +120,7 @@
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_tariff_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
<xpath expr="//tree/field[@name='remarks']" position="after">
|
||||
<button name="push_tariff" string="推送" type="object" class="oe_highlight"/>
|
||||
@@ -157,7 +147,7 @@
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_water_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
<xpath expr="//tree/field[@name='remarks']" position="after">
|
||||
<button name="push_water" string="推送" type="object" class="oe_highlight"/>
|
||||
@@ -184,7 +174,7 @@
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_electric_reading_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='employee_ids']" position="after">
|
||||
<field name="reading_state"/>
|
||||
@@ -221,7 +211,7 @@
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_water_reading_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='employee_ids']" position="after">
|
||||
<field name="reading_state"/>
|
||||
@@ -267,7 +257,7 @@
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_archives_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='yuthon_property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -307,7 +297,7 @@
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_water_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='yuthon_property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -381,7 +371,7 @@
|
||||
<button name="button_accounts_wizard" string="操作" type="object" class="btn btn-primary"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="contract_id" string="合同" options="{'no_create': True}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='receivable_log']" position="after">
|
||||
<field name="penalty"/>
|
||||
@@ -447,9 +437,9 @@
|
||||
<field name="due_date"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="property_id"/>
|
||||
<field name="contract_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="contract_id" options="{'no_create': True}"/>
|
||||
<field name="admin_id" options="{'no_create': True}"/>
|
||||
<field name="tenure_type" optional="hide"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -487,8 +477,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="违约金明细报表" editable="bottom" create="false">
|
||||
<field name="contract_id" string="合同编号"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="original_amount" string="金额"/>
|
||||
<field name="rent_owed"/>
|
||||
<field name="per_day"/>
|
||||
@@ -518,9 +508,9 @@
|
||||
<field name="model">property.accounts.receivable</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="本月实收报表" editable="bottom" create="false">
|
||||
<field name="contract_id" string="合同编号"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="contract_id" string="合同编号" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="delivered1" string="金额"/>
|
||||
<field name="company_id"/>
|
||||
<field name="admin_id"/>
|
||||
@@ -542,9 +532,9 @@
|
||||
<field name="model">property.accounts.receivable</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="累计欠收">
|
||||
<field name="contract_id" string="合同编号"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="contract_id" string="合同编号" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="management_area"/>
|
||||
<field name="delivered1"/>
|
||||
<field name="submitted"/>
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
<field name="department_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_b_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="company_b_id" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
<field name="original_amount"/>
|
||||
<field name="contract_account" optional="hide"/>
|
||||
<field name="contract_penalty" optional="hide"/>
|
||||
<field name="property_ids" widget="many2many_tags"/>
|
||||
<field name="contract_ids" widget="many2many_tags"/>
|
||||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="contract_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="bank_number" optional="hide"/>
|
||||
<field name="message" optional="hide"/>
|
||||
<field name="number" optional="hide"/>
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
<field name="department_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_b_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="company_b_id" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
<field name="department_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_b_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="company_b_id" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<field name="evaluation_area"/>
|
||||
<field name="assessment_category"/>
|
||||
<field name="owner_id"/>
|
||||
<field name="registered_id"/>
|
||||
<field name="registered_id2"/>
|
||||
<field name="registered_id" options="{'no_create': True}"/>
|
||||
<field name="registered_id2" options="{'no_create': True}"/>
|
||||
<field name="lease_period"/>
|
||||
<field name="annual_increase_percentage"/>
|
||||
<field name="rent_id" string="办法"/>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<field name="property_handover_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="property_handover_id" column_invisible="1"/>
|
||||
<field name="property_id" string="物业信息"/>
|
||||
<field name="property_id" string="物业信息" options="{'no_create': True}"/>
|
||||
<field name="owner_id"/>
|
||||
<field name="property_address"/>
|
||||
<field name="is_affirmation"/>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="物业列表">
|
||||
<button name="choose_property_button" string="批量增加物业" type="object"
|
||||
<button name="choose_property_button" string="添加物业" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="lease_ids" string=" ">
|
||||
<tree editable="bottom" create="false">
|
||||
@@ -320,7 +320,7 @@
|
||||
<field name="name_account"/>
|
||||
<field name="contract_account"/>
|
||||
<field name="remake"/>
|
||||
<field name="property_ids" widget="many2many_tags"/>
|
||||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="contract_penalty"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="voucher_type"/>
|
||||
@@ -471,10 +471,11 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="物业列表">
|
||||
<button name="choose_property_button" string="批量增加物业" type="object"
|
||||
<button name="choose_property_button" string="添加物业" type="object"
|
||||
<button name="choose_property_button" string="增加物业" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="lease_ids" string=" ">
|
||||
<tree editable="bottom" delete="false">
|
||||
<tree editable="bottom" create="false">
|
||||
<field name="lease_id" column_invisible="1"/>
|
||||
<field name="address_id"/>
|
||||
<field name="admin_line_id"/>
|
||||
@@ -686,7 +687,7 @@
|
||||
<field name="name_account"/>
|
||||
<field name="contract_account"/>
|
||||
<field name="remake"/>
|
||||
<field name="property_ids" widget="many2many_tags"/>
|
||||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="contract_penalty"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="voucher_type"/>
|
||||
@@ -751,11 +752,6 @@
|
||||
<field name="lessee_id"/>
|
||||
<field name="contract_code"/>
|
||||
<field name="name"/>
|
||||
<searchpanel>
|
||||
<field name="lessor_id"/>
|
||||
<field name="precinct_id"/>
|
||||
<field name="tenure_type"/>
|
||||
</searchpanel>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_condition" context="{'group_by': 'condition'}"/>
|
||||
<filter name="group_by_lessee_id" context="{'group_by': 'lessee_id'}"/>
|
||||
|
||||
@@ -63,17 +63,17 @@
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group string="原管理信息"/>
|
||||
<button type="object" class="btn btn-primary" name="put_property_management" string="批量增加物业信息" invisible="state != '申请人'"/>
|
||||
<button type="object" class="btn btn-primary" name="put_property_management" string="添加物业" invisible="state != '申请人'"/>
|
||||
<group string=" " invisible="is_line">
|
||||
<field name="management_line2_ids" string=" ">
|
||||
<tree editable="bottom" create="False">
|
||||
<field name="property_management_id" column_invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="company_id" required="1"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="company_id" required="1" options="{'no_create': True}"/>
|
||||
<field name="tenure_type"/>
|
||||
<field name="admin_id_all" column_invisible="1"/>
|
||||
<field name="precinct_id"/>
|
||||
<field name="purpose_id"/>
|
||||
<field name="precinct_id" options="{'no_create': True}"/>
|
||||
<field name="purpose_id" options="{'no_create': True}"/>
|
||||
<field name="information_line_id" column_invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -82,12 +82,12 @@
|
||||
<field name="management_line_ids" string=" ">
|
||||
<tree editable="bottom">
|
||||
<field name="property_management_id" column_invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="company_id" required="1"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="company_id" required="1" options="{'no_create': True}"/>
|
||||
<field name="tenure_type"/>
|
||||
<field name="admin_id_all"/>
|
||||
<field name="precinct_id"/>
|
||||
<field name="purpose_id"/>
|
||||
<field name="precinct_id" options="{'no_create': True}"/>
|
||||
<field name="purpose_id" options="{'no_create': True}"/>
|
||||
<field name="information_line_id" column_invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -62,10 +62,10 @@
|
||||
<group>
|
||||
<field name="property_merge_approval_line_ids" string=" ">
|
||||
<tree editable="bottom">
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="units"/>
|
||||
<field name="property_floor_id"/>
|
||||
<field name="asset_type_id"/>
|
||||
<field name="property_floor_id" options="{'no_create': True}"/>
|
||||
<field name="asset_type_id" options="{'no_create': True}"/>
|
||||
<field name="building_area"/>
|
||||
<field name="rent_area"/>
|
||||
<field name="remarks"/>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="model">property.offline.registration</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="线下承租方报名表" limit="20">
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="area"/>
|
||||
<field name="contract_years"/>
|
||||
<field name="start_data"/>
|
||||
@@ -50,7 +50,7 @@
|
||||
<group string="招租信息" col="3">
|
||||
<group>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="monthly_rent"/>
|
||||
<field name="contract_years"/>
|
||||
</group>
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
<group string="物业信息">
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="contract_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
<field name="contract_id" options="{'no_create': True}"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="违约金列表">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<field name="name" required="1" string="项目名称:"/>
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="background_note"/>
|
||||
<field name="amount"/>
|
||||
<field name="documents_id" widget="preview_many2one"/>
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
<page string="评估项目详情">
|
||||
<field name="evaluate_application_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="property_id" string="评估资产"/>
|
||||
<field name="property_id" string="评估资产" options="{'no_create': True}"/>
|
||||
<field name="evaluation_area" string="评估面积m²"/>
|
||||
<field name="assessment_category" string="评估类别"/>
|
||||
<field name="owner_id"/>
|
||||
<field name="registered_id"/>
|
||||
<field name="owner_id" options="{'no_create': True}"/>
|
||||
<field name="registered_id" options="{'no_create': True}"/>
|
||||
<field name="purpose_id" string="设定用途"/>
|
||||
<field name="current_status"/>
|
||||
<field name="last_hand_rent_price" string="上一手历史租金单价" help="(元/m².月)"/>
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
</group>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="abatement_reason"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="contract_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="contract_id" options="{'no_create': True}"/>
|
||||
<field name="lessee_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<group string="物业信息" col="3">
|
||||
<group>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="code"/>
|
||||
<field name="lease_expiration_date"/>
|
||||
<field name="users_id" invisible="1"/>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<field name="property_rental_form_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="property_rental_form_id" column_invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="registered_id" optional="hide"/>
|
||||
<field name="evaluation_area" optional="hide"/>
|
||||
<field name="current_status"/>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<group>
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="property_id" options="{'no_create': True}"/>
|
||||
<field name="units"/>
|
||||
<field name="property_floor_id"/>
|
||||
<field name="asset_type_id"/>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group string="物业信息">
|
||||
<field name="property_ids" widget="many2many_tags"/>
|
||||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="entity_type"/>
|
||||
<field name="details"/>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<group string="物业信息">
|
||||
<group>
|
||||
<field name="rental_address"/>
|
||||
<field name="property_ids" widget="many2many_tags"/>
|
||||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="rental_name"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="lease_contract_id" invisible="1"/>
|
||||
<field name="property_ids" widget="many2many_tags" context="{'search_view_ref': 'yuthon_property.yuthon_property_search'}"/>
|
||||
<field name="property_ids" widget="many2many_tags" context="{'search_view_ref': 'yuthon_property.yuthon_property_search'}" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user