流程查询
diff --git a/yuthon_report/models/current_receivable_rent_report.py b/yuthon_report/models/current_receivable_rent_report.py
index 349362f2f..ded5be19b 100644
--- a/yuthon_report/models/current_receivable_rent_report.py
+++ b/yuthon_report/models/current_receivable_rent_report.py
@@ -63,13 +63,7 @@ class CurrentReceivableRentReport(models.Model):
for idx, rec in enumerate(receivables, start=1):
amt = rec.original_amount or 0.0
- # 从property.rent.list中获取税率
- rent_list = self.env['property.rent.list'].search([
- ('lessee_id', '=', rec.lessee_id.id if rec.lessee_id else False),
- ('property_id', 'in', rec.property_ids.ids if rec.property_ids else []),
- ('due_date', '=', rec.due_date),
- ], limit=1)
- tax_rate = rent_list.tax if rent_list else (rec.tax or 0.0)
+ tax_rate = rec.tax or 0.0
amt_nt = amt / (1 + tax_rate / 100) if tax_rate else amt
total_amount += amt
total_amount_nt += amt_nt
diff --git a/yuthon_report/static/src/components/yuthon_report/receivable_report.js b/yuthon_report/static/src/components/yuthon_report/receivable_report.js
index b01aea3e7..54d4651f8 100644
--- a/yuthon_report/static/src/components/yuthon_report/receivable_report.js
+++ b/yuthon_report/static/src/components/yuthon_report/receivable_report.js
@@ -1,4 +1,4 @@
-/** @odoo-module1 **/
+/** @odoo-module **/
import {registry} from "@web/core/registry";
@@ -158,6 +158,14 @@ class ReceivableReport extends Component {
async onUpdateCompany(v) {
console.log(v)
+ // 检查v是否为空或v[0]不存在
+ if (!v || !v[0]) {
+ this.state.selectCompany = {};
+ this.state.selectPartner = {};
+ this.state.domainUsers = [];
+ await this.onSearch();
+ return;
+ }
// 执行一次 查询
// 通过 read 重新查询一次, 更多只返回了 id
let values = await this.serviceOrm.call(
diff --git a/yuthon_report/static/src/components/yuthon_report/receivable_report.xml b/yuthon_report/static/src/components/yuthon_report/receivable_report.xml
index 14cd14a6a..4c8627c3d 100644
--- a/yuthon_report/static/src/components/yuthon_report/receivable_report.xml
+++ b/yuthon_report/static/src/components/yuthon_report/receivable_report.xml
@@ -51,9 +51,11 @@
diff --git a/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss b/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss
index b48b3cd88..3847f6bd2 100644
--- a/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss
+++ b/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss
@@ -23,4 +23,9 @@
}
.stat-change {
font-size: 0.9rem;
+ }
+
+ /* 下拉框placeholder样式 */
+ #formview_default_conditions option[value=""] {
+ color: #6c757d;
}
\ No newline at end of file
diff --git a/yuthon_salary/controllers/salary_phone.py b/yuthon_salary/controllers/salary_phone.py
index 226e1be6a..477bf3cea 100644
--- a/yuthon_salary/controllers/salary_phone.py
+++ b/yuthon_salary/controllers/salary_phone.py
@@ -66,16 +66,16 @@ class YuthonWillTask(http.Controller):
users_id = int(kw.get('users_id'))
user = request.env['res.users'].sudo().browse(int(users_id))
employee_id = user.with_company(user.company_id.id).employee_id.id
- records = request.env['hr.payslip'].sudo().search([('employee_id', '=', employee_id)])
+ records = request.env['yuthon.salary.active'].sudo().search([('employee_id', '=', employee_id)])
data = {}
for record in records:
- year = record.date_from.year
- month = record.date_from.month
+ year = int(record.select_year)
+ month = int(record.select_time)
if year not in data.keys():
data[year] = {'total': 0}
if month not in data[year].keys():
- data[year][month] = {'total': record.actual_salary}
- data[year]['total'] += record.actual_salary
+ data[year][month] = {'total': record.actual_paid_salary}
+ data[year]['total'] += record.actual_paid_salary
return json.dumps({'data': data, 'code': 200, 'message': ''})
@http.route('/phone/salary/self/detail', type='http', auth="none", csrf=False, cors='*')
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index fb82d3c0f..d35477197 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -752,7 +752,7 @@
-
+
@@ -762,7 +762,7 @@
-
+