Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
1925 Tampilan

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
Buang
Jawaban Terbai


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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Mar 24
1694
1
Apr 24
1156
1
Apr 24
3299
1
Okt 23
1558
1
Jul 23
2476