Purnendu Singh (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-context_update_xml-psi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-context_update_xml-psi/+merge/64691

Hello,

In following files context was not passed in supported notation.

mrp_repair/mrp_repair_view.xml
purchase/purchase_view.xml
sale/sale_view.xml
sale_layout/sale_layout_view.xml
stock/stock_view.xml

My patch contains fix for these files.

Thanks,
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-context_update_xml-psi/+merge/64691
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-context_update_xml-psi.
=== modified file 'mrp_repair/mrp_repair_view.xml'
--- mrp_repair/mrp_repair_view.xml	2011-02-28 14:22:32 +0000
+++ mrp_repair/mrp_repair_view.xml	2011-06-15 13:51:51 +0000
@@ -116,7 +116,7 @@
                     <page string="Invoicing">
                         <field name="invoice_method" colspan="4"/>
                         <field
-                            name="pricelist_id" context="product_id=product_id"
+                            name="pricelist_id" context="{'product_id':product_id}"
                             attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
                         <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
                         <!-- <field name="invoice_id"/> -->

=== modified file 'purchase/purchase_view.xml'
--- purchase/purchase_view.xml	2011-03-09 16:12:49 +0000
+++ purchase/purchase_view.xml	2011-06-15 13:51:51 +0000
@@ -214,9 +214,9 @@
                             <separator string="Purchase Control" colspan="4"/>
                             <field name="validator"/>
                             <field name="date_approve"/>
-                        	<separator string="Invoices" colspan="4"/>
-                        	<newline/>
-                        	<field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type':'purchase'}"/>
+                            <separator string="Invoices" colspan="4"/>
+                            <newline/>
+                            <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type':'purchase'}"/>
                         </page>
                         <page string="Notes">
                             <field colspan="4" name="notes" nolabel="1"/>
@@ -316,8 +316,8 @@
                 <form string="Purchase Order Line">
                     <notebook colspan="4">
                         <page string="Order Line">
-                            <field name="product_id" colspan="4" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
-                            <field name="product_qty" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
+                            <field name="product_id" colspan="4" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_id}" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
+                            <field name="product_qty" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_id}" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
                             <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
                             <field colspan="4" name="name"/>
                             <field name="date_planned" widget="date"/>

=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml	2011-05-16 09:52:28 +0000
+++ sale/sale_view.xml	2011-06-15 13:51:51 +0000
@@ -126,12 +126,12 @@
                                     <notebook>
                                         <page string="Order Line">
                                             <field colspan="4"
-                                                context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
+                                                context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
                                                 name="product_id"
                                                 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging, parent.fiscal_position, False)"
                                                 />
                                             <field
-                                                context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
+                                                context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
                                                 name="product_uom_qty"
                                                 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, True)"
                                                 />
@@ -141,7 +141,7 @@
                                             <field groups="product.group_uos" name="product_uos"/>
                                             <field
                                                 name="product_packaging"
-                                                context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
+                                                context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
                                                 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, False)"
                                                 domain="[('product_id','=',product_id)]"
                                                 groups="base.group_extended"/>

=== modified file 'sale_layout/sale_layout_view.xml'
--- sale_layout/sale_layout_view.xml	2011-01-14 00:11:01 +0000
+++ sale_layout/sale_layout_view.xml	2011-06-15 13:51:51 +0000
@@ -5,52 +5,52 @@
                <field name="domain">[('layout_type','=', 'article')]</field>
              </record>
 
-		<record model="ir.ui.view" id="view_order_form_inherit_1">
-			<field name="name">sale.order.form.inherit_1</field>
-			<field name="model">sale.order</field>
-			<field name="inherit_id" ref="sale.view_order_form"/>
+        <record model="ir.ui.view" id="view_order_form_inherit_1">
+            <field name="name">sale.order.form.inherit_1</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_order_form"/>
                         <field name="priority">30</field>
-			<field name="type">form</field>
-			<field name="arch" type="xml">
-				<xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
-					<field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
-							<form string="Sale Order Lines">
-								<notebook>
-	                                <page string="Order Line">
-										<separator colspan="4" string="Automatic Declaration"/>
-										<field colspan="4"
-					                        context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
-					                        name="product_id"
-					                        attrs="{'readonly':[('layout_type','!=','article')]}"
-					                        on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging, parent.fiscal_position)"
-					                        select="1"/>
-					                    <field
-					                        context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
-					                        name="product_uom_qty"
-					                        attrs="{'readonly':[('layout_type','!=','article')]}"
-					                        on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)"
-					                        select="1"/>
-					                    <field name="product_uom"
-					                  		 required="0"
-					                    	attrs="{'readonly':[('layout_type','!=','article')],  'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
-					                        on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
-					                    <field
-					                        name="product_packaging"
-					                        attrs="{'readonly':[('layout_type','!=','article')]}"
-					                        context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
-					                        on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)"
-					                        domain="[('product_id','=',product_id)]"
-					                        groups="base.group_extended"/>
-					                    <separator colspan="4" string="Manual Description" />
-					                    <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
-					                    <field name="sequence" string="Seq."/>
-					                    <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))] }"/>
-					                    <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
-					                    <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>
-					                    <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>
-					                    <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>
-					                    <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>
-					                    <separator colspan="4" string="States"/>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
+                    <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
+                            <form string="Sale Order Lines">
+                                <notebook>
+                                    <page string="Order Line">
+                                        <separator colspan="4" string="Automatic Declaration"/>
+                                        <field colspan="4"
+                                            context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
+                                            name="product_id"
+                                            attrs="{'readonly':[('layout_type','!=','article')]}"
+                                            on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging, parent.fiscal_position)"
+                                            select="1"/>
+                                        <field
+                                            context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
+                                            name="product_uom_qty"
+                                            attrs="{'readonly':[('layout_type','!=','article')]}"
+                                            on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)"
+                                            select="1"/>
+                                        <field name="product_uom"
+                                               required="0"
+                                            attrs="{'readonly':[('layout_type','!=','article')],  'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
+                                            on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
+                                        <field
+                                            name="product_packaging"
+                                            attrs="{'readonly':[('layout_type','!=','article')]}"
+                                            context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
+                                            on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)"
+                                            domain="[('product_id','=',product_id)]"
+                                            groups="base.group_extended"/>
+                                        <separator colspan="4" string="Manual Description" />
+                                        <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
+                                        <field name="sequence" string="Seq."/>
+                                        <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))] }"/>
+                                        <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
+                                        <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>
+                                        <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>
+                                        <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>
+                                        <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>
+                                        <separator colspan="4" string="States"/>
                                         <field name="state" select="2"/>
                                         <group col="3" colspan="2">
                                             <field name="invoiced" select="2"/>
@@ -58,11 +58,11 @@
                                         </group>
                                     </page>
                                     <page groups="base.group_extended" string="Extra Info">
-										<field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
-										<field groups="product.group_uos" name="product_uos"/>
-										<field name="address_allotment_id" select="2"/>
-										<separator colspan="4" string="Properties"/>
-										<field colspan="4" name="property_ids" nolabel="1"/>
+                                        <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
+                                        <field groups="product.group_uos" name="product_uos"/>
+                                        <field name="address_allotment_id" select="2"/>
+                                        <separator colspan="4" string="Properties"/>
+                                        <field colspan="4" name="property_ids" nolabel="1"/>
                                     </page>
                                     <page string="Notes">
                                         <field colspan="4" name="notes" nolabel="1"/>
@@ -74,8 +74,8 @@
                                         <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
                                     </page>
                                 </notebook>
-							</form>
-							<tree string="Sales order lines">
+                            </form>
+                            <tree string="Sales order lines">
                                     <field colspan="4" name="name"/>
                                     <field name="product_uom_qty" string="Qty"/>
                                     <field name="product_uom" string="UoM"/>
@@ -85,10 +85,10 @@
                                     <field name="price_subtotal"/>
                                     <field name="sequence"/>
                                 </tree>
-					</field>
-				</xpath>
-			</field>
-		</record>
+                    </field>
+                </xpath>
+            </field>
+        </record>
 
-	</data>
+    </data>
 </openerp>

=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml	2011-05-02 18:46:43 +0000
+++ stock/stock_view.xml	2011-06-15 13:51:51 +0000
@@ -57,7 +57,7 @@
             <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Stock Inventory Lines">
-                    <field context="location=location_id,uom=product_uom,to_date=parent.date" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)" select="1" domain="[('type','&lt;&gt;','service')]"/>
+                    <field context="{'location':location_id, 'uom':product_uom, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)" select="1" domain="[('type','&lt;&gt;','service')]"/>
                     <field name="product_qty"/>
                     <field name="product_uom"/>
                     <field name="prod_lot_id" groups="base.group_extended"/>
@@ -117,7 +117,7 @@
                         <field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list">
                             <tree string="Products" editable="bottom">
                                 <field colspan="4" domain="[('usage','=','internal')]" name="location_id"/>
-                                <field context="location=location_id,uom=product_uom,to_date=parent.date" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)"  domain="[('type','&lt;&gt;','service')]"/>
+                                <field context="{'location':location_id, 'uom':product_uom, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)"  domain="[('type','&lt;&gt;','service')]"/>
                                 <field name="product_qty"/>
                                 <field name="product_uom"/>
                                 <field name="prod_lot_id" groups="base.group_extended"/>
@@ -129,7 +129,7 @@
                             <form string="Products ">
                                 <field domain="[('usage','=','internal')]" name="location_id"/>
                                 <newline/>
-                                <field context="location=location_id,uom=product_uom,to_date=parent.date" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)"  domain="[('type','&lt;&gt;','service')]"/>
+                                <field context="{'location':location_id, 'uom':product_uom, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)"  domain="[('type','&lt;&gt;','service')]"/>
                                 <field name="product_qty"/>
                                 <field name="product_uom"/>
                                 <group colspan="2" col="4">

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to