How do Restrict Users to show their own Entries only?
28 January, 2023 by
Umme Huzaifa
| No comments yet

Use a domain filter using [('user_id', '=', uid)]

Here is an example below:

<record model="ir.actions.act_window" id="purchase_order_action">

            <field name="name">Purchase Requisition</field>

            <field name="res_model">purchase.req</field>

            <field name="view_mode">tree,form</field>

            <field name="context">{}</field>

            <field name="domain">[('user_id', '=', uid)]</field>

            <field name="help" type="html">

                <p class="o_view_nocontent_smiling_face">Create the First Purchase Requisition !

                </p>

            </field>

   </record>


By using this domain users will only be able to see their own entries only.

Umme Huzaifa
28 January, 2023
Share this post
Archive
Sign in to leave a comment