[UPD] exp_transation_letters: remove domain of attachment
This commit is contained in:
parent
52bacf7986
commit
2c6ba34ddc
|
|
@ -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;
|
||||
// },
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue