Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][BACKPORT] [16.0] stock_picking_volume: Speedup install and avoid useless recompute #2148

Open
wants to merge 5 commits into
base: 14.0
Choose a base branch
from

Conversation

sebalix
Copy link
Contributor

@sebalix sebalix commented Aug 28, 2024

Port of #1680 from 16.0 to 14.0.

SQL request in pre_init_hook has been adapted to 14.0 (see https://github.com/OCA/OpenUpgrade/blob/16.0/openupgrade_scripts/scripts/stock/16.0.1.1/pre-migration.py#L17-L18 )

Makes computed fields readonly in state 'done' or 'cancel' to avoid triggering recompute when these values are useless
@OCA-git-bot
Copy link
Contributor

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

Init computed fields from plain sql queries to speedup install on large database
@sebalix sebalix force-pushed the oca-port-from-16.0-to-14.0-pr-1680 branch 2 times, most recently from 4947b9a to 3e1537a Compare August 28, 2024 13:15
ferran-S73 and others added 3 commits August 28, 2024 15:32
…c' to 'double precision'

As no digits parameters are provided on `<stock.move>.volume' and
'<stock.picking>.volume' fields, the 'double precision' type is used
instead of 'numeric'.

This avoids time consuming SQL requests 'ALTER TABLE...' at module
install.
Copy link
Sponsor Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

LGTM (Code review only)

@sebalix sebalix changed the title [14.0][FW] [16.0] stock_picking_volume: Speedup install and avoid useless recompute [14.0][BACKPORT] [16.0] stock_picking_volume: Speedup install and avoid useless recompute Sep 2, 2024
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.

4 participants