Skip to content

[19.0][MIG] purchase_last_price_info : migrate to 19.0#2851

Open
therbin200 wants to merge 57 commits intoOCA:19.0from
apikcloud:19.0-mig-purchase_last_price_info
Open

[19.0][MIG] purchase_last_price_info : migrate to 19.0#2851
therbin200 wants to merge 57 commits intoOCA:19.0from
apikcloud:19.0-mig-purchase_last_price_info

Conversation

@therbin200
Copy link
Copy Markdown

No description provided.

oihane and others added 30 commits October 17, 2025 14:12
[IMP] <purchase_last_price_info> Deleted dependency

[IMP] <purchase_last_price> Changed to avoid initializing to False

[IMP] <purchase_last_price_info> Minor changes

[IMP] <purchase_last_price_info> added test

[IMP] <purchase_last_price_info> OCA required _id added

[FIX] <purchase_last_price_info> test fixed

[IMP] Update <purchase_last_price_info> New version format and Try me button

[IMP] <purchase_last_price_info> Test updated data when purchase.order is confirmed
[ADD] post-init hook

[ADD] migration script
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-11.0/purchase-workflow-11.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_last_price_info/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_last_price_info/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_last_price_info/zh_CN/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_last_price_info/es/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_last_price_info/pt_BR/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_last_price_info/zh_CN/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_last_price_info/de/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_last_price_info/fr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_last_price_info/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-14.0/purchase-workflow-14.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_last_price_info/fr_FR/
mhachraf and others added 21 commits October 17, 2025 14:12
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_last_price_info/
Currently translated at 100.0% (14 of 14 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_last_price_info/hr/
Currently translated at 100.0% (11 of 11 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_last_price_info/pt_BR/
Currently translated at 100.0% (11 of 11 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_last_price_info/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_last_price_info/
…ency

Depending on the installed modules, the company currency may be USD or EUR, affecting the
result of these tests. With this PR, the results are adjusted for both cases.
Currently translated at 100.0% (11 of 11 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_last_price_info/it/
On purchase.order.line creation, `_update_inverses` is called
before the value of purchase.order.line.company_id is computed.
`_update_inverses` causes Odoo to filter purchase.order.line
to find the correct lines to put into the cache, which in turn
causes access rights check. And because company_id is not yet
computed it fails.
Fixing by removing domain from `last_purchase_line_ids` to
avoid filtering and filter it later manually.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_last_price_info/
Currently translated at 100.0% (11 of 11 strings)

Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_last_price_info/tr/
Currently translated at 18.1% (2 of 11 strings)

Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_last_price_info
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_last_price_info/pt/
@therbin200 therbin200 force-pushed the 19.0-mig-purchase_last_price_info branch from 6c63cf7 to be00419 Compare October 17, 2025 12:57
@therbin200 therbin200 mentioned this pull request Oct 17, 2025
78 tasks
@HviorForgeFlow
Copy link
Copy Markdown
Member

/ocabot migration purchase_last_price_info

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Nov 4, 2025
Copy link
Copy Markdown
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

Could you cherry-pick the fix done here #2822 ?

Thanks!

Copy link
Copy Markdown
Contributor

@Reyes4711-S73 Reyes4711-S73 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@HviorForgeFlow HviorForgeFlow left a comment

Choose a reason for hiding this comment

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

Tests are failing
Attend #2851 (review)

@Vicent-S73
Copy link
Copy Markdown
Contributor

LGTM

@edy1192
Copy link
Copy Markdown

edy1192 commented Apr 16, 2026

Hi @therbin200, tests are failing

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.