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
=== 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-14 09:31:39 +0000
@@ -1,94 +1,93 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<openerp>2<openerp>
3 <data>3 <data>
4 <record id="sale.action_order_line_tree2" model="ir.actions.act_window">4 <record id="sale.action_order_line_tree2" model="ir.actions.act_window">
5 <field name="domain">[('layout_type','=', 'article')]</field>5 <field name="domain">[('layout_type','=', 'article')]</field>
6 </record>6 </record>
77
8 <record model="ir.ui.view" id="view_order_form_inherit_1">8 <record model="ir.ui.view" id="view_order_form_inherit_1">
9 <field name="name">sale.order.form.inherit_1</field>9 <field name="name">sale.order.form.inherit_1</field>
10 <field name="model">sale.order</field>10 <field name="model">sale.order</field>
11 <field name="inherit_id" ref="sale.view_order_form"/>11 <field name="inherit_id" ref="sale.view_order_form"/>
12 <field name="priority">30</field>12 <field name="type">form</field>
13 <field name="type">form</field>13 <field name="arch" type="xml">
14 <field name="arch" type="xml">14 <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
15 <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">15 <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
16 <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">16 <form string="Sale Order Lines">
17 <form string="Sale Order Lines">17 <notebook>
18 <notebook>18 <page string="Order Line">
19 <page string="Order Line">19 <separator colspan="4" string="Automatic Declaration"/>
20 <separator colspan="4" string="Automatic Declaration"/>20 <field colspan="4"
21 <field colspan="4"21 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
22 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"22 name="product_id"
23 name="product_id"23 attrs="{'readonly':[('layout_type','!=','article')]}"
24 attrs="{'readonly':[('layout_type','!=','article')]}"24 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)"
25 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)"25 select="1"/>
26 select="1"/>26 <field
27 <field27 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
28 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"28 name="product_uom_qty"
29 name="product_uom_qty"29 attrs="{'readonly':[('layout_type','!=','article')]}"
30 attrs="{'readonly':[('layout_type','!=','article')]}"30 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)"
31 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)"31 select="1"/>
32 select="1"/>32 <field name="product_uom"
33 <field name="product_uom"33 required="0"
34 required="0"34 attrs="{'readonly':[('layout_type','!=','article')], 'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
35 attrs="{'readonly':[('layout_type','!=','article')], 'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"35 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)"/>
36 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)"/>36 <field
37 <field37 name="product_packaging"
38 name="product_packaging"38 attrs="{'readonly':[('layout_type','!=','article')]}"
39 attrs="{'readonly':[('layout_type','!=','article')]}"39 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
40 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"40 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)"
41 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)"41 domain="[('product_id','=',product_id)]"
42 domain="[('product_id','=',product_id)]"42 groups="base.group_extended"/>
43 groups="base.group_extended"/>43 <separator colspan="4" string="Manual Description" />
44 <separator colspan="4" string="Manual Description" />44 <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
45 <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>45 <field name="sequence" string="Seq."/>
46 <field name="sequence" string="Seq."/>46 <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))], 'required':[('layout_type', 'not in', ['line','break'])] }"/>
47 <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))] }"/>47 <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
48 <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>48 <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>
49 <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>49 <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>
50 <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>50 <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>
51 <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>51 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>
52 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>52 <separator colspan="4" string="States"/>
53 <separator colspan="4" string="States"/>53 <field name="state" select="2"/>
54 <field name="state" select="2"/>
55 <group col="3" colspan="2">54 <group col="3" colspan="2">
56 <field name="invoiced" select="2"/>55 <field name="invoiced" select="2"/>
57 <button colspan="1" name="%(sale.action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoice" type="action"/>56 <button colspan="1" name="%(sale.action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
58 </group>57 </group>
59 </page>58 </page>
60 <page groups="base.group_extended" string="Extra Info">59 <page groups="base.group_extended" string="Extra Info">
61 <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>60 <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
62 <field groups="product.group_uos" name="product_uos"/>61 <field groups="product.group_uos" name="product_uos"/>
63 <field name="address_allotment_id" select="2"/>62 <field name="address_allotment_id" select="2"/>
64 <separator colspan="4" string="Properties"/>63 <separator colspan="4" string="Properties"/>
65 <field colspan="4" name="property_ids" nolabel="1"/>64 <field colspan="4" name="property_ids" nolabel="1"/>
66 </page>65 </page>
67 <page string="Notes">66 <page string="Notes">
68 <field colspan="4" name="notes" nolabel="1"/>67 <field colspan="4" name="notes" nolabel="1"/>
69 </page>68 </page>
70 <page string="History" groups="base.group_extended">69 <page string="History" groups="base.group_extended">
71 <separator colspan="4" string="Invoice Lines"/>70 <separator colspan="4" string="Invoice Lines"/>
72 <field colspan="4" name="invoice_lines" nolabel="1"/>71 <field colspan="4" name="invoice_lines" nolabel="1"/>
73 <separator colspan="4" string="Stock Moves"/>72 <separator colspan="4" string="Stock Moves"/>
74 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>73 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
75 </page>74 </page>
76 </notebook>75 </notebook>
77 </form>76 </form>
78 <tree string="Sales order lines">77 <tree string="Sales order lines">
79 <field colspan="4" name="name"/>78 <field colspan="4" name="name" attrs="{'readonly':[('layout_type','in',('line','break'))], 'required':[('layout_type', 'not in', ['line','break'])] }"/>
80 <field name="product_uom_qty" string="Qty"/>79 <field name="product_uom_qty" string="Qty"/>
81 <field name="product_uom" string="UoM"/>80 <field name="product_uom" string="UoM"/>
82 <field name="discount"/>81 <field name="discount"/>
83 <field name="price_unit"/>82 <field name="price_unit"/>
84 <!-- field name="price_net"/-->83 <!-- field name="price_net"/-->
85 <field name="price_subtotal"/>84 <field name="price_subtotal"/>
86 <field name="sequence"/>85 <field name="sequence"/>
87 </tree>86 </tree>
88 </field>87 </field>
89 </xpath>88 </xpath>
90 </field>89 </field>
91 </record>90 </record>
9291
93 </data>92 </data>
94</openerp>93</openerp>

Subscribers

People subscribed via source and target branches

to all changes: