[FIX] web: fix can export all without access rights

Issue

	- Access rights > archive ir exports & line
	- Any list view
	- Select all > action > export

	Access rights error

	- Export all (next to import button)

	Export done

Cause

	Action > export does a search_read which checks
	access rights

	Export all is bypassing that check

Solution

	Do a search_read when clicking on export all
	before doing the export process

OPW-2230048

closes odoo/odoo#49203

X-original-commit: 8aa89d4c416bdcf3c7f6543f3d32006f9807c938
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
This commit is contained in:
jvm-odoo
2020-04-08 10:35:08 +00:00
parent 172722c4d2
commit c0010f86c0
@@ -728,7 +728,13 @@ var ListController = BasicController.extend({
* @private
*/
_onDirectExportData() {
this._getExportDialogWidget().export();
// access rights check before exporting data
return this._rpc({
model: 'ir.exports',
method: 'search_read',
args: [[], ['id']],
limit: 1,
}).then(() => this._getExportDialogWidget().export())
},
/**
* Opens the related form view.