Skip to content

[FIX] purchase_stock_ux: use product_uom_id when merging procurement into PO line - #394

Closed
pablohmontenegro wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-h-131058-pam
Closed

pablohmontenegro wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-h-131058-pam

Conversation

@pablohmontenegro

Copy link
Copy Markdown
Contributor

Ticket: https://www.adhoc.inc/odoo/helpdesk.ticket/131058

In 19.0 purchase.order.line.product_uom was renamed to product_uom_id. The standard price fallback in stock.rule._update_purchase_order_line still used the old name.

Reproduction

  1. Storable product with route Buy, cost > 0 and a vendor with price 0 (vendor without buyer).
  2. Replenish the product: a draft RFQ is created.
  3. Replenish again: the procurement is merged into the existing RFQ line and raises AttributeError: 'purchase.order.line' object has no attribute 'product_uom'.

Fix
Use product_uom_id. Added a test that runs two buy procurements and checks that they merge into one line priced at the product cost.

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@pablohmontenegro pablohmontenegro changed the title [WIP] [FIX] purchase_stock_ux: use product_uom_id when merging procurement into PO line [FIX] purchase_stock_ux: use product_uom_id when merging procurement into PO line Oct 28, 2026
@les-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

@pablohmontenegro
pablohmontenegro force-pushed the 19.0-h-131058-pam branch 2 times, most recently from e8aa2c1 to f698592 Compare October 28, 2026 14:56
@pablohmontenegro

Copy link
Copy Markdown
Contributor Author

Hola @ingadhoc/devops ¿cómo están?, no estamos logrando mezclar este pull request, no se por qué no se generó la build de runbot.

@maq-adhoc

Copy link
Copy Markdown

@pablohmontenegro el pr hermano esta en wip https://github.com/ingadhoc/odoo-saas-adhoc/pull/3506 por eso este no se disṕaro, lo dispare manual pero dio error

…into PO line

In 19.0 purchase.order.line.product_uom was renamed to product_uom_id.
The standard price fallback in _update_purchase_order_line still used the
old name, so merging a buy procurement into an existing RFQ line raised
AttributeError when the vendor had no price and the product had a cost.
@les-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+

roboadhoc pushed a commit that referenced this pull request Oct 29, 2026
…into PO line

In 19.0 purchase.order.line.product_uom was renamed to product_uom_id.
The standard price fallback in _update_purchase_order_line still used the
old name, so merging a buy procurement into an existing RFQ line raised
AttributeError when the vendor had no price and the product had a cost.

closes #394

Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
@les-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc check

@roboadhoc

Copy link
Copy Markdown
Contributor

Updated message. No update to pr head.

This branch was previously deployed

1 inactive deployment
merge — 6ea0cccb Deployed Oct 29, 2026 by roboadhoc
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