@ -52,6 +52,7 @@ Contributors
* Valentin CHEMIERE <valentin.chemiere@akretion.com>
* Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
* Florian DA COSTA <florian.dacosta@akretion.com>
* Giovanni SERRA <giovanni@gslab.it>
Maintainer
----------
@ -1,5 +1,6 @@
# @ 2016 florian DA COSTA @ Akretion
# © 2016 @author Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# @ 2020 Giovanni Serra @ GSlab.it
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
@ -21,7 +22,7 @@
'security/ir.model.access.csv',
],
'demo': [
# 'demo/task_demo.xml',
'installable': True,
'application': False,
@ -172,5 +172,5 @@ class StorageTask(models.Model):
new_env.cr.commit()
def _file_to_import(self, filenames):
imported = self.attachment_ids.search([('name', 'in', [n for n in filenames])]).mapped('name')
imported = self.attachment_ids.filtered(lambda r: r.name in filenames).mapped('name')
return list(set(filenames) - set(imported))