diff --git a/.gitignore b/.gitignore
index e5f2f21ae..3e7bf49aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@ share/python-wheels/
./.idea
.idea
.idea/*
+.pyc
*.pyc
.DS_STORE
.vscode
diff --git a/yuthon_property/views/property_meter_archives_views.xml b/yuthon_property/views/property_meter_archives_views.xml
index 9aa46a9b5..cc6f331c1 100644
--- a/yuthon_property/views/property_meter_archives_views.xml
+++ b/yuthon_property/views/property_meter_archives_views.xml
@@ -88,7 +88,8 @@
meter.archives.line
-
+
+
diff --git a/yuthon_property/views/property_meter_water_views.xml b/yuthon_property/views/property_meter_water_views.xml
index 214315275..f0d6d7bdc 100644
--- a/yuthon_property/views/property_meter_water_views.xml
+++ b/yuthon_property/views/property_meter_water_views.xml
@@ -10,6 +10,7 @@
+
diff --git a/yuthon_property/wizard/electric_water_wizard.py b/yuthon_property/wizard/electric_water_wizard.py
index 121122fe2..3e0b6b466 100644
--- a/yuthon_property/wizard/electric_water_wizard.py
+++ b/yuthon_property/wizard/electric_water_wizard.py
@@ -47,7 +47,7 @@ class ElectricWaterWizard(models.TransientModel):
# 查找上个月的记录,上次用量,上次读数,上次抄表日期
last_month_line = water.line_ids.search([('meter_date', '<', self.push_date)]).sorted('meter_date')[-1]
# 如果当前数据不存在,则新建任务,按照天的纬度
- self_month_line = water.line_ids.search([('meter_date', '=', self.push_date)])
+ self_month_line = water.line_ids.search([('meter_date', '=', self.push_date), ('water_id', '=', water.id)])
if not self_month_line:
water.line_ids.create({
'water_id': water.id,
@@ -55,7 +55,6 @@ class ElectricWaterWizard(models.TransientModel):
'last_read': last_month_line.last_read,
'last_dosage': last_month_line.last_dosage,
'meter_date': self.push_date,
-
'epitope_values_id': water.epitope_values_id.id,
'lessee_id': water.lessee_id.id,
'yuthon_property_ids': [(6, 0, water.yuthon_property_ids.ids)],
diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py
index c9cc336a1..a6611cb8e 100644
--- a/yuthon_salary/models/inherit_hr_payslip.py
+++ b/yuthon_salary/models/inherit_hr_payslip.py
@@ -397,7 +397,7 @@ class InheritHrPayslip(models.Model):
employee_id = self.env['hr.employee'].search([('id', '=', vals['employee_id'])])
payroll = self.env['hr.contract'].search([('employee_id', '=', employee_id.id), ('state', '=', 'open')])[-1].structure_type_id.default_struct_id
if payroll.rule_ids.search([('name', '=', '基本工资'), ('struct_id', '=', payroll.id)]):
- base_salary = payroll.rule_ids.search([('name', '=', '基本工资'), ('struct_id', '=', payroll.id)]).amount_fix
+ base_salary = payroll.rule_ids.search([('name', '=', '基本工资'), ('struct_id', '=', payroll.id)])[-1].amount_fix
# if record.worked_days_line_ids.search([('name', '=', '工会会费')]):
# record.line_ids.search([('name', '=', '工会会费')]).total = round(abs(base_salary * 0.005) * -1, 2)
record.write({'union_dues': round(abs(base_salary * 0.005) * -1, 2)})