Hi, i'm trying to hide the "new" button in sales order and quotation for all groups except to those who have settings rights. As you can see i tried "(Note: i also tried to override "web.ListView.Buttons" view and give the button a group but also it did not work)
Settings-rights are so defined:
<recordmodel="res.groups"id="group_system"><fieldname="name">Settingsfield><fieldname="implied_ids"eval="[Command.link(ref('group_erp_manager')), Command.link(ref('group_sanitize_override'))]"/><fieldname="users"eval="[Command.link(ref('base.user_root')), Command.link(ref('base.user_admin'))]"/>record>
I wrote the following:
sale.order.tree.customizationfield>sale.orderfield>0attribute>xpath>field>record>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Create a Custom Module: If you don't have a custom module yet, create one using Odoo's module structure.
Define an XML View: In your custom module, define an XML view that will inherit from the original sales order tree view and modify it.
record id="view_sale_order_tree_inherit" model="" rel="ugc">ir.ui.view">
field name="name">sale.order.tree.customization
field name="model">sale.order
field name="inherit_id" ref="sale.view_order_tree"/>
field name="arch" type="xml">
xpath expr="//button[@name='create']" position="attributes">
attribute name="groups">base.group_erp_manager,base.group_sanitize_override
/xpath>
/field>
/record>
this example, we're inheriting the original sale.view_order_tree view and modifying it by adding the groups attribute to the "New" button. This means the button will be visible only to users in the base.group_erp_manager and base.group_sanitize_override groups.
Activate the Custom Module: Make sure your custom module is installed and activated.
Update Permissions: Ensure that the users who should have access to the "New" button are assigned to the base.group_erp_manager and base.group_sanitize_override groups.
After implementing these steps, the "New" button should be visible only to users in the specified groups with the appropriate settings rights. Other users will not see the button.
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar