Merge lp:~openerp-dev/openobject-addons/trunk-bug-785582-psi into lp:openobject-addons

Proposed by Purnendu Singh (OpenERP)
Status: Rejected
Rejected by: Fabien (Open ERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-785582-psi
Merge into: lp:openobject-addons
Diff against target: 182 lines (+84/-85)
1 file modified
sale_layout/sale_layout_view.xml (+84/-85)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-785582-psi
Reviewer Review Type Date Requested Status
Purnendu Singh (OpenERP) (community) Needs Resubmitting
Mustufa Rangwala (Open ERP) (community) Approve
qdp (OpenERP) Pending
Review via email: mp+63093@code.launchpad.net

Description of the change

Hello,

Fixes:
    https://bugs.launchpad.net/openobject-addons/+bug/785582
          Record Can not Save

This patch contains fixes for the 1st issue mention in above bug. set name field required false when layout type is either separator line or page break.

Thanks,
Purnendu Singh

To post a comment you must log in.
4762. By Purnendu Singh (OpenERP)

[IMP] sale_layout: correct tab in view file

Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Working as expected at time of page break/ separator the description field on sale order line becomes required=false and readonly=true but after solving it we are facing problem from GTK as when we try to save sale order it does not allowed us with page break/ separator options.

So we have solved problem from addons side by putting attrs on description field.

Correct following red fields !
Order Lines
-- Description

Thanks,
mra

review: Approve
4763. By Purnendu Singh (OpenERP)

[FIX] sale_layout: Record not saved when layout type selected seperator line or page break in sale order line

Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

hello,

To fix the issue, I have Set attrs on the "name" field on list view too.

Thanks,
Purnendu Singh

review: Needs Resubmitting
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

seems it has already been fixed by a preceeding bug.

Unmerged revisions

4763. By Purnendu Singh (OpenERP)

[FIX] sale_layout: Record not saved when layout type selected seperator line or page break in sale order line

4762. By Purnendu Singh (OpenERP)

[IMP] sale_layout: correct tab in view file

4761. By Purnendu Singh (OpenERP)

[FIX] sale_layout: sale order lines doesn't save when layout type is seperator line or page break

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_layout/sale_layout_view.xml'
2--- sale_layout/sale_layout_view.xml 2011-01-14 00:11:01 +0000
3+++ sale_layout/sale_layout_view.xml 2011-06-14 09:31:39 +0000
4@@ -1,94 +1,93 @@
5 <?xml version="1.0" encoding="utf-8"?>
6 <openerp>
7- <data>
8- <record id="sale.action_order_line_tree2" model="ir.actions.act_window">
9- <field name="domain">[('layout_type','=', 'article')]</field>
10- </record>
11+ <data>
12+ <record id="sale.action_order_line_tree2" model="ir.actions.act_window">
13+ <field name="domain">[('layout_type','=', 'article')]</field>
14+ </record>
15
16- <record model="ir.ui.view" id="view_order_form_inherit_1">
17- <field name="name">sale.order.form.inherit_1</field>
18- <field name="model">sale.order</field>
19- <field name="inherit_id" ref="sale.view_order_form"/>
20- <field name="priority">30</field>
21- <field name="type">form</field>
22- <field name="arch" type="xml">
23- <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
24- <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
25- <form string="Sale Order Lines">
26- <notebook>
27- <page string="Order Line">
28- <separator colspan="4" string="Automatic Declaration"/>
29- <field colspan="4"
30- context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
31- name="product_id"
32- attrs="{'readonly':[('layout_type','!=','article')]}"
33- 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)"
34- select="1"/>
35- <field
36- context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
37- name="product_uom_qty"
38- attrs="{'readonly':[('layout_type','!=','article')]}"
39- 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)"
40- select="1"/>
41- <field name="product_uom"
42- required="0"
43- attrs="{'readonly':[('layout_type','!=','article')], 'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
44- 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)"/>
45- <field
46- name="product_packaging"
47- attrs="{'readonly':[('layout_type','!=','article')]}"
48- context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
49- 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)"
50- domain="[('product_id','=',product_id)]"
51- groups="base.group_extended"/>
52- <separator colspan="4" string="Manual Description" />
53- <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
54- <field name="sequence" string="Seq."/>
55- <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))] }"/>
56- <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
57- <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>
58- <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>
59- <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>
60- <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>
61- <separator colspan="4" string="States"/>
62- <field name="state" select="2"/>
63+ <record model="ir.ui.view" id="view_order_form_inherit_1">
64+ <field name="name">sale.order.form.inherit_1</field>
65+ <field name="model">sale.order</field>
66+ <field name="inherit_id" ref="sale.view_order_form"/>
67+ <field name="type">form</field>
68+ <field name="arch" type="xml">
69+ <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
70+ <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
71+ <form string="Sale Order Lines">
72+ <notebook>
73+ <page string="Order Line">
74+ <separator colspan="4" string="Automatic Declaration"/>
75+ <field colspan="4"
76+ context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
77+ name="product_id"
78+ attrs="{'readonly':[('layout_type','!=','article')]}"
79+ 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)"
80+ select="1"/>
81+ <field
82+ context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
83+ name="product_uom_qty"
84+ attrs="{'readonly':[('layout_type','!=','article')]}"
85+ 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)"
86+ select="1"/>
87+ <field name="product_uom"
88+ required="0"
89+ attrs="{'readonly':[('layout_type','!=','article')], 'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
90+ 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)"/>
91+ <field
92+ name="product_packaging"
93+ attrs="{'readonly':[('layout_type','!=','article')]}"
94+ context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
95+ 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)"
96+ domain="[('product_id','=',product_id)]"
97+ groups="base.group_extended"/>
98+ <separator colspan="4" string="Manual Description" />
99+ <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
100+ <field name="sequence" string="Seq."/>
101+ <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))], 'required':[('layout_type', 'not in', ['line','break'])] }"/>
102+ <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
103+ <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>
104+ <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>
105+ <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>
106+ <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>
107+ <separator colspan="4" string="States"/>
108+ <field name="state" select="2"/>
109 <group col="3" colspan="2">
110 <field name="invoiced" select="2"/>
111 <button colspan="1" name="%(sale.action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
112 </group>
113- </page>
114- <page groups="base.group_extended" string="Extra Info">
115- <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
116- <field groups="product.group_uos" name="product_uos"/>
117- <field name="address_allotment_id" select="2"/>
118- <separator colspan="4" string="Properties"/>
119- <field colspan="4" name="property_ids" nolabel="1"/>
120- </page>
121- <page string="Notes">
122- <field colspan="4" name="notes" nolabel="1"/>
123- </page>
124- <page string="History" groups="base.group_extended">
125- <separator colspan="4" string="Invoice Lines"/>
126- <field colspan="4" name="invoice_lines" nolabel="1"/>
127- <separator colspan="4" string="Stock Moves"/>
128- <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
129- </page>
130- </notebook>
131- </form>
132- <tree string="Sales order lines">
133- <field colspan="4" name="name"/>
134- <field name="product_uom_qty" string="Qty"/>
135- <field name="product_uom" string="UoM"/>
136- <field name="discount"/>
137- <field name="price_unit"/>
138- <!-- field name="price_net"/-->
139- <field name="price_subtotal"/>
140- <field name="sequence"/>
141- </tree>
142- </field>
143- </xpath>
144- </field>
145- </record>
146+ </page>
147+ <page groups="base.group_extended" string="Extra Info">
148+ <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
149+ <field groups="product.group_uos" name="product_uos"/>
150+ <field name="address_allotment_id" select="2"/>
151+ <separator colspan="4" string="Properties"/>
152+ <field colspan="4" name="property_ids" nolabel="1"/>
153+ </page>
154+ <page string="Notes">
155+ <field colspan="4" name="notes" nolabel="1"/>
156+ </page>
157+ <page string="History" groups="base.group_extended">
158+ <separator colspan="4" string="Invoice Lines"/>
159+ <field colspan="4" name="invoice_lines" nolabel="1"/>
160+ <separator colspan="4" string="Stock Moves"/>
161+ <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
162+ </page>
163+ </notebook>
164+ </form>
165+ <tree string="Sales order lines">
166+ <field colspan="4" name="name" attrs="{'readonly':[('layout_type','in',('line','break'))], 'required':[('layout_type', 'not in', ['line','break'])] }"/>
167+ <field name="product_uom_qty" string="Qty"/>
168+ <field name="product_uom" string="UoM"/>
169+ <field name="discount"/>
170+ <field name="price_unit"/>
171+ <!-- field name="price_net"/-->
172+ <field name="price_subtotal"/>
173+ <field name="sequence"/>
174+ </tree>
175+ </field>
176+ </xpath>
177+ </field>
178+ </record>
179
180- </data>
181+ </data>
182 </openerp>

Subscribers

People subscribed via source and target branches

to all changes: