← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 833814] Re: xxx_view_ref are working not correct with a many2one field inside

 

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>
        </record>

        <record id="supplier_productinfo_tree_view3" model="ir.ui.view">
	.
	.
	.
	.
	.

Why this is not possible without errors: missing columnsin one2many views, wrong objects in views ..etc
I think this corresponds to the example in the documentation:
  <field name="order_line" colspan="4" nolabel="1"
	  context="{'form_view_ref' : 'module.view_id', 
			'tree_view_ref' : 'module.view_id'}"/>


** Attachment added: "partner_test.zip"
   https://bugs.launchpad.net/openobject-server/+bug/833814/+attachment/2333572/+files/partner_test.zip

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/833814

Title:
  xxx_view_ref are working not correct with a many2one field inside

Status in OpenERP Server:
  Incomplete

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/833814/+subscriptions


References