product-attribute icon indicating copy to clipboard operation
product-attribute copied to clipboard

[15.0][ADD] sale_product_matrix_secondary_unit: New module

Open chienandalu opened this issue 11 months ago • 2 comments

With this module we'll be able to set the secondary units in the product matrix for a quick quotation for those products using this kind of configurator.

Peek 22-01-2025 17-42

Depends on the following change to be reliable:

  • [ ] https://github.com/OCA/sale-workflow/pull/3588

cc @Tecnativa TT52531

please take a look @sergio-teruel @CarlosRoca13 @pedrobaeza

chienandalu avatar Jan 22 '25 16:01 chienandalu

In runboat i got this error when opening the matrix:

Error: QWeb2 - template['product_matrix.matrix']: No enumerator given to foreach
    at Object.exception (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:57861:19) (/web/static/lib/qweb/qweb2.js:48)
    at Object.foreach (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:58023:22) (/web/static/lib/qweb/qweb2.js:210)
    at Engine.eval (eval at _render (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:58285:33), <anonymous>:19:23) (/web/static/lib/qweb/qweb2.js:472)
    at Engine._render (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:58274:58) (/web/static/lib/qweb/qweb2.js:461)
    at Engine.render (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:58266:26) (/web/static/lib/qweb/qweb2.js:453)
    at Engine._render (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:58296:29) (/web/static/lib/qweb/qweb2.js:483)
    at Engine.render (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:58266:26) (/web/static/lib/qweb/qweb2.js:453)
    at Class._openMatrixConfigurator (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_backend.js:153961:30) (/sale_product_matrix_secondary_unit/static/src/js/section_and_note_widget.js:61)
    at onSuccess (http://oca-product-attribute-15-0-pr1854-7ca9f9ba4811.runboat.odoo-community.org/web/assets/debug/web.assets_backend.js:151529:22) (/product_matrix/static/src/js/section_and_note_widget.js:78)

CarlosRoca13 avatar Jan 23 '25 11:01 CarlosRoca13

Hi.. The name on secondary is not shown correctly, the used field seems name instead of display_name image

In matrix view image

Some errors are shown when I mix different secondary units on same sale order image

We can define different seconday units by variant, This is not covered, is it?

sergio-teruel avatar Jan 30 '25 16:01 sergio-teruel

@CarlosRoca13 @sergio-teruel @pedrobaeza I’ve tested this module, and it works as expected based on the customer’s requirements. I’ve also added some tests. Please update your review and, if possible, proceed with the merge. I’m planning to migrate this module to v17.

carlos-lopez-tecnativa avatar May 28 '25 12:05 carlos-lopez-tecnativa

/ocabot merge nobump

pedrobaeza avatar May 28 '25 13:05 pedrobaeza

On my way to merge this fine PR! Prepared branch 15.0-ocabot-merge-pr-1854-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot avatar May 28 '25 13:05 OCA-git-bot

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

OCA-git-bot avatar May 28 '25 13:05 OCA-git-bot