diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 28399847c..fcd144827 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -99,6 +99,7 @@ + diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index 338ee52d5..8de00717a 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -60,28 +60,6 @@ class PropertyRentalWizard(models.Model): "year": self.select_year, "month": self.select_month, }) - if not rent_id: - self.sudo().env["property.rent.list"].create({ - "contract_id": record.id, - "due_date": start_date, - 'multiplier':multiplier, - "lessee_id": record.lessee_id.id, - "property_id": property_id, - "original_amount": rent_amount, - "year": self.select_year, - "month": self.select_month, - }) - else: - rent_id.write({ - "contract_id": record.id, - "due_date": start_date, - 'multiplier': multiplier, - "lessee_id": record.lessee_id.id, - "property_id": property_id, - "original_amount": rent_amount, - "year": self.select_year, - "month": self.select_month, - }) def create_water_fee_list(self, record): """封装创建水费记录的逻辑""" diff --git a/yuthon_salary/wizard/salary_compute_wizard.py b/yuthon_salary/wizard/salary_compute_wizard.py index 74582104f..958cf637b 100644 --- a/yuthon_salary/wizard/salary_compute_wizard.py +++ b/yuthon_salary/wizard/salary_compute_wizard.py @@ -55,8 +55,8 @@ class SalaryComputeWizard(models.Model): ('contract_id.termination_date', '=', False), ('contract_id.date_end', '=', False) ]) - # self.employee_ids = [(6, 0, employees.ids)] - # self.employee_number = len(employees) + self.employee_ids = [(6, 0, employees.ids)] + self.employee_number = len(employees) # for employee in employees: # print(f"员工姓名: {employee.name}")