[FIX] attachment_unindex_content: unsupported param on _index method

Odoo introduced a new param `checksum` to the method `_index` on the
attachment model [1]. Since that param is not supported on this model,
the following error is now being raised:

    TypeError: _index() got an unexpected keyword argument 'checksum'

[1] https://github.com/odoo/odoo/commit/3d59cc84
pull/2679/head
Luis González 2022-09-28 21:01:44 +00:00 committed by Sébastien Alix
parent d6f8b28d55
commit 209257bdf5
2 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,11 @@
"version": "14.0.1.0.0",
"author": "Vauxoo, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"maintainers": ["moylop260", "ebirbe"],
"maintainers": [
"moylop260",
"ebirbe",
"luisg123v",
],
"license": "AGPL-3",
"category": "Tools",
"depends": ["base"],

View File

@ -9,5 +9,5 @@ class IrAttachment(models.Model):
_inherit = "ir.attachment"
@api.model
def _index(self, bin_data, mimetype):
def _index(self, *args, **kwargs):
return False