Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
3316 Переглядів

I want to hide the highlighted part (Actions)in odoo17 community edition 
what are possibilities ? 
so that user cannot create new company or can export or import any record related to companies.


Аватар
Відмінити
Найкраща відповідь

Hi,


To block importing and creating of records, You can just give import="0" or import="false"  and create = "false" in the tree view XML code.

Example:
<tree create="false" import="false">

</tree>


Inherit tree view of the company model and add this attribute, You can use following code,


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

<odoo>
<templates id="template">
     <record id="view_company_tree" model="ir.ui.view">
<field name="name">res.company.inherited.form.view</field>
<field name="model">res.company</field>
        <field name="inherit_id" ref="base.view_company_tree"/>
        <field name="arch" type="xml">
            <xpath expr="//tree" position="attributes">
                <attribute name="create">0</attribute>
                <attribute name="import">0</attribute>
            </xpath>
        </field>
     </record>

</odoo>



Hope it helps,

Аватар
Відмінити
Найкраща відповідь

Normal users will not have access to create companies.  It only applies to the Access Rights group 



You can block users from exporting data in the user setup (though this applies to all Models)



Аватар
Відмінити
Найкраща відповідь

Nice

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
бер. 24
1749
4
трав. 25
9652
2
груд. 24
6615
3
квіт. 24
6195
1
січ. 24
4114