Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[19.0][MIG] base_export_manager: Migration to 19.0#1309

Open
lbisiach wants to merge 47 commits into
OCA:19.0OCA/server-ux:19.0from
AITIC:19.0-mig-base_export_managerAITIC/server-ux:19.0-mig-base_export_managerCopy head branch name to clipboard
Open

[19.0][MIG] base_export_manager: Migration to 19.0#1309
lbisiach wants to merge 47 commits into
OCA:19.0OCA/server-ux:19.0from
AITIC:19.0-mig-base_export_managerAITIC/server-ux:19.0-mig-base_export_managerCopy head branch name to clipboard

Conversation

@lbisiach

@lbisiach lbisiach commented Jul 3, 2026

Copy link
Copy Markdown

Summary

Migration of base_export_manager to Odoo 19.0, including a fix for a crash during module data loading.

Changes

  • Migration to 19.0: Updated module structure, views, and JS assets for Odoo 19 compatibility.
  • Fix _inverse_name crash during data loading: When Odoo loads data for modules like project_enterprise, it creates ir.exports.line records via XML. If the parent ir.exports record's model_id is not yet computed (e.g. version mismatch between CE and EE, or records pre-dating this module), _inverse_name would raise a ValidationError that propagated as a ParseError and prevented the registry from loading entirely. The fix skips field resolution gracefully when the model is unknown.
  • Improved post_init_hook: Now recomputes model_id for existing ir.exports records that have a resource but no model_id stored, before processing lines.

Test plan

  • Install base_export_manager on a fresh Odoo 19 database with project and project_enterprise installed — server should start without errors
  • Verify existing export profiles load correctly after module installation
  • Verify creating a new export profile from the UI works as expected
  • Run module tests: base_export_manager

pedrobaeza and others added 30 commits November 11, 2025 16:51
* Improve UX for base_export_manager.

  - Improve user instructions in README.
  - Require some required fields.
  - Allow to select models from a list.
  - Allow to select up to 3 fields from dynamic lists.
  - Improve translations.
  - More tests.
  - Translate column labels.

  Some methods have been renamed, so version tag is raised to 8.0.2.0.0.

* Make inverse method be called at view time.
* Hardcode constraints in the `create` method instead of using normal ones.

  Depending on the context where the record is created, it gets `resource` or `model_id`. The problem is that Odoo checks constrains before inverses, so constrains would fail always.

  Test added to ensure future versions contemplate all use cases.

* Allow to reorder fields.
* Upgrade base_export_manager to v9
* Rename JS to base_export_manager
* Change osv_memory to transient for model_id domain
* Improve UX for base_export_manager.

  - Improve user instructions in README.
  - Require some required fields.
  - Allow to select models from a list.
  - Allow to select up to 3 fields from dynamic lists.
  - Improve translations.
  - More tests.
  - Translate column labels.

  Some methods have been renamed, so version tag is raised to 8.0.2.0.0.

* Hardcode constraints in the `create` method instead of using normal ones.

  Depending on the context where the record is created, it gets `resource` or `model_id`. The problem is that Odoo checks constrains before inverses, so constrains would fail always.

  Test added to ensure future versions contemplate all use cases.

* Allow to reorder fields.
[FIX][base_export_manager] Fix "Expected singleton" bug.

If you had a field that got translated in more than 1 addon, you'd possibly getto this error:

      File "/opt/odoo/0079_ahk_openerp/oca/base_export_manager/models/ir_exports_line.py", line 105, in _compute_label
        field.name)),
      File "/opt/odoo/common/openerp/v8/openerp/fields.py", line 825, in __get__
        record.ensure_one()
      File "/opt/odoo/common/openerp/v8/openerp/models.py", line 5355, in ensure_one
        raise except_orm("ValueError", "Expected singleton: %s" % self)
    except_orm: ('ValueError', 'Expected singleton: ir.translation(4899, 703976)')

With this patch, now we let Odoo return the translated string by using its
standard method to do so, so we have to care for less.

* Move installation outside a data file.

This makes the whole installation to be able to roll back if something goes
wrong, instead of entering an error loop.

* Include envorionment in its manager.

* Add 4th field

* Move to api.multi, refactoring some stuff.

- Add some comments in complex parts.
- Rename `onchange_name` to `_onchange_name` (guidelines).
- Make `_compute_name`'s try block shorter and easier to understand.

* Allow R/W of name directly in model.

* Update tests to cover new behaviors.
- Remove all possible translation commits
- Aesthetical changes
- Bump version
- Some new standards, such as split readme

Basically, nothing.
Currently translated at 80.0% (20 of 25 strings)

Translation: server-ux-11.0/server-ux-11.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-11-0/server-ux-11-0-base_export_manager/da/
Currently translated at 100.0% (31 of 31 strings)

Translation: server-ux-12.0/server-ux-12.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-base_export_manager/pt/
Currently translated at 100.0% (31 of 31 strings)

Translation: server-ux-12.0/server-ux-12.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-base_export_manager/zh_CN/
Currently translated at 90.3% (28 of 31 strings)

Translation: server-ux-12.0/server-ux-12.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-base_export_manager/hr/
Currently translated at 100.0% (31 of 31 strings)

Translation: server-ux-14.0/server-ux-14.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-14-0/server-ux-14-0-base_export_manager/es/
If not, we are not assigning the label value for the record and we get
a missing cache value error.
WARNING odoo.fields: Redundant default on ir.exports.line.model1_id
syera94 and others added 17 commits November 11, 2025 16:51
Steps to reproduce:

- Create an export profile in any model.
- Login with a user without setting permissions.
- Go to export popup on that model.
- Try to select the saved export profile.

You'll get an access error.

Using sudo for computed/related stuff linked to ir.model,  we avoid
the problem.

TT44721
Currently translated at 100.0% (31 of 31 strings)

Translation: server-ux-16.0/server-ux-16.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_export_manager/es/
Currently translated at 100.0% (31 of 31 strings)

Translation: server-ux-16.0/server-ux-16.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_export_manager/it/
Currently translated at 100.0% (31 of 31 strings)

Translation: server-ux-16.0/server-ux-16.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_export_manager/sv/
Currently translated at 100.0% (31 of 31 strings)

Translation: server-ux-16.0/server-ux-16.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_export_manager/pt_BR/
… loading

When ir.exports.line._inverse_name() is triggered during Odoo's own module
data loading (e.g. project_enterprise), the parent ir.exports record may not
have model_id set yet (version mismatch or records pre-dating this module).
Instead of crashing with a ParseError, skip field resolution gracefully.

Also recompute model_id for existing ir.exports records in post_init_hook
before processing lines.
@OCA-git-bot OCA-git-bot added series:19.0 mod:base_export_manager Module base_export_manager labels Jul 3, 2026
@lbisiach lbisiach changed the title [MIG] base_export_manager: Migration to 19.0 [19.0][MIG] base_export_manager: Migration to 19.0 Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:base_export_manager Module base_export_manager series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.