Skip to content

[18.0][MOV] product_set_sell_only_by_packaging: Migration to 18.0#3494

Merged
OCA-git-bot merged 18 commits intoOCA:18.0from
trisdoan:18.0-mig-sale_product_set_sale_by_packaging
Apr 11, 2025
Merged

[18.0][MOV] product_set_sell_only_by_packaging: Migration to 18.0#3494
OCA-git-bot merged 18 commits intoOCA:18.0from
trisdoan:18.0-mig-sale_product_set_sale_by_packaging

Conversation

@trisdoan
Copy link
Copy Markdown
Contributor

@trisdoan trisdoan commented Dec 16, 2024

Note

Changes in 18.0

  • Rename sale_product_set_sale_by_packaging to product_set_sell_only_by_packaging
  • can_be_sold is now replaced by standard Odoo field: sales, which was introduced from 15.0 in odoo/odoo@a2b207c
  • group_discount_per_so_line was moved to module sale in here odoo/odoo@82eb2b5
  • Make sell_only_by_packaging writable in object ProductSetLine to bypass oca-ci test
    • Without this, CI is sad due to this warning
    • The field is solely used in constraint, and nowhere in view, which should be fine to make it writable
  • sale_by_packaging was stopped to migrate since 15.0, sell_only_by_packaging was introduced to replace, in https://github.com/OCA/sale-workflow/pull/2623, which is migrated to 18.0 in

@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from 9d43c74 to e5f87ca Compare December 16, 2024 02:29
Copy link
Copy Markdown
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

Shouldn't this module be renamed to sale_product_set_sell_only_by_packaging ?

And in regards of my comment #3474 (review) maybe it should just be product_set_sell_only_by_packaging as I don't see any sales feature in this module

@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from e5f87ca to bb61de7 Compare December 31, 2024 03:28
@trisdoan
Copy link
Copy Markdown
Contributor Author

Shouldn't this module be renamed to sale_product_set_sell_only_by_packaging ?

And in regards of my comment #3474 (review) maybe it should just be product_set_sell_only_by_packaging as I don't see any sales feature in this module

Hello @jbaudoux, agreed, I renamed the module, thank you so much

@trisdoan trisdoan requested a review from jbaudoux December 31, 2024 03:30
@trisdoan trisdoan marked this pull request as draft December 31, 2024 03:37
@trisdoan
Copy link
Copy Markdown
Contributor Author

trisdoan commented Dec 31, 2024

DRAFT: impact filenames + translation

@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from bb61de7 to 5b57ad5 Compare December 31, 2024 03:55
@trisdoan trisdoan marked this pull request as ready for review December 31, 2024 03:56
@trisdoan trisdoan changed the title [18.0][MIG] sale_product_set_sale_by_packaging: Migration to 18.0 [18.0][MOV] product_set_sell_only_by_packaging: Migration to 18.0 Dec 31, 2024
@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from 5b57ad5 to 3ada4e2 Compare December 31, 2024 04:04
@sebalix
Copy link
Copy Markdown
Contributor

sebalix commented Mar 6, 2025

Hello @trisdoan , I think there is an issue with the history contained in this PR? It includes also the code of sale_force_invoiced and sale_order_type. Can you fix it please?

@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from 3ada4e2 to 81d7a84 Compare March 12, 2025 01:49
@trisdoan trisdoan marked this pull request as draft March 12, 2025 01:50
@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from 81d7a84 to 4afe82a Compare March 13, 2025 02:22
@trisdoan trisdoan marked this pull request as ready for review March 13, 2025 02:27
@trisdoan
Copy link
Copy Markdown
Contributor Author

Hello @sebalix, I fixed it, please help to review 🙏

# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)

from odoo import exceptions
from odoo.tests.common import TransactionCase
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be better to use the BaseCommon as the base test class?

@@ -0,0 +1,121 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_product_set_sale_by_packaging
Copy link
Copy Markdown
Contributor

@twalter-c2c twalter-c2c Mar 25, 2025

Choose a reason for hiding this comment

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

I can see that the module name has been updated in the translation files, except for this line. It should be updated as well, right?

Copy link
Copy Markdown
Contributor

@twalter-c2c twalter-c2c left a comment

Choose a reason for hiding this comment

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

LG in general, small remarks to check.

@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from fd448c4 to f69c615 Compare April 10, 2025 08:04
Renamed from sale_product_set_sale_by_packaging to
product_set_sell_only_by_packaging
@trisdoan trisdoan force-pushed the 18.0-mig-sale_product_set_sale_by_packaging branch from f69c615 to 50bf2d1 Compare April 10, 2025 08:06
@simahawk
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@simahawk simahawk added this to the 18.0 milestone Apr 11, 2025
@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-3494-by-simahawk-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 0f68c84 into OCA:18.0 Apr 11, 2025
1 check passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

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.