تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1924 أدوات العرض

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.


الصورة الرمزية
إهمال
أفضل إجابة


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



الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مارس 24
1694
1
أبريل 24
1156
1
أبريل 24
3299
1
أكتوبر 23
1558
1
يوليو 23
2476