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

web_widget_x2many_2d_matrix - Domain is not taken into account #2559

Closed
therbin200 opened this issue Jul 10, 2023 · 5 comments · Fixed by #2579
Closed

web_widget_x2many_2d_matrix - Domain is not taken into account #2559

therbin200 opened this issue Jul 10, 2023 · 5 comments · Fixed by #2579
Assignees
Labels

Comments

@therbin200
Copy link

therbin200 commented Jul 10, 2023

Module

web_widget_x2many_2d_matrix

Describe the bug

M2o field is not filtered regarding its domain (view OR field declaration)

To Reproduce

Affected versions: 16.0.1.1.0

Steps to reproduce the behavior:

  1. Declare a m2o field with a domain
  2. Put this field on "field_value" on a view
  3. Select record in the field

Tested in sale_order default form with the following example:

    <record id="view_order_form" model="ir.ui.view">
        <field name="name">view.order.form</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_order_form"/>
        <field name="arch" type="xml">
            <xpath expr="//page[@name='other_information']" position="inside">
                    <field
                        name="order_line"
                        widget="x2many_2d_matrix"
                        field_x_axis="product_uom_qty"
                        field_y_axis="product_id"
                        field_value="route_id"
                        colspan="2"
                    >
                        <tree editable="True" nolabel="1" create="false">
                            <field name="product_uom_qty" />
                            <field name="product_id" />
                            <field name="route_id" domain="[('id', '=', 10)]"/>
                            <field name="company_id" invisible="1"/>
                        </tree>
                    </field>
            </xpath>
        </field>
    </record>

Expected behavior
Domain have to be taken from the view or from the model itself

@therbin200 therbin200 added the bug label Jul 10, 2023
@therbin200
Copy link
Author

@tarteo Could you please have a quick look on this one ?

@therbin200
Copy link
Author

Added code example

@tarteo
Copy link
Member

tarteo commented Aug 1, 2023

I assume this is about version 16.0?

@therbin200
Copy link
Author

This is about version 16.0

@tarteo
Copy link
Member

tarteo commented Aug 1, 2023

@therbin200 Please review the PR.

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 a pull request may close this issue.

2 participants