Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
3350 มุมมอง

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
1763
4
พ.ค. 25
9719
2
ธ.ค. 24
6658
3
เม.ย. 24
6244
1
ม.ค. 24
4152