diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml index 6d164f9ef..ae5e2bae5 100644 --- a/soong_workflow/views/soong_workflow_record.xml +++ b/soong_workflow/views/soong_workflow_record.xml @@ -23,8 +23,8 @@ - - + + diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py index 00c78debb..505544c31 100644 --- a/yuthon_property/models/property_meter_archives.py +++ b/yuthon_property/models/property_meter_archives.py @@ -19,6 +19,7 @@ class PropertyMeterArchives(models.Model): lessee_id = fields.Many2one('property.tenant.information', string='承租方', store=True, compute='_compute_lessee_id') employee_ids = fields.Many2many('hr.employee', string='抄表人') epitope_values = fields.Char(string='表位置') + epitope_values_id = fields.Many2one('yuthon.epitope.values', string='表位置') other = fields.Char(string='其他') unit = fields.Float(string='当月单价') archives_state = fields.Selection([('stop', '停用'), ('use', '正常'), ('rent', '出租')], string='状态', compute='_compute_archives_state', store=True, default='use') diff --git a/yuthon_property/models/property_meter_water.py b/yuthon_property/models/property_meter_water.py index 591aebbf9..a584c20aa 100644 --- a/yuthon_property/models/property_meter_water.py +++ b/yuthon_property/models/property_meter_water.py @@ -136,6 +136,7 @@ class MeterWaterLine(models.Model): end_time = fields.Date(string="拆除日期") water_state = fields.Selection([('stop', '停用'), ('use', '使用'), ('rent', '出租')], string='状态') state = fields.Selection([('reading', '已抄'), ('unreading', '未抄')], string='抄表状态', default='unreading') + epitope_values_id = fields.Many2one('yuthon.epitope.values', string='表位置') remarks = fields.Text(string='备注') employee_ids = fields.Many2many('hr.employee', string='抄表人') maximum_count = fields.Integer(string='最大位数') diff --git a/yuthon_property/models/property_tariff_list.py b/yuthon_property/models/property_tariff_list.py index 7ed2cb876..40c66349d 100644 --- a/yuthon_property/models/property_tariff_list.py +++ b/yuthon_property/models/property_tariff_list.py @@ -5,8 +5,6 @@ class PropertyTariffList(models.Model): _name = 'property.tariff.list' _description = '电费列表' - property_id = fields.Many2one('yuthon.property', string='物业') - admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员", store=True) lessee_id = fields.Many2one('property.tenant.information', string='承租方') tariff_meter_number = fields.Char(string='电费编号') due_date = fields.Date(string='应收日期') diff --git a/yuthon_property/models/property_water_list.py b/yuthon_property/models/property_water_list.py index 085f95f16..dbfd36580 100644 --- a/yuthon_property/models/property_water_list.py +++ b/yuthon_property/models/property_water_list.py @@ -5,9 +5,7 @@ class PropertyWaterList(models.Model): _name = 'property.water.list' _description = '水费列表' - property_id = fields.Many2one('yuthon.property', string='物业') lessee_id = fields.Many2one('property.tenant.information', string='承租方') - admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员", store=True) water_meter_number = fields.Char(string='水表编号') due_date = fields.Date(string='应收日期') water_meter_reading = fields.Float(string='水表读数') diff --git a/yuthon_property/views/property_tariff_list_views.xml b/yuthon_property/views/property_tariff_list_views.xml index 997cee1bd..668c49b96 100644 --- a/yuthon_property/views/property_tariff_list_views.xml +++ b/yuthon_property/views/property_tariff_list_views.xml @@ -6,7 +6,6 @@ - diff --git a/yuthon_property/views/property_water_list_views.xml b/yuthon_property/views/property_water_list_views.xml index 5241ee273..8bbfb0263 100644 --- a/yuthon_property/views/property_water_list_views.xml +++ b/yuthon_property/views/property_water_list_views.xml @@ -6,7 +6,6 @@ - diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 71eba1545..b4f33c417 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -820,6 +820,8 @@ class PropertyTariffList(models.Model): _inherit = 'property.tariff.list' contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") + admin_id = fields.Many2one(related='contract_id.admin_id', string="片区管理员", store=True) + property_name = fields.Char(related='contract_id.property_name', string="物业信息", store=True) def push_tariff(self): for rec in self: @@ -856,6 +858,8 @@ class PropertyWaterList(models.Model): _inherit = 'property.water.list' contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") + admin_id = fields.Many2one(related='contract_id.admin_id', string="片区管理员", store=True) + property_name = fields.Char(related='contract_id.property_name', string="物业信息") def push_water(self): for rec in self: diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index a353652c5..f089412b8 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -69,7 +69,7 @@ class PropertyLeaseContract(models.Model): rent_company = fields.Char(related='lessor_id.name', string="收租公司名称") rent_account = fields.Char(related='lessor_id.rent_account', string="收租公司账号") users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user) - department_id = fields.Many2one('hr.department', string="部门", store=True, compute='_compute_admin_id') + department_id = fields.Many2one('hr.department', string="部门", default= lambda self: self.env.user.department_id) company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") # 承租方的个人信息 lessee_id = fields.Many2one('property.tenant.information', string='承租方') @@ -270,7 +270,6 @@ class PropertyLeaseContract(models.Model): for record in self: if record.lease_ids: record.admin_id = record.lease_ids[0].address_id.admin_id.id - record.department_id = record.lease_ids[0].address_id.admin_id.department_id.id def contract_signature(self): return { @@ -399,8 +398,8 @@ class PropertyLeaseContract(models.Model): 'actual_start_time': contract.term_start_time, 'actual_end_time': contract.term_end_time, 'work_end': True}) + contract.get_property_contract_time() self._update_contract_lines(contract) - logs_to_update = self.env["soong.workflow.log"].search([ ("model", "=", self._name), ("res_id", "=", contract.id), diff --git a/yuthon_property_approval/models/property_lease_renewal.py b/yuthon_property_approval/models/property_lease_renewal.py index 5880ae057..4412a1b05 100644 --- a/yuthon_property_approval/models/property_lease_renewal.py +++ b/yuthon_property_approval/models/property_lease_renewal.py @@ -84,6 +84,7 @@ class PropertyLeaseRenewal(models.Model): else: rec.contract_id.write({ 'actual_end_time': rec.early_quitting_date}) + rec.contract_id.get_property_contract_time() rec.hide = True @api.onchange('contract_id', 'renewal_type') diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml index e4ac55a99..36bdc4e71 100644 --- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml +++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml @@ -153,13 +153,13 @@ property.tariff.list - + - + @@ -176,8 +176,10 @@