Skip to Content
मेन्यू
This question has been flagged
1 Reply
1929 Views

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.


Avatar
Discard
Best Answer


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



Avatar
Discard
Related Posts Replies Views Activity
0
मार्च 24
1695
1
अप्रैल 24
1158
1
अप्रैल 24
3306
1
अक्तू॰ 23
1558
1
जुल॰ 23
2491