TIP: You can type at any time to perform a new search.
Purchase Open Qty
purchase_open_qty · OCA/purchase-workflow
Security findings
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE purchase_order_line pol SET qty_to_invoice = pol.qty_received - pol.qty_invoiced FROM product_product p JOIN product_template t ON p.product_tmpl_id = t.id WHERE t.purchase_method = 'receive' AND pol.product_id = p.id` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE purchase_order_line pol SET qty_to_invoice = pol.product_qty - pol.qty_invoiced FROM product_product p JOIN product_template t ON p.product_tmpl_id = t.id WHERE t.purchase_method != 'receive' AND pol.product_id = p.id` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE purchase_order_line pol SET qty_to_receive = CASE WHEN pt.type = 'service' THEN pol.product_qty - pol.qty_received ELSE ( SELECT COALESCE(SUM(sm.product_uom_qty), 0) FROM stock_move sm WHERE sm.purchase_line_id = pol.id AND sm.state NOT IN ('cancel', 'done') ) END FROM product_product pp JOIN product_template pt ON pt.id = pp.product_tmpl_id WHERE pp.id = pol.product_id` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/purchase-workflow · module folder · Try on Runboat
- Module version
- 1.0.1
- Category
- Purchases
- Folder size
- 0.09 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/purchase-workflow
- Last tracking update
- 2026-08-07 08:42:58
- Authors
- Odoo Community Association (OCA), ForgeFlow
- Maintainers
- Odoo Community Association (OCA), ForgeFlow
- Committers
- Stefan Rijnhart, Weblate, OCA-git-bot, oca-ci, nobuQuartile
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- purchase_invoice_plan
- Description
This module allows purchase users to identify what are the purchase orders that currently have quantities pending to invoice or to receive.
Code Analysis
Views touched (4)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
purchase_order_form |
purchase.order.form -- open qty fields | purchase.order | form | Inherits purchase.purchase_order_form |
purchase_order_line_search |
purchase.order.line.search - purchase_open_qty | purchase.order.line | search | Inherits purchase.purchase_order_line_search |
view_purchase_order_filter |
request.quotation.select -- open qty filters | purchase.order | search | Inherits purchase.purchase_order_view_search |
view_purchase_order_line_tree |
purchase.order.line | tree | Inherits purchase_order_line_menu.purchase_order_line_tree |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (2)
New fields (4)
-
pending_qty_to_invoiceBooleancompute='_compute_qty_to_invoice'search='_search_pending_qty_to_invoice'string='Pending Qty to Bill' -
pending_qty_to_receiveBooleancompute='_compute_qty_to_receive'search='_search_pending_qty_to_receive'string='Pending Qty to Receive' -
qty_to_invoiceFloatcompute='_compute_qty_to_invoice'default=0.0string='Qty to Bill' -
qty_to_receiveFloatcompute='_compute_qty_to_receive'default=0.0string='Qty to Receive'
No public methods.
New fields (1)
-
qty_to_receiveFloatcompute='_compute_qty_to_receive'copy=Falsedigits='Product Unit of Measure'store=Truestring='Qty to Receive'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- checks failing
- Open since
- 202 days ago
- Last activity
- 86 days ago
- Repository
- OCA/purchase-workflow
- Pull request
- [19.0][MIG] purchase_open_qty: Migration to 19.0 (#2989)