Skip to content

[19.0] [MIG] sale_product_pack : migrate to 19.0#225

Closed
apik-mgu wants to merge 90 commits intoOCA:19.0from
apikcloud:19.0-mig-sale_product_pack
Closed

[19.0] [MIG] sale_product_pack : migrate to 19.0#225
apik-mgu wants to merge 90 commits intoOCA:19.0from
apikcloud:19.0-mig-sale_product_pack

Conversation

@apik-mgu
Copy link

No description provided.

ernestotejeda and others added 30 commits October 16, 2025 17:32
add a Roadmap section to the readme for creating sale_stock_product_pack
If not done this way, we can experiment ORM problems with cache misses.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-pack-12.0/product-pack-12.0-sale_product_pack
Translate-URL: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-sale_product_pack/
…ame place

Previous technique was trying to access `pack_parent_line_id` related values that are
not set due to the mangling on virtual records/creation phase, provoking an ORM error,
but there's no need of such complex code, as we only need to set price_unit to 0 when
preparing vals without the need of overriding other methods.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-pack-12.0/product-pack-12.0-sale_product_pack
Translate-URL: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-sale_product_pack/
Translated using Weblate (Spanish)

Currently translated at 86.7% (13 of 15 strings)

Translation: product-pack-12.0/product-pack-12.0-sale_product_pack
Translate-URL: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-sale_product_pack/es/
[UPD] Update sale_product_pack.pot

sale_product_pack 12.0.1.0.2

Update translation files

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

Translation: product-pack-12.0/product-pack-12.0-sale_product_pack
Translate-URL: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-sale_product_pack/
It's helpfull to know directly if the sale order line is editable.

If the sale order is edited from an api, onchange are not always triggered
so having this field helps to raise an error.

And it can be used to display in the view that the line is not editable.
[UPD] README.rst

sale_product_pack 12.0.1.1.0

Update translation files

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

Translation: product-pack-12.0/product-pack-12.0-sale_product_pack
Translate-URL: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-sale_product_pack/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-pack-13.0/product-pack-13.0-sale_product_pack
Translate-URL: https://translation.odoo-community.org/projects/product-pack-13-0/product-pack-13-0-sale_product_pack/
Currently translated at 42.1% (8 of 19 strings)

Translation: product-pack-13.0/product-pack-13.0-sale_product_pack
Translate-URL: https://translation.odoo-community.org/projects/product-pack-13-0/product-pack-13-0-sale_product_pack/nl/
Compatibility module between sale_product_pack and website_sale

TT30385
@apik-mgu apik-mgu force-pushed the 19.0-mig-sale_product_pack branch 2 times, most recently from 1d36ece to f1fdf43 Compare November 6, 2025 07:58
@nicolascol
Copy link

LGTM functional review.
I think the mention in contributors is incorrect, it's only a migration.

@apik-mgu @pedrobaeza

@pedrobaeza
Copy link
Member

/ocabot migration sale_product_pack

Some reviews are needed, and one must come from PSC / maintainer

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Nov 6, 2025
@apik-mgu
Copy link
Author

apik-mgu commented Nov 7, 2025 via email

@OCA-git-bot
Copy link
Contributor

Sorry @apik-mgu you are not allowed to mark the addon to be migrated.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@pedrobaeza
Copy link
Member

Copy link
Contributor

@lef-adhoc lef-adhoc left a comment

Choose a reason for hiding this comment

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

LGTM

@lef-adhoc
Copy link
Contributor

@pedrobaeza Could you merge please?

requires = ["whool"]
build-backend = "whool.buildapi"

[project]
Copy link
Member

Choose a reason for hiding this comment

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

This entry sounds weird

Copy link
Member

Choose a reason for hiding this comment

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

What about this?

Copy link
Author

Choose a reason for hiding this comment

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

Désolé mais je ne comprends pas ce que vous entendez réellement.
Merci

Copy link
Member

Choose a reason for hiding this comment

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

I mean this modification should be out.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @pedrobaeza , we should not modify the pyproject.toml

@apik-mgu apik-mgu force-pushed the 19.0-mig-sale_product_pack branch from f1fdf43 to de527a1 Compare November 24, 2025 12:35
@apik-mgu
Copy link
Author

@pedrobaeza
Correction made.
Have a good day.

Copy link

@yankinmax yankinmax left a comment

Choose a reason for hiding this comment

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

pre-approve considering changes requested

@apik-mgu apik-mgu force-pushed the 19.0-mig-sale_product_pack branch from de527a1 to 4889f06 Compare December 9, 2025 08:58
@lef-adhoc
Copy link
Contributor

@pedrobaeza Hi, what would be required to merge this PR?

class SaleOrder(models.Model):
_inherit = "sale.order"

def copy(self, default=None):
Copy link
Member

Choose a reason for hiding this comment

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

Copy now may return a recordset, so this is not correct (this applies also to 18).

@apik-mgu
Copy link
Author

apik-mgu commented Dec 18, 2025 via email

@apik-mgu apik-mgu force-pushed the 19.0-mig-sale_product_pack branch 2 times, most recently from b4a5619 to 821c6b3 Compare December 18, 2025 08:54
@apik-mgu
Copy link
Author

apik-mgu commented Dec 18, 2025 via email

@pedrobaeza
Copy link
Member

Please don't use other language except English. The change is not correct, as it's still comparing == self, being self probably a multi-record, so the code is not valid. Check also the rest of the comments.

@apik-mgu apik-mgu force-pushed the 19.0-mig-sale_product_pack branch from 821c6b3 to 1b614f5 Compare December 22, 2025 07:26
@apik-mgu
Copy link
Author

Modification made

lambda x, order=record: x.pack_parent_line_id.order_id == order
)
if pack_copied_lines:
pack_copied_lines.unlink()

Choose a reason for hiding this comment

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

I think you can implement this in the new _get_copiable_order_lines hook now, and so it's filtered directly in the creation values provided by copy_data

@much-filipe-colaco
Copy link

Any news on this migration? Is it planned to be released soon?

@FrancoMaxime
Copy link
Member

FrancoMaxime commented Mar 12, 2026

I make another pull request with the changes asked from @pedrobaeza and @ivantodorovich

see #244

@pedrobaeza pedrobaeza closed this Mar 12, 2026
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.