Commit 02074aa0 by 夏超

[fix] 玖姿收入支出添加类型字段

parent 445041dc
......@@ -95,12 +95,15 @@ class ProductIncomeExpenseIframe(http.Controller):
start_date = kwargs.get("start_date", "")
end_date = kwargs.get("end_date", "")
type_str = kwargs.get("type_str", False) # income收入/expenditure支出
machinery_type = kwargs.get("machinery_type", False) # income收入/expenditure支出
domain = []
if start_date and end_date:
domain.append(("business_date", ">=", start_date))
domain.append(("business_date", "<=", end_date))
if type_str:
domain.append((type_str, ">", 0.0))
if machinery_type:
domain.append(("machinery_type", "=", machinery_type))
data_list = _self.env["roke.product.income.expense"].sudo().search(domain, order="business_date desc, create_date desc")
data = []
for v in data_list:
......
......@@ -324,6 +324,7 @@
formData.append("start_date", this.datePickerValue[0]);
formData.append("end_date", this.datePickerValue[1]);
formData.append("type_str", this.select_value);
formData.append("machinery_type", this.machinery_type_value);
axios.post("/roke/product/product_income_expense/export",
formData,
_config,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment