콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
823 화면

Hello,

When i click on Inventory module, i've got all warehouses displayed.

I want a default filter to display only stock.picking.type whose warehouse_id = the default warehouse (property_warehouse_id) of the current user

I tried to add the following filter in the search view but it doesn't work

filter string="Mon Entrepôt" name="my_warehouse" domain="[('warehouse_id', '=', user.property_warehouse_id.id)]"


I tried to change user with uid, to add .id at the end or not, but nothing works

Is anybody has an idea ?

아바타
취소
베스트 답변

It is possible to do this in Odoo Studio?

  1. Creating the custom field (ManyToMany)
  2. How has to be the domain? 

​I try with [('stock.picking.type.warehouse_id.x_studio_warehouse_users.id', '=' , user_id.id)] and does not work.


Cheers

아바타
취소
베스트 답변

You need to add custom fields(res.users) on the stock picking type and I’ve already implemented them for me. I will share the details with you for review. You can try it on your side, I hope this will be helpful.

// PYTHON CODE

// Search View Code

// Action Context Pass Value

아바타
취소
베스트 답변

Hi Vincent, 

I am also met with the same challenge as per your question. 

May I know whether you have found a solution for this?

Thank you.

아바타
취소