Skip to Content
Menu
This question has been flagged
1 Reply
507 Views

Can I hide the "Mark as Done" button in the Manufacturing application for specific users? I mean is this option found in Odoo 15 or I need to create a group?

Avatar
Discard
Best Answer

Hi,

You can create a new user group and set the created group for the button, so that the visibility of the button will be restricted to the users in the group.


Thanks and Regards

Walnut Software Solutions

Avatar
Discard
Author

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="view_stock_picking_form_inherit" model="ir.ui.view">
<field name="name">mrp.production.form.inherit</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='button_mark_done']" position="attributes">
<attribute name="attrs">{'groups':
'mark_as_done_manufacturing_restriction.group_hide_mark_as_done_button', 'invisible': [('state',
'in', ('confirmed', 'progress'))]}
</attribute>
</xpath>
</field>
</record>

</data>
</odoo>

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>

<record id="group_hide_mark_as_done_button" model="res.groups">
<field name="name">Display Mark As Done Button</field>
</record>

</data>
</odoo>

This is the group and the record in the view file, Is there anything wrong with it? Cause it is not working

Related Posts Replies Views Activity
2
Dec 24
45
1
Dec 24
54
1
Dec 24
50
0
Dec 24
29
0
Dec 24
45