[UPD] exp_transation_letters: remove domain of attachment

This commit is contained in:
Samir Ladoui 2025-02-12 15:05:20 +01:00
parent 52bacf7986
commit 2c6ba34ddc
1 changed files with 9 additions and 11 deletions

View File

@ -9,16 +9,14 @@ odoo.define("exp_transation_letters.custom_file_widget", function (require) {
* Override _getAttachmentsDomain to restrict attachments to the current user,
* but allow admins (base.group_system) to see everything.
*/
_getAttachmentsDomain: function (needle) {
var domain = this._super.apply(this, arguments);
// Check if the user is an admin (base.group_system) synchronously
if (!session.is_system) {
// Restrict to only attachments created by the current user
domain.push(["create_uid", "=", session.uid]);
}
return domain;
},
// _getAttachmentsDomain: function (needle) {
// var domain = this._super.apply(this, arguments);
// // Check if the user is an admin (base.group_system) synchronously
// if (!session.is_system) {
// // Restrict to only attachments created by the current user
// domain.push(["create_uid", "=", session.uid]);
// }
// return domain;
// },
});
});