日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

odoo中的filtered_domain

發布時間:2024/9/30 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 odoo中的filtered_domain 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在使用第一次篩選后的數據集后

后續再用第一次的結果再次進行篩選

從第二次開始篩選時,就用filtered_domain

search_data = self.env['assets.header.common.info'].search([['company_id', '=', self.company_id.id],['asset_type', '!=', 'low_value']]) # 符合公司的、不等于低值的if len(search_data) != 0:if self.asset_type and len(search_data) != 0:search_data = search_data.filtered_domain([['asset_type', '=', self.asset_type]])if self.asset_class and len(search_data) != 0:search_data = search_data.filtered_domain([['asset_category_id', 'in', self.asset_class.ids]])if self.admin_dept_id and len(search_data) != 0:search_data = search_data.filtered_domain([['admin_dept_id', 'in', self.admin_dept_id.ids]])search_data_result = search_data.filtered_domain([['usage_status', '=', 'running'],['depreciation_method', '!=', 'no_depreciation'],['depreciation_times', '>', 0],['depreciation_convention', '=', 'next_month']])print(search_data_result)if len(search_data_result) != 0:# 排除掉入賬日期屬于參數所選折舊期間search_data_result = search_data_result.filtered_domain(['|',['record_date', '<', self.period_id.start_date],['record_date', '>', self.period_id.end_date]])

總結

以上是生活随笔為你收集整理的odoo中的filtered_domain的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。