Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
1927 Представления

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



Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мар. 24
1695
1
апр. 24
1158
1
апр. 24
3306
1
окт. 23
1558
1
июл. 23
2491