Skip to content

[19.0][MIG] product_set: Migration to 19.0#2263

Open
CRogos wants to merge 24 commits intoOCA:19.0from
c4a8-odoo:copilot/migrate-product-set-18-0-to-19-0
Open

[19.0][MIG] product_set: Migration to 19.0#2263
CRogos wants to merge 24 commits intoOCA:19.0from
c4a8-odoo:copilot/migrate-product-set-18-0-to-19-0

Conversation

@CRogos
Copy link
Copy Markdown

@CRogos CRogos commented Apr 16, 2026

supersede: #2098

includes: #2201

  • Remove odoo_test_helper dependency — tests/models.py deleted
  • Convert product.set.wizard from AbstractModel to TransientModel
  • Fix test_product_set.py — replace all demo data env.ref() with programmatic record creation (including base.res_partner_1)
  • Fix test_product_set_line.py — UoM refs retained (module data, always available)
  • Fix test_product_set_wizard.py — fully programmatic, no demo refs

@Saran440, @rousseldenis. @mmrondon Could you please review?
There were a few (breaking) changes necessary. Could you have a close look on the changes and test.

Christopher Rogos and others added 22 commits April 16, 2026 14:17
[UPD] Update product_set.pot

[UPD] README.rst

Translated using Weblate (Spanish)

Currently translated at 100.0% (23 of 23 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/es/

[UPD] README.rst

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (23 of 23 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/pt_BR/

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/

Translated using Weblate (Italian)

Currently translated at 100.0% (23 of 23 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/it/
[UPD] Update product_set.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/

Translated using Weblate (Spanish)

Currently translated at 100.0% (29 of 29 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/es/

Translated using Weblate (Italian)

Currently translated at 100.0% (29 of 29 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/it/
… in the module sale_product_set.

The reason to move this logic is that there are other modules that extend
product_set as for example stock_product_set but at the same time make use
of the transient model to define a wizard. For this reason it is better to
have the logic available in this base module and avoid duplicating code or
inheriting from sale_product_set and what this implies in their respective
dependencies with the only need to extend the transient model.
In addition, the transient model is renamed to make it clearer to identify
that it is this type of model.

TT48100

[UPD] Update product_set.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/

Translated using Weblate (Italian)

Currently translated at 100.0% (32 of 32 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_set/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-17.0/product-attribute-17.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_set/
Currently translated at 100.0% (33 of 33 strings)

Translation: product-attribute-17.0/product-attribute-17.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_set/de/
Currently translated at 100.0% (33 of 33 strings)

Translation: product-attribute-17.0/product-attribute-17.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_set/es/
Currently translated at 100.0% (33 of 33 strings)

Translation: product-attribute-17.0/product-attribute-17.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_set/it/
Currently translated at 100.0% (33 of 33 strings)

Translation: product-attribute-17.0/product-attribute-17.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_set/sv/
Currently translated at 93.9% (31 of 33 strings)

Translation: product-attribute-17.0/product-attribute-17.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_set/zh_TW/
Currently translated at 100.0% (33 of 33 strings)

Translation: product-attribute-17.0/product-attribute-17.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_set/it/
Currently translated at 100.0% (36 of 36 strings)

Translation: product-attribute-18.0/product-attribute-18.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_set/it/
In v18 the archive/unarchive action is visible only if the field is not readonly
hence we cannot use a related field anymore.
* ease filtering on set and set line views
* allow viewing and toggling archived lines on set form
Currently translated at 100.0% (37 of 37 strings)

Translation: product-attribute-18.0/product-attribute-18.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_set/it/
Currently translated at 18.9% (7 of 37 strings)

Translation: product-attribute-18.0/product-attribute-18.0-product_set
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_set/tr/
With the changes introduced in odoo/odoo@de056cc#diff-b37c7fd5520c97a29ddc59495779e7be61a66e15e85603928e27b3affb9dc31f, an error was occurring because the change validation on the model was being performed before tearDownClass was executed. Therefore, it has been modified so that the mock changes are applied in each test and cleaned up after each test. This way, the error will no longer appear and the test will run normally.
@CRogos CRogos force-pushed the copilot/migrate-product-set-18-0-to-19-0 branch 5 times, most recently from c9fd859 to 5813d5f Compare April 17, 2026 12:37
@CRogos CRogos marked this pull request as ready for review April 20, 2026 12:30
Copy link
Copy Markdown
Contributor

@BhaveshHeliconia BhaveshHeliconia left a comment

Choose a reason for hiding this comment

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

Code review LGTM!

@CRogos CRogos force-pushed the copilot/migrate-product-set-18-0-to-19-0 branch from 5813d5f to 76d5f2b Compare April 30, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.