Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [16.0] stock_picking_invoice_link: same elements added to stock move form view from different xml view extensions #1785

Open
rrebollo opened this issue Dec 8, 2024 · 0 comments

Comments

@rrebollo
Copy link

rrebollo commented Dec 8, 2024

The following code:

<record id="view_move_form" model="ir.ui.view">
<field name="name">stock_picking_invoice_link.stock.move.form</field>
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_form" />
<field name="arch" type="xml">
<group name="linked_group" position="after">
<field name="invoice_line_ids" inivisible="1" />
<group
name="invoice_line"
string="Invoice Lines"
colspan="2"
attrs="{'invisible':[('invoice_line_ids', '=', [])]}"
>
<field
name="invoice_line_ids"
nolabel="1"
groups="account.group_account_invoice"
widget="one2many_list"
/>
</group>
</group>
</field>
</record>
<record id="view_move_picking_form" model="ir.ui.view">
<field name="name">stock_picking_invoice_link.stock.move.picking.form</field>
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_form" />
<field name="arch" type="xml">
<group position="after">
<field name="invoice_line_ids" inivisible="1" />
<group
name="invoice_line"
string="Invoice Lines"
attrs="{'invisible':[('invoice_line_ids', '=', [])]}"
>
<field
name="invoice_line_ids"
nolabel="1"
groups="account.group_account_invoice"
widget="one2many_list"
/>
</group>
</group>
</field>
</record>

Is producing this issue:
image

Steps to reproduce on Runboat:

  1. Install stock_picking_invoice_link
  2. Navigate to Inventory > Reporting > Stock Moves.
  3. Select a record to open the form view.

Observations:

  • The code has remained nearly identical since version 13.
  • It's likely that the second view was intended to extend a specific one, leading to this unintended behavior as collateral damage.
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

No branches or pull requests

1 participant