Skip to content

fix(exportable): v17 fields are sometimes non exportable#95

Open
martintamare wants to merge 1 commit intoOCA:masterfrom
alkivi-sas:field-exportable
Open

fix(exportable): v17 fields are sometimes non exportable#95
martintamare wants to merge 1 commit intoOCA:masterfrom
alkivi-sas:field-exportable

Conversation

@martintamare
Copy link
Copy Markdown

We are upgrading to Odoo 17 and saw a regression.
Some fields are specifically marked as exportable=False in the Odoo codebase.
This patch allow to check for the existence of this parameter and simply skip unnecessary fields.

@sebalix
Copy link
Copy Markdown
Collaborator

sebalix commented Mar 26, 2026

From what I read, this exportable parameter set on fields is only used by the route /web/export/get_fields in addons/web/controllers/export.py file. This route seems used by Odoo web client only for the export feature (when exporting a list of records), but it doesn't prevent to read that field in other contexts.

For instance, <ir.module.module>.account_templates is not exportable, but there is no issue to access it through RPC:

>>> import odoorpc
>>> from pprint import pprint as pp
>>> odoo = odoorpc.ODOO(...)
>>> odoo.login(...)
>>> mod_ids = odoo.env["ir.module.module"].search([("name", "=", "account")])
>>> mod = odoo.env["ir.module.module"].browse(42)
>>> pp(mod.account_templates)
{'generic_coa': {'country_code': None,
                 'country_id': None,
                 'installed': True,
                 'module': 'account',
                 'name': 'Generic Chart Template',
                 'parent': None,
                 'sequence': 1,
                 'visible': True}}

What error did you encounter exactly?

@martintamare
Copy link
Copy Markdown
Author

We are now running version 19 in production.
To my knowledge I dont see the issue anymore. But we are using of patch code.
I will investigate and get back to you on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants