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

[18.0][MIG] purchase_last_price_info: Migration to 18.0 #2439

Open
wants to merge 51 commits into
base: 18.0
Choose a base branch
from

Conversation

StefanRijnhart
Copy link
Member

No description provided.

oihane and others added 30 commits October 17, 2024 18:28
[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/
victoralmau and others added 21 commits October 17, 2024 18:39
…urchase_price_currency in products.

Refactor code: Now used last_purchase_line_id field and is auto-set wit all info.
When adding new purchase order lines last_purchase_line_ids field will be used to re-compute
last_purchase_line_id field and change all information.
TT30742
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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.
@StefanRijnhart StefanRijnhart force-pushed the 18.0-mig-purchase_last_price_info branch from 7e39505 to 07d0000 Compare October 17, 2024 16:39
@StefanRijnhart
Copy link
Member Author

/ocabot migration purchase_last_price_info

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 17, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 17, 2024
30 tasks
@StefanRijnhart StefanRijnhart changed the title [18.0][MIG] purchase_last_price_info [18.0][MIG] purchase_last_price_info: Migration to 18.0 Oct 17, 2024
Copy link

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

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

Functional review

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.