Skip to content

[MIG] base_export_manager: Migration to 15.0 #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Jul 13, 2022

Conversation

nicomacr
Copy link
Contributor

No description provided.

@nicomacr nicomacr mentioned this pull request Mar 29, 2022
34 tasks
@nicomacr nicomacr force-pushed the 15.0-mig-base_export_manager branch 2 times, most recently from 46dde6e to d7d7ad4 Compare March 31, 2022 14:17
@manuelregidor
Copy link
Contributor

Hello @nicomacr Do you think you'll be able to finish this migration? Thank you!

@nicomacr nicomacr force-pushed the 15.0-mig-base_export_manager branch from d7d7ad4 to 6025d0a Compare May 3, 2022 15:30
@nicomacr
Copy link
Contributor Author

nicomacr commented May 3, 2022

@manuelregidor yes i've update the commit to fix pre-commit

@tarbib
Copy link

tarbib commented Jun 2, 2022

Hello @pedrobaeza
Would it be possible to have the module merged?

@pedrobaeza
Copy link
Member

/ocabot migration base_export_manager

See https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#review and https://odoo-community.org/page/review for the rules for merging things.

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Jun 2, 2022
@cesar-tecnativa
Copy link
Contributor

Please latest commit "[IMP] product_order_noname: black, isort, prettier" merge with previous gone

Copy link
Contributor

@cesar-tecnativa cesar-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please latest commit "[IMP] product_order_noname: black, isort, prettier" merge with previous gone

pedrobaeza and others added 18 commits July 12, 2022 08:03
* 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.
oca-transbot and others added 19 commits July 12, 2022 08:03
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-ux-13.0/server-ux-13.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-base_export_manager/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-ux-13.0/server-ux-13.0-base_export_manager
Translate-URL: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-base_export_manager/
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.
@nicomacr nicomacr force-pushed the 15.0-mig-base_export_manager branch from 6025d0a to 275a903 Compare July 12, 2022 11:03
@nicomacr
Copy link
Contributor Author

@cesar-tecnativa Done!

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-478-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 5f9dfe6 into OCA:15.0 Jul 13, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at a88c309. Thanks a lot for contributing to OCA. ❤️

@nicomacr nicomacr deleted the 15.0-mig-base_export_manager branch July 14, 2022 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.