Skip to content

Syncing from upstream OCA/purchase-workflow (19.0)#2036

Merged
bt-admin merged 324 commits intobrain-tec:19.0from
OCA:19.0
Feb 4, 2026
Merged

Syncing from upstream OCA/purchase-workflow (19.0)#2036
bt-admin merged 324 commits intobrain-tec:19.0from
OCA:19.0

Conversation

@bt-admin
Copy link

@bt-admin bt-admin commented Feb 4, 2026

bt_gitbot

HviorForgeFlow and others added 30 commits November 10, 2025 11:58
Currently translated at 39.1% (86 of 220 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_request
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_request/fr/
Currently translated at 1.8% (4 of 220 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_request
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_request/es_EC/
Currently translated at 29.5% (65 of 220 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_request
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_request/pt_BR/
Currently translated at 91.4% (201 of 220 strings)

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

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

Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_request
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_request/zh_CN/
Currently translated at 72.2% (161 of 223 strings)

Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_request
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_request/it/
New purchase request line should not be created from form view as well.

Create is already disabled on list view at https://github.com/OCA/purchase-workflow/blob/13.0/purchase_request/views/purchase_request_line_view.xml#L11
Stock move is a table that could increase a lot.
So, it's important avoid slow methods in the middle

The constraint method `stock_move._check_company_purchase_request`
compares `purchase_request_allocation.company_id` vs `stock_move.company_id`
to be sure they have the same value

`pra.company_id` was a related field to
`purchase_request_line_id.request_id.company_id`
without `store=True`
Then this constraint consume a lot of time getting all these iteration of records.
For that it was changed to `store=True` and an index was added to get it faster.

And the method was using a loop getting company record by record.
It is so slow too.
It was changed directly using a query since that the ORM doesn't support `JOIN`
And was added an index to `pra.stock_move_id` field to get `JOIN` faster
mymage and others added 27 commits January 23, 2026 13:13
Currently translated at 100.0% (4 of 4 strings)

Translation: purchase-workflow-17.0/purchase-workflow-17.0-purchase_force_invoiced
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-17-0/purchase-workflow-17-0-purchase_force_invoiced/it/
* Reset qty_to_invoice on lines of force invoiced orders
* Adapt SQL report override to the use of odoo.tools.sql.SQL

Co-authored-by: Stefan Rijnhart <stefan@opener.amsterdam>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_force_invoiced
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_force_invoiced/it/
…tatus

Before v17 migration, if you wanted to force invoice status purchase
order must be locked. After that migration, condition was changed to
the opposite one (purchase order must be unlocked), probably due to
an error migration.

This restores original behavior, that shouldn't be changed. Also,
restoring old behavior makes the addon coherent with current usage
documentation, that's been never changed.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_force_invoiced
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_force_invoiced/it/
Signed-off-by HviorForgeFlow
Signed-off-by HviorForgeFlow
Signed-off-by HviorForgeFlow
@bt-admin bt-admin added the 19.0 label Feb 4, 2026
@bt-admin bt-admin merged commit 9d2f78b into brain-tec:19.0 Feb 4, 2026
4 checks passed
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 93.33333% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.46%. Comparing base (cb9fab9) to head (963b124).
⚠️ Report is 331 commits behind head on 19.0.

Files with missing lines Patch % Lines
...chase_order_general_discount/models/res_company.py 46.15% 7 Missing ⚠️
purchase_force_invoiced/model/purchase_order.py 85.71% 1 Missing and 1 partial ⚠️
purchase_force_invoiced/reports/purchase_report.py 85.71% 1 Missing and 1 partial ⚠️
...se_order_general_discount/models/purchase_order.py 93.54% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             19.0    #2036      +/-   ##
==========================================
- Coverage   95.86%   93.46%   -2.40%     
==========================================
  Files          39       73      +34     
  Lines         484     2082    +1598     
  Branches       38      204     +166     
==========================================
+ Hits          464     1946    +1482     
- Misses         12       70      +58     
- Partials        8       66      +58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.