Skip to content

[FIX] stock_orderpoint_manual_update: keep qty_forecast in DOM to avoid XPath conflict with Studio#949

Open
fw-bot-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-18.0-h-120436-mav-6488-fw
Open

[FIX] stock_orderpoint_manual_update: keep qty_forecast in DOM to avoid XPath conflict with Studio#949
fw-bot-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-18.0-h-120436-mav-6488-fw

Conversation

@fw-bot-adhoc

Copy link
Copy Markdown
Contributor

Problem

When Studio is used on the stock.warehouse.orderpoint list view, it raises:

ValueError: El elemento "<xpath expr="//field[@name='qty_forecast']">" no se puede localizar en la vista principal

This happens because stock_orderpoint_manual_update used position="replace" to remove qty_forecast from the DOM entirely and substitute it with qty_forecast_stored. A sibling inherited view (stock.warehouse.orderpoint.tree.inherit) anchors its XPath on //field[@name='qty_forecast']. When Studio's apply_inheritance_specs override processes the view combination and applies the sibling view after the replace, the anchor no longer exists — raising the error.

Fix

Replace position="replace" with position="attributes" (making the field invisible instead of removing it from the DOM), then add qty_forecast_stored via a separate position="after". This keeps qty_forecast as a valid XPath anchor while hiding it from the UI.

<!-- before -->
<field name="qty_forecast" position="replace">
    <field name="qty_forecast_stored"/>
</field>

<!-- after -->
<field name="qty_forecast" position="attributes">
    <attribute name="column_invisible">1</attribute>
</field>
<field name="qty_forecast" position="after">
    <field name="qty_forecast_stored"/>
</field>

Forward-Port-Of: #948

@roboadhoc

Copy link
Copy Markdown
Collaborator

Pull request status dashboard

@fw-bot-adhoc

Copy link
Copy Markdown
Contributor Author

@mav-adhoc @les-adhoc cherrypicking of pull request #948 failed.

stdout:

Auto-merging stock_orderpoint_manual_update/__manifest__.py
CONFLICT (content): Merge conflict in stock_orderpoint_manual_update/__manifest__.py

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @roboadhoc.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants