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
This module is intended to disable the indexation of data on the
ir.attachment model.
Attachment model has a field called 'index_content' where the content
of the attachment is read and stored directly in the database. This field is
useful in order to search content of a file. But most of cases it is not used,
so, you can install this module in order to:
- **Avoid Duplicating Data:** Because indexation extracts text content
from files and put it on the database in order it could be searched, but
this implies you have the file data in your `filestore` directory, and
also part (or sometimes all) of that data in your database too.
- **Improve Performance:** Since not all indexed files are plain text, they
require extra process to read them.
Maybe you could try to uninstall modules like `document` in order to
disable its indexation features, but you could face the uninstallation of other
modules that could be useful for you (e.g, `hr_recruitment` depends on that).
But even if you don't have `document` installed, you'd still have
plain text content indexation by default.
Using this module you will not require to uninstall any module to
disable the attachment content indexation, because we directly disable it at
`ir.attachment` base.
Fixes
```
Traceback (most recent call last):
File "/home/odoo/15.0/parts/server-tools/base_changeset/tests/test_changeset_flow.py", line 63, in test_new_changeset
self.partner.write({"name": "Y", "street": "street Y", "street2": "street2 Y"})
File "/home/odoo/15.0/parts/odoo/odoo/addons/base/models/res_partner.py", line 603, in write
result = result and super(Partner, self).write(vals)
File "/home/odoo/15.0/parts/server-tools/base_changeset/models/base.py", line 97, in write
if self._changeset_disabled():
File "/home/odoo/15.0/parts/server-tools/base_changeset/models/base.py", line 111, in _changeset_disabled
if self._name not in self.models_to_track_changeset():
File "<decorator-gen-123>", line 2, in models_to_track_changeset
File "/home/odoo/15.0/parts/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/15.0/parts/server-tools/base_changeset/models/base.py", line 71, in models_to_track_changeset
models = self.env["changeset.field.rule"].search([]).mapped("model_id.model")
File "/home/odoo/15.0/parts/odoo/odoo/models.py", line 5464, in mapped
recs = recs._fields[name].mapped(recs)
File "/home/odoo/15.0/parts/odoo/odoo/fields.py", line 1180, in mapped
self.__get__(first(remaining), type(remaining))
File "/home/odoo/15.0/parts/odoo/odoo/fields.py", line 1089, in __get__
record._fetch_field(self)
File "/home/odoo/15.0/parts/odoo/odoo/models.py", line 3276, in _fetch_field
self._read(fnames)
File "/home/odoo/15.0/parts/odoo/odoo/models.py", line 3290, in _read
self.check_access_rights('read')
File "/home/odoo/15.0/parts/odoo/odoo/models.py", line 3547, in check_access_rights
return self.env['ir.model.access'].check(self._name, operation, raise_exception)
File "<decorator-gen-33>", line 2, in check
File "/home/odoo/15.0/parts/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/15.0/parts/odoo/odoo/addons/base/models/ir_model.py", line 1820, in check
raise AccessError(msg)
odoo.exceptions.AccessError: You are not allowed to access 'Models' (ir.model) records.
This operation is allowed for the following groups:
- Administration/Access Rights
- Changeset Validations
Contact your administrator to request access if necessary.
```
Before this commit, button presentation of 'Grant Update Permit' and 'Readonly' were
broken in the user form with the deprecation of boolean_button widget.
In this commit, we switch to use boolean_toggle for these buttons, with some other style
adjustments on the buttons.