[6.1] hr_expense product_expense_installer_tree_view break product selection in search form

Bug #1071768 reported by landure
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

Bug Description

With hr_expense installed, it is impossible to select a product from product search form.

Steps to reproduce :

1. Create a sale order.
2. Add a sale order line.
3. In sale order line product select, use the "Search" option.
4. In the product search form, click a product line to select it. It is not selected. A line edition form is displayed instead.

Steps to fix :

In hr_expense/hr_expense_installer_view.xml, remove editable="bottom" from product_expense_installer_tree_view :

        <record id="product_expense_installer_tree_view" model="ir.ui.view">
            <field name="name">product.product.tree</field>
            <field name="model">product.product</field>
            <field name="type">tree</field>
            <field eval="7" name="priority"/>
            <field name="arch" type="xml">
                <tree string="Products">
                    <field name="name"/>
                    <field name="standard_price"/>
                    <field name="list_price"/>
                    <field name="uom_id" string="UoM"/>
                </tree>
            </field>
        </record>

Thank you.

Related branches

Revision history for this message
Anil Kesariya(SerpentCS) (a-kesariya-serpentcs) wrote :

Hello landure,

I have analysed your Bug and here is my conclusion.

I can't found that product search view problem in sale order line which you explained.

It is easily working.

I had installed sale , hr_expense module in new database and analysed your problem i couldn't found that product selection in sale order line.

when i am creating new sale order, adding new sale order line , i can easily select product from search form.

Regards,
Anil,
Serpent Consulting Services

Revision history for this message
landure (landure) wrote :

Hi Anil,

I've tried to recreate the condition of the bug and was not able to succeed. But i've encountered the bug in a production environment.

The hr_expense.product_expense_installer_tree_view priority is 7, same priority as product.product_product_tree_view .

If i lower the priority of hr_expense.product_exp nstaller_tree_view , i encounter the bug. May be it is a random issue, and the solution is to raise the priority of hr_expense.product_expense_installer_tree_view to 16 like all other secondary product trees.

I know that the bug is not easily reproducible, but it has been a issue for me... may be will it be for others.

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
John B (johnb-ca) wrote :

Stumbled across this bug looking for something similar. The priority of this view should definitely be changed to 16 - currently it is replacing the view on popups when searching for a product (e.g. via the Bill of Materials Form).

Revision history for this message
Leonardo Pistone (lepistone) wrote :

Agreed, there are two views with priority 7 so the one that is chosen is unpredictable. The wrong one is indeed choosen in one of my instances, plus on today's runbot instance with all modules installed.

I think just changing the priority does the trick.

Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.