xxx_view_ref are working not correct with a many2one field inside

Bug #833814 reported by Manfred Rockel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
High
OpenERP sa GTK client R&D

Bug Description

I have 2 different views for object „product.supplierinfo“
Please try product_test.zip modul and look at the video.

Client 6.03 rev. 1884
Server 6.03 rev. 3475

Related branches

Revision history for this message
Manfred Rockel (mrockel) wrote :

Video

Revision history for this message
Manfred Rockel (mrockel) wrote :

Test modul

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Manfred,

I have tested your scenario with trunk and stable6 both and it is working fine at my end.

The main issue which you are missing in your code is proper inheriting the tree view. The following patch will add the product code field in the tree view of product.supplierinfo.

After applying the changes it is working so I am again attaching the related changed module would you please

check it and notify us where you faced the problem.

Thanks and waiting for your reply.

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :
Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Manfred Rockel (mrockel) wrote :
Download full text (3.5 KiB)

Hello Vishal,

please install additional the following modul(partner_test) and try again.

I think it should be possible to call multiple views with the same object.

example without inherits:

<field name="supplier_product_ids1" nolabel='1'
  context="{'form_view_ref' : 'partner_test.supplier_productinfo_form_view1',
     'tree_view_ref' : 'partner_test.supplier_productinfo_tree_view1'}"/>

<field name="supplier_product_ids2" nolabel=''
  context="{'form_view_ref' : 'partner_test.supplier_productinfo_form_view2',
     'tree_view_ref' : 'partner_test.supplier_productinfo_tree_view2'}"/>

<field name="supplier_product_ids3" nolabel='1'
  context="{'form_view_ref' : 'partner_test.supplier_productinfo_form_view3',
     'tree_view_ref' : 'partner_test.supplier_productinfo_tree_view3'}"/>

        <record id="supplier_productinfo_tree_view1" model="ir.ui.view">
            <field name="name">rockel.supplier.productinfo.tree.view</field>
            <field name="model">product.supplierinfo</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Supplier Product Information">
                    <field name="sequence" invisible="True"/>
                    <field name="product_id"/>
                    <field name="product_code" string="Lief. Art.-Nr."/>
                    <field name="price"/>
                </tree>
            </field>
        </record>

        <record id="supplier_productinfo_form_view1" model="ir.ui.view">
            <field name="name">rockel.supplier.productinfo.form.view</field>
            <field name="model">product.supplierinfo</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Supplier Product Information">
                    <field name="sequence"/>
                    <newline/>
                    <field name="product_id" colspan="4"/>
                </form>
            </field>
        </record>

        <record id="supplier_productinfo_tree_view2" model="ir.ui.view">
            <field name="name">rockel.supplier.productinfo.tree.view</field>
            <field name="model">product.supplierinfo</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Supplier Product Information">
                    <field name="sequence" invisible="True"/>
                    <field name="product_id"/>
                    <field name="product_code" string="Lief. Art.-Nr."/>
                    <field name="price"/>
                </tree>
            </field>
        </record>

        <record id="supplier_productinfo_form_view2" model="ir.ui.view">
            <field name="name">rockel.supplier.productinfo.form.view</field>
            <field name="model">product.supplierinfo</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Supplier Product Information">Vishal
                    <field name="sequence"/>
                    <newline/>
                    <field name="product_id" colspan="4"/>
                </form>
            </field>
      ...

Read more...

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Manfred Rockel,

Thanks for the nice bug report ! The problem is from the client side which does not remove the "tree_view_ref" from the context of child widget as the key comes from the parent context. I would provide a merge proposal soon for the trunk version.

@OPW: The same bug should also be fixed on stable too

Thanks

Changed in openobject-server:
importance: Low → High
affects: openobject-server → openobject-client
Changed in openobject-client:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: High → Low
status: Confirmed → In Progress
importance: Low → High
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

it has been fixed at lp:~openerp-dev/openobject-client/trunk-bug-833814-nch and will be merged soon to the trunk client

Thanks,

Changed in openobject-client:
status: In Progress → Fix Committed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

The fix has been merged to the trunk client with revision-info:1944 <email address hidden>

Thanks

Changed in openobject-client:
status: Fix Committed → Fix Released
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.