[英]How can we add filter on kanban item view in odoo ?
我在odoo 10中工作,我必須在看板視圖中控制對項目的訪問。 例如,在客戶看板視圖中,我想向一個用戶顯示所有客戶,但該用戶只能打開那些對他有影響的客戶。
受我的用戶影響的客戶(演示)= 5
所有客戶= 20
在看板視圖中,我們希望顯示20個客戶,但演示僅打開5個客戶,而他無權訪問15個客戶。
為此,您可以執行以下邏輯,因為要花很多時間,所以我不會編寫代碼:
1 - create a new window action to show the clients in canban view only or list too
because the original action show the records in all views.
2- create a new kanban view or edit that one to add a button when user click
on that button call a method on the model check if the user is allowed
to open the client if Ok open the record in form view or else show error:
這是唯一的方法,因為如果您在操作中指定表單視圖,則用戶可以隨時更改視圖,因此您應該將其從操作中刪除。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.