Skip to content

[18.0][IMP] sale_product_pack: improve ergonomy for the user experience#241

Open
StephaneMangin wants to merge 1 commit intoOCA:18.0from
acsone:18.0-ref-sale_product_pack-smn
Open

[18.0][IMP] sale_product_pack: improve ergonomy for the user experience#241
StephaneMangin wants to merge 1 commit intoOCA:18.0from
acsone:18.0-ref-sale_product_pack-smn

Conversation

@StephaneMangin
Copy link

@StephaneMangin StephaneMangin commented Jan 27, 2026

Ergonomy is a bit confusing for the customer as constrains on changes and especially unlink are based only on onchange mechanism (which doesn't properly update the view to reflect the final result)

So the solution to allow a better readability of what the customer is doing is to:

  • Convert the component lines unlink exception in JS
  • Also remove component lines in JS when a product pack is removed

Also add some new tests for component lines forbidden changes

@OCA-git-bot
Copy link
Contributor

Hi @victoralmau,
some modules you are maintaining are being modified, check this out!

@StephaneMangin StephaneMangin force-pushed the 18.0-ref-sale_product_pack-smn branch 9 times, most recently from c082c70 to 7c5e6c1 Compare January 28, 2026 16:27
@StephaneMangin StephaneMangin marked this pull request as ready for review January 28, 2026 16:32
@StephaneMangin StephaneMangin force-pushed the 18.0-ref-sale_product_pack-smn branch from 7c5e6c1 to cbcce2c Compare January 28, 2026 16:36
@StephaneMangin StephaneMangin changed the title [18.0][IMP] sale_product_pack: improve ergonomy [18.0][IMP] sale_product_pack: improve ergonomy for the user experience Jan 28, 2026
@StephaneMangin StephaneMangin force-pushed the 18.0-ref-sale_product_pack-smn branch from cbcce2c to 4bd4e75 Compare January 28, 2026 17:06
Copy link
Member

@yvaucher yvaucher left a comment

Choose a reason for hiding this comment

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

Code LGTM, only the error message that has an error.

@StephaneMangin
Copy link
Author

Tests are failing, this might require to make a check bypass with test on config["test_enable"]

Yes, i'm on it. Sale order copy must be adapted (removing children lines from the copy data for instance)

@yvaucher
Copy link
Member

yvaucher commented Feb 2, 2026

Please check the unit tests which are failing on:

TestSaleOrder.test_unlink_multiple_packs and TestSaleOrder.test_unlink_pack_line

Where the exception is raised when it's not expected.

@StephaneMangin StephaneMangin force-pushed the 18.0-ref-sale_product_pack-smn branch 2 times, most recently from aa7aabf to 7038e9d Compare February 2, 2026 10:32
@StephaneMangin
Copy link
Author

StephaneMangin commented Feb 2, 2026

Please check the unit tests which are failing on:

TestSaleOrder.test_unlink_multiple_packs and TestSaleOrder.test_unlink_pack_line

Where the exception is raised when it's not expected.

All good now. Refactoring the unlink process and the order liens copy (adding a context option to bypass children unlink contrains)

@StephaneMangin StephaneMangin force-pushed the 18.0-ref-sale_product_pack-smn branch 9 times, most recently from b97f94d to a3100ee Compare February 26, 2026 15:57
@StephaneMangin StephaneMangin force-pushed the 18.0-ref-sale_product_pack-smn branch 3 times, most recently from a680508 to 69e8c78 Compare February 27, 2026 10:08
 - Convert the component lines unlink exception in JS
 - Also remove component lines in JS when a product pack is removed
@StephaneMangin StephaneMangin force-pushed the 18.0-ref-sale_product_pack-smn branch from 69e8c78 to ef3e891 Compare February 27, 2026 10:13
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.

3 participants