添加功能
This commit is contained in:
@@ -72,9 +72,9 @@ class YuthonShiftPlanning(models.Model):
|
||||
|
||||
# 处理当前组员工的休息日
|
||||
for record in employee_records:
|
||||
if record.employee_id: # 检查 employee_id 是否存在
|
||||
if record.employee_id:
|
||||
resource_id = record.employee_id.resource_id.id
|
||||
weekday_number = weekday_mapping.get(record.regular_holidays) # 确保 regular_holidays 字段存在
|
||||
weekday_number = weekday_mapping.get(record.regular_holidays)
|
||||
if resource_id not in ever_holidays:
|
||||
ever_holidays[resource_id] = []
|
||||
if weekday_number is not None: # 检查weekday_number是否有效
|
||||
@@ -85,8 +85,8 @@ class YuthonShiftPlanning(models.Model):
|
||||
while current_date < end_date:
|
||||
for role_index in role_order:
|
||||
for _ in range(self.number_of_shifts):
|
||||
employee = record.employee_id # 获取employee对象
|
||||
resource_id = employee.resource_id.id # 获取 resource_id
|
||||
employee = record.employee_id
|
||||
resource_id = employee.resource_id.id
|
||||
current_weekday = current_date.weekday()
|
||||
if resource_id in ever_holidays and current_weekday in ever_holidays[resource_id]:
|
||||
pass # 跳过休息日
|
||||
|
||||
@@ -79,18 +79,18 @@
|
||||
</group>
|
||||
<group col="2">
|
||||
<group string="产权信息">
|
||||
<field name="owner_id"/>
|
||||
<field name="title_certificate"/>
|
||||
<field name="equity_area"/>
|
||||
<field name="management_area"/>
|
||||
<field name="building_area"/>
|
||||
<field name="owner_id" readonly="1"/>
|
||||
<field name="title_certificate" readonly="1"/>
|
||||
<field name="equity_area" readonly="1"/>
|
||||
<field name="management_area" readonly="1"/>
|
||||
<field name="building_area" readonly="1"/>
|
||||
</group>
|
||||
<group string="管理信息">
|
||||
<field name="yuthon_company"/>
|
||||
<field name="tenure_type"/>
|
||||
<field name="precinct_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="purpose_id"/>
|
||||
<field name="yuthon_company" readonly="1"/>
|
||||
<field name="tenure_type" readonly="1"/>
|
||||
<field name="precinct_id" readonly="1"/>
|
||||
<field name="admin_id" readonly="1"/>
|
||||
<field name="purpose_id" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
@@ -235,9 +235,10 @@
|
||||
<filter name="group_purpose" string="资产用途" context="{'group_by': 'purpose_id'}"/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="yuthon_company" enable_counters="1"/>
|
||||
<field name="tenure_type" enable_counters="1"/>
|
||||
<field name="referred_id" enable_counters="1"/>
|
||||
<field name="precinct_id" string="所属片区" enable_counters="1"/>
|
||||
<field name="title_address" string="产权地址" enable_counters="1"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -20,7 +20,7 @@ class PropertyHandoverLine(models.Model):
|
||||
|
||||
property_handover_id = fields.Many2one('property.handover', string="审批信息")
|
||||
property_id = fields.Many2one('yuthon.property', string="关联物业信息")
|
||||
property_address = fields.Text(related='property_id.address',string="物业地址")
|
||||
property_address = fields.Char(related='property_id.name',string="物业地址")
|
||||
is_affirmation = fields.Boolean(related='property_id.is_confirm_authorization',string="是否确权")
|
||||
owner = fields.Many2one(related='property_id.owner_id',string="权属人")
|
||||
title_number = fields.Char(string="产权编号")
|
||||
|
||||
@@ -16,7 +16,7 @@ class PropertyInformation(models.Model):
|
||||
property_documents_ids = fields.Many2many('documents.document', string="物业信息文件")
|
||||
|
||||
|
||||
original_property_id = fields.Many2one('property.information', string="关联物业管理变更审批")
|
||||
original_property_id = fields.Many2one('property.management', string="关联物业管理变更审批")
|
||||
property_name = fields.Char(string="物业名称")
|
||||
company_id = fields.Many2one('res.company', string="所属公司")
|
||||
admin_id = fields.Many2one('res.users', string="管理员")
|
||||
|
||||
@@ -13,8 +13,6 @@ class PropertyManagement(models.Model):
|
||||
name = fields.Char(string='标题')
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('property_management_code'))
|
||||
effective_start_date = fields.Date(string="生效开始日期")
|
||||
effective_end_date = fields.Date(string="生效结束日期")
|
||||
reason_change = fields.Char(string="变更事由")
|
||||
handling_opinions = fields.Text(string="经办意见")
|
||||
original_property_ids = fields.One2many('property.information', 'original_property_id', string="原物业信息")
|
||||
|
||||
@@ -8,7 +8,7 @@ class PropertyOfflineRegistration(models.Model):
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].
|
||||
next_by_code('property_offline_registration_code'))
|
||||
property_id = fields.Many2one('yuthon.property',string='物业名称')
|
||||
address = fields.Text(related='property_id.address',string='物业地址')
|
||||
address = fields.Char(related='property_id.name',string='物业地址')
|
||||
area = fields.Float(related='property_id.actual_area',string='面积(m²)')
|
||||
rental_price = fields.Float(string='租金底价(元/m²)')
|
||||
monthly_rent = fields.Float(string='月租金(元)')
|
||||
|
||||
@@ -6,7 +6,7 @@ class PropertyRentalConditions(models.Model):
|
||||
_description = '出租调整表'
|
||||
|
||||
property_id = fields.Many2one('yuthon.property',string='物业名称')
|
||||
address = fields.Text(related='property_id.address',string='物业地址')
|
||||
address = fields.Char(related='property_id.name',string='物业地址')
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].
|
||||
next_by_code('property_rental_conditions_code'))
|
||||
registered_use = fields.Char(related='property_id.registered_use',string='证载用途')
|
||||
|
||||
@@ -20,7 +20,7 @@ class PropertyRentalFormLine(models.Model):
|
||||
|
||||
property_rental_form_id = fields.Many2one('property.rental.form', string="关联出租申报表")
|
||||
property_id = fields.Many2one('yuthon.property', string='物业名称', required=True)
|
||||
property_address = fields.Text(related='property_id.address', string='物业地址')
|
||||
property_address = fields.Char(related='property_id.name', string='物业地址')
|
||||
registered_use = fields.Char(related='property_id.registered_use', string='证载用途')
|
||||
evaluation_area = fields.Float(related='property_id.evaluation_area', string='出租面积(m²)')
|
||||
current_status = fields.Date(related='property_id.current_status', string='租聘到期日')
|
||||
|
||||
@@ -17,28 +17,20 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="物业管理变更申请表">
|
||||
<sheet>
|
||||
<field name="code"/>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" required="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="effective_start_date"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="reason_change"/>
|
||||
<field name="effective_end_date"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="reason_change"/>
|
||||
<field name="handling_opinions"/>
|
||||
</group>
|
||||
<group string="原物业信息">
|
||||
<field name="original_property_ids" string=" ">
|
||||
<tree editable="bottom">
|
||||
<tree editable="bottom">
|
||||
<field name="original_property_id" column_invisible="1"/>
|
||||
<field name="property_name"/>
|
||||
<field name="company_id"/>
|
||||
@@ -46,18 +38,18 @@
|
||||
<field name="precinct"/>
|
||||
<field name="management_type"/>
|
||||
<field name="property_id"/>
|
||||
</tree>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="新物业信息">
|
||||
<field name="new_property_ids" string=" ">
|
||||
<tree editable="bottom">
|
||||
<tree editable="bottom">
|
||||
<field name="new_property_id" column_invisible="1"/>
|
||||
<field name="new_company"/>
|
||||
<field name="new_admin"/>
|
||||
<field name="new_precincts"/>
|
||||
<field name="new_management_type"/>
|
||||
</tree>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
Reference in New Issue
Block a user