[FIX] models: fix permission check in export_data
[FIX] models: fix permission check in export_data

The permission check in BaseModel:export_data was checking if the
current user was the administrator user, instead of checking if the
environment was administrator (i.e. it should also check if the sudo bit
is set on the environment).

This commit fixes this and allows to export_data with a simple `sudo()`
instead of needing a `with_user(SUPERUSER_ID)`.

closes odoo/odoo#54645

X-original-commit: f69f47b6ba5c6c462bf617f4876a39233f60034f
Signed-off-by: Olivier Dony (odo) <d670d44c3ca8bd4cd53a3b09f8bf8fc35e4843cc@openerp.com>
Signed-off-by: Paul Morelle <4950c5a1ead41dfa3dcc3f68ece6c9007ac6ccce@users.noreply.github.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo