Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1911 Lượt xem

Hello, i'm new with odoo15

Can some one help me please?
Here the case, i have 1 admin and 1 owner. Then i want owner only can see the margin and total margin from the sales list view.  Can some one show me how to do that? I'm very grateful if show me step by step. Thank you for your time.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất


Hi Rudy,


By defining owner groups for the field margin and margin total will solve your issue.


Try this in your xml file:


<record id="view_sale_order_form_inherit" model="ir.ui.view">


        <field name="name">sale.order.form.inherit</field>


        <field name="model">sale.order</field>


        <field name="inherit_id" ref="sale.view_order_form"/>


        <field name="arch" type="xml">


            <xpath expr="//field[@name='order_line']//tree/field[@name='margin']" position="attributes">


                <attribute name="groups">your_owner_group</attribute>


            </xpath>


</field>


</record>




If you don't have seperate groups for owner and admin, try by creating a new group for owner


For more info: https://www.youtube.com/watch?v=3JsCu8_Dj3I


Thank you



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 24
1693
1
thg 4 24
1152
1
thg 4 24
3278
1
thg 10 23
1557
1
thg 7 23
2467