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

hi there,

someone know how to hide export button in a tree view?

อวตาร
ละทิ้ง

Hello ,

where you want to hide export from action menu?

คำตอบที่ดีที่สุด

Hello @Eduardo
You can check following link for solution of your problem. web_disable_export_group


If you want to hide Export All button on the top-up header and next to the create method for some views only then follow below step.

<tree string="Account"  export_xlsx="false" create="false">

But if you're using the web_disable_export_group and Did you uncheck the Export Button security group then for that user they are not able to see that Export All button for any views. Reference:- https://github.com/OCA/web/pull/1908

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello @Eduardo, You can check following link for solution of your problem. 

https://www.odoo.com/apps/modules/10.0/web_disable_export_group/
https://www.odoo.com/apps/modules/11.0/web_disable_export_delete_button/

i hope it will help you.

 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Another Solution is to update the web module and only show the "Export" action if the user has "Delete" role, or just completely remove the function. TESTED in Version 12.

Go to your Odoo installation,

addons => web => static => src => js => views => list => list_controller.js

Edit the file and update the renderSidebar function to match the following:

//////Remove the Export function from the other block.

var other = [];

/////Add the Export function to the is_action_enabled block, or delete it if you want nobody to have export capability.

if (this.is_action_enabled('delete')) {
other.push({
label: _t('Delete'),
callback: this._onDeleteSelectedRecords.bind(this)
});

other.push({
label: _t("Export XLS`s"),
callback: this._onExportData.bind(this)
});

}

Restart your server and upgrade the web module. And now everything should be fine.



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Checkout this module, if anyone need i  V13: https://apps.odoo.com/apps/modules/13.0/disable_export

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

This free module works for me in Odoo 13:

https://apps.odoo.com/apps/modules/13.0/remove_export_option/

Good luck

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 25
1691
3
ก.พ. 25
14876
1
เม.ย. 25
2061
Export Import แก้ไขแล้ว
1
เม.ย. 25
1951
0
ต.ค. 23
1350