Skip to content

[FIX] purchase_ux: add product_id and selected_seller_id to name compute depends#328

Closed
les-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-69058-les
Closed

[FIX] purchase_ux: add product_id and selected_seller_id to name compute depends#328
les-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-69058-les

Conversation

@les-adhoc

Copy link
Copy Markdown
Contributor

Summary

  • In v19, _compute_price_unit_and_date_planned_and_name (which sets the name/Description field on PO lines) lacked product_id and selected_seller_id in its @api.depends.
  • OWL did not know to re-render the Description column when the product changed, leaving it blank until the next repaint (e.g. Alt+Tab).
  • The backend was already computing the correct value via the legacy @api.onchange('product_id'), but the list widget never received the signal to update.
  • Fix: extend the @api.depends in the purchase_ux override with product_id and selected_seller_id so OWL triggers the recompute and re-renders the field immediately on product selection.

Test plan

  • Open a draft PO, add a new line and select a product that has a vendor with a reference code — Description should auto-fill immediately (no save or focus-change required).
  • Confirm that changing the product on an existing draft line updates the Description correctly.
  • Confirm that changing the product on a confirmed PO line does not update Description (existing purchase_ux guard: state not in ['purchase', 'done']).
  • Confirm price and date_planned still compute correctly on product selection.

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@mav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

roboadhoc pushed a commit that referenced this pull request Jun 8, 2026
…ute depends

closes #328

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
@roboadhoc roboadhoc closed this in 0b1e816 Jun 8, 2026
@roboadhoc roboadhoc added the 18.1 label Jun 8, 2026
@roboadhoc roboadhoc deleted the 19.0-t-69058-les branch June 8, 2026 13:21
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.

3 participants