Skip to content

[17.0][OU-FIX] sale_stock: Missing migration script#4749

Merged
OCA-git-bot merged 1 commit into
OCA:17.0from
Tecnativa:17.0-ou_fix-sale_stock
Feb 20, 2025
Merged

[17.0][OU-FIX] sale_stock: Missing migration script#4749
OCA-git-bot merged 1 commit into
OCA:17.0from
Tecnativa:17.0-ou_fix-sale_stock

Conversation

@pedrobaeza

Copy link
Copy Markdown
Member

Honor

# DONE: pre-migration: Pre-create the column for not triggering the method. Modules modifying the computation (l10n_de and sale_stock) will fill the value. More info at https://github.com/odoo/odoo/pull/116643

@Tecnativa TT49892

@pedrobaeza

Copy link
Copy Markdown
Member Author

/ocabot migration sale_stock

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Feb 19, 2025
@pedrobaeza pedrobaeza force-pushed the 17.0-ou_fix-sale_stock branch 2 times, most recently from 28e181a to ccbbf04 Compare February 19, 2025 14:48
@pedrobaeza pedrobaeza force-pushed the 17.0-ou_fix-sale_stock branch from ccbbf04 to 7acdc31 Compare February 19, 2025 15:06
@MiquelRForgeFlow

Copy link
Copy Markdown
Contributor

Shouldn't you modify the analysis work file?

@pedrobaeza

Copy link
Copy Markdown
Member Author

No, as this field is not logged in this module. It's just the overridden computed.

# Fill delivery_date and incoterm_location according
# https://github.com/odoo/odoo/blob/00818b7bfaf22635b0c40b3b9c7e37e0c9789da1/
# addons/sale_stock/models/account_move.py#L116-L134
openupgrade.logged_query(

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.

I think we should apply some WHERE conditions... I mean, what happens if you have a LOT of sale order lines performance-wise?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This SQL is already optimized, so it won't suffer in case of a big number of lines. You can try in a DB with lots of them (or use the populate tool for it).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The JOIN conditions are the "WHEREs" 😉

Comment thread openupgrade_scripts/scripts/sale_stock/17.0.1.0/post-migration.py
@MiquelRForgeFlow

Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-4749-by-MiquelRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 9d90a5c into OCA:17.0 Feb 20, 2025
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 9d90a5c. 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.

3 participants