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

I have a problem that I have two different trees for buyers and sellers, but for some reason only the buyer tree is displayed.

Moreover, if you go to edit action in the debug menu, the seller tree will be displayed in the seller tab, and the buyer tree will be displayed in the buyer tab, but for some reason the system shows only the buyer tree.


Here is my code:

id="onova_seller_tree" model="ir.ui.view">
name="name">Seller list
name="model">res.partner
name="priority">30
name="inherit_id" ref="base.view_partner_tree"/>
name="arch" type="xml">
expr="//tree" position="replace">
default_order='create_date desc'>
name="create_date" string="Registration date" optional="show"/>
name="id_site" optional="show"/>
name="display_name" string="Contact" optional="show"/>
name="email" string="E-mail" optional="show"/>
name="phone" class="o_force_ltr" string="Phone number" optional="show"/>
name="sale_request_count" optional="show"/>
name="is_partner" optional="show"/>
name="is_object_partner" optional="show"/>





id="onova_buyer_tree" model="ir.ui.view">
name="name">Buyer list
name="model">res.partner
name="priority">40
name="inherit_id" ref="base.view_partner_tree"/>
name="arch" type="xml">
expr="//tree" position="replace">
default_order='create_date desc'>
name="create_date" string="Registration date" optional="show"/>
name="id_site" optional="show"/>
name="display_name" string="Contact" optional="show"/>
name="email" string="E-mail" optional="show"/>
name="phone" class="o_force_ltr" string="Phone number" optional="show"/>
name="buy_request_count" optional="show"/>





id="onova_sellers_action_window" model="ir.actions.act_window">
name="name">Sellers
name="res_model">res.partner
name="view_mode">tree,form
name="domain">[('is_seller','=',True)]
name="search_view_id" ref="onova_seller_search"/>


id="action_seller_view_tree" model="ir.actions.act_window.view">
name="sequence" eval="2"/>
name="view_mode">tree
name="view_id" ref="onova_seller_tree"/>
name="act_window_id" ref="onova_sellers_action_window"/>


id="onova_buyer_action_window" model="ir.actions.act_window">
name="name">Buyers
name="res_model">res.partner
name="view_mode">tree,form
name="domain">[('is_buyer','=',True)]


id="action_buyer_view_tree" model="ir.actions.act_window.view">
name="sequence" eval="2"/>
name="view_mode">tree
name="view_id" ref="onova_buyer_tree"/>
name="act_window_id" ref="onova_buyer_action_window"/>

아바타
취소
작성자

I don't understand why my tags disappeared, so I pasted the code to pastebin: https://pastebin.com/RXSFgLdi

베스트 답변

Hello Denis, did you try to add a groups attribute in the tree view that replaces the origin tree view.

like 

groups='purchase.group_purchase_user'

Hope it would be helpful & regards.

아바타
취소
작성자

I don't really understand how to do it
can you show an example etc.?
thank you

Sry,the code disappeared.
You can try to add this attribute in the tree tag.
Regards.

작성자

I don't think I've made myself clear enough
I don't want a certain group to see one tree and another group to see another
I have two menu items "buyers" and "sellers" and I want each tab to have its own tree
Sorry for the confusion and thank you for your help

You can try the 'sheet' and 'page' tag
It would be helpful to refer the purchase module, purchase.purchase_view.xml, line 209.
Regards.

관련 게시물 답글 화면 활동
0
1월 21
5083
0
3월 23
2283
1
10월 21
4172
1
2월 19
7639
0
6월 23
2774