savoirfairelinux-openerp team mailing list archive
-
savoirfairelinux-openerp team
-
Mailing list archive
-
Message #00190
lp:~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292 into lp:openerp-construction
Maxime Chambreuil (http://www.savoirfairelinux.com) has proposed merging lp:~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292 into lp:openerp-construction.
Requested reviews:
OpenERP Construction Core Editors (openerp-construction-core-editors)
Related bugs:
Bug #1193292 in OpenERP Construction: "after installed construction module, error occur when creating Sales Order on Sales menu."
https://bugs.launchpad.net/openerp-construction/+bug/1193292
For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292/+merge/176074
[FIX] lp:1193292
[IMP] by Vishal Jadav <v.jadav.serpentcs@xxxxxxxxx>
--
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292/+merge/176074
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292.
=== modified file 'sale_insulation/__openerp__.py'
--- sale_insulation/__openerp__.py 2012-06-20 22:01:03 +0000
+++ sale_insulation/__openerp__.py 2013-07-21 19:14:28 +0000
@@ -21,7 +21,7 @@
{
"name" : "Sale Insulation",
- "version" : "0.1",
+ "version" : "1.0",
"author" : "Savoir-faire Linux",
"website" : "http://www.savoirfairelinux.com",
"license" : "AGPL-3",
@@ -31,7 +31,7 @@
for insulation products.
""",
"depends" : [
- "sale",
+ "sale_stock",
"product_insulation",
"procurement_insulation",
"stock_picking_delivery_insulation",
=== modified file 'sale_insulation/sale_insulation.py'
--- sale_insulation/sale_insulation.py 2012-07-31 19:50:48 +0000
+++ sale_insulation/sale_insulation.py 2013-07-21 19:14:28 +0000
@@ -26,7 +26,6 @@
from tools.translate import _
class sale_order(osv.osv):
- _name = 'sale.order'
_inherit = 'sale.order'
def _amount_line_tax(self, cr, uid, line, context=None):
@@ -65,12 +64,10 @@
res['surface'] = line.surface
return res
-
sale_order()
class sale_order_line(osv.osv):
- _name = 'sale.order.line'
_inherit = 'sale.order.line'
def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
@@ -123,7 +120,7 @@
}
def create(self, cr, uid, vals, context=None):
- if vals['product_sprayfoam']:
+ if 'product_sprayfoam' in vals:
try:
vals.update({
'product_uos_qty': vals['surface'] * vals['rvalue'] / vals['product_rvalue']
@@ -131,7 +128,7 @@
except ZeroDivisionError:
pass
else:
- if vals['product_insulation']:
+ if 'product_insulation' in vals:
vals.update({
'surface': vals['product_uos_qty']
})
@@ -218,8 +215,6 @@
uos = False
else:
uos = False
- if product_obj.description_sale:
- result['notes'] = product_obj.description_sale
fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
if update_tax: #The quantity only have changed
result['delay'] = (product_obj.sale_delay or 0.0)
@@ -324,8 +319,7 @@
if line.product_uos:
return line.product_uos_qty or 0.0
return line.product_uom_qty
- else:
- return self.pool.get('procurement.order').quantity_get(cr, uid,
+ return self.pool.get('procurement.order').quantity_get(cr, uid,
line.procurement_id.id, context=context)
def _get_line_uom(line):
@@ -373,7 +367,10 @@
'uos_id': uos_id,
'product_id': line.product_id.id or False,
'invoice_line_tax_id': [(6, 0, [x.id for x in line.tax_id])],
- 'note': line.notes,
+<<<<<<< TREE
+=======
+ #'note': line.notes, Note fields are not available in 7.0
+>>>>>>> MERGE-SOURCE
'account_analytic_id': line.order_id.project_id and line.order_id.project_id.id or False,
'rvalue': line.rvalue,
'surface': line.surface,
=== modified file 'sale_insulation/sale_insulation_view.xml'
--- sale_insulation/sale_insulation_view.xml 2012-06-20 22:01:03 +0000
+++ sale_insulation/sale_insulation_view.xml 2013-07-21 19:14:28 +0000
@@ -1,111 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
- <record id="view_sale_order_insulation" model="ir.ui.view">
- <field name="name">sale.order.form.insulation</field>
- <field name="model">sale.order</field>
- <field name="inherit_id" ref="sale.view_order_form"/>
- <field name="type">form</field>
- <field name="arch" type="xml">
- <data>
-
- <xpath
- expr="//field[@name='order_line']/tree[@string='Sales Order Lines']"
- position="replace">
- <tree string="Sales Order Lines">
- <field colspan="4" name="name"/>
- <field name="surface"/>
- <field name="rvalue"/>
- <field groups="product.group_uos" name="product_uos_qty" string="Qty(UoS)"/>
- <field groups="product.group_uos" name="product_uos" string="UoS"/>
- <field name="price_unit"/>
- <field name="product_uom_qty" string="Qty(UoM)"/>
- <field name="product_uom" string="UoM"/>
- <field name="price_subtotal"/>
- </tree>
- </xpath>
-
- <xpath
- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uos_qty']"
- position="replace">
- </xpath>
-
- <xpath
- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uos']"
- position="replace">
- </xpath>
-
- <xpath
- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uom_qty']"
- position="replace">
- </xpath>
-
- <xpath
- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uom']"
- position="replace">
- </xpath>
-
- <xpath
- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='name']"
- position="after">
- <field name="product_rvalue" invisible="True"/>
- <field name="product_insulation" invisible="True"/>
- <field name="product_sprayfoam" invisible="True" />
- <field name="surface" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_sprayfoam', '=', False)]}"/>
- <newline/>
- <field name="rvalue" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_insulation', '=', False)]} "/>
- <newline/>
- <field groups="product.group_uos" name="product_uos_qty" attrs="{'readonly':[('product_sprayfoam', '==', True)]}" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
- <field groups="product.group_uos" name="product_uos" nolabel="1" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
- <newline/>
- <field name="product_uom_qty"
- 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, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, context)"
- attrs="{'invisible':[('product_insulation','=',True)]}"/>
- <field name="product_uom"
- on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)"
- nolabel="1"
- attrs="{'invisible':[('product_insulation','=',True)]}"/>
- <newline/>
- </xpath>
-
- <xpath
- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='discount']"
- position="replace">
- <field name="discount" invisible="True"/>
- </xpath>
-
- <xpath
- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_packaging']"
- position="replace">
- <field name="product_packaging" invisible="True"/>
- </xpath>
-
- <xpath
- expr="//button[@string='Print Quotation']"
- position="replace">
- <button
- name="%(report_sale_order_quotation)d"
- string="Print Quotation"
- type="action"
- icon="gtk-print"
- states="draft"/>
- </xpath>
- <xpath
- expr="//button[@string='Print Order']"
- position="replace">
- <button
- name="%(report_sale_order_quotation)d"
- string="Print Order"
- type="action"
- icon="gtk-print"
- states="waiting_date,manual,progress,done,shipping_except,invoice_except"/>
- </xpath>
-
-
-
- </data>
- </field>
- </record>
+
+ <record id="view_sale_order_insulation" model="ir.ui.view">
+ <field name="name">sale.order.form.insulation</field>
+ <field name="model">sale.order</field>
+ <field name="inherit_id" ref="sale.view_order_form"/>
+ <field name="arch" type="xml">
+ <data>
+
+ <xpath
+ expr="//field[@name='order_line']/tree[@string='Sales Order Lines']/field[@name='product_uos_qty']"
+ position="before">
+ <field name="surface"/>
+ <field name="rvalue"/>
+ </xpath>
+
+ <field name="product_uos_qty" position="replace">
+ <field groups="product.group_uos" name="product_uos_qty" attrs="{'readonly':[('product_sprayfoam', '==', True)]}" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
+ </field>
+
+ <field name="product_uos" position="replace">
+ <field groups="product.group_uos" name="product_uos" nolabel="1" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
+ </field>
+
+ <xpath
+ expr="//field[@name='order_line']/form/group/group/field[@name='product_id']"
+ position="after">
+ <field name="product_rvalue" invisible="True"/>
+ <field name="product_insulation" invisible="True"/>
+ <field name="product_sprayfoam" invisible="True" />
+ <label for="surface" attrs="{'invisible':[('product_insulation', '=', False)]}"/>
+ <div>
+ <field name="surface" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_sprayfoam', '=', False)]}" class="oe_inline"/>
+ </div>
+ <label for="rvalue" attrs="{'invisible':[('product_insulation', '=', False)]}"/>
+ <div>
+ <field name="rvalue" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_insulation', '=', False)]}" class="oe_inline"/>
+ </div>
+ </xpath>
+
+ <xpath
+ expr="//form/header/button[@string='Print']"
+ position="attributes">
+ <attribute name="name">%(report_sale_order_quotation)d</attribute>
+ <attribute name="type">action</attribute>
+ </xpath>
+
+ </data>
+ </field>
+ </record>
+
</data>
</openerp>
=== modified file 'stock_picking_delivery_insulation/__openerp__.py'
--- stock_picking_delivery_insulation/__openerp__.py 2012-07-31 19:54:06 +0000
+++ stock_picking_delivery_insulation/__openerp__.py 2013-07-21 19:14:28 +0000
@@ -21,7 +21,7 @@
{
"name" : "Stock Picking Delivery Order Insulation",
- "version" : "0.1",
+ "version" : "1.0",
"author" : "Savoir-faire Linux",
"website" : "http://www.savoirfairelinux.com",
"license" : "AGPL-3",
=== modified file 'stock_picking_delivery_insulation/stock_picking_delivery_insulation_view.xml'
--- stock_picking_delivery_insulation/stock_picking_delivery_insulation_view.xml 2012-06-20 22:01:03 +0000
+++ stock_picking_delivery_insulation/stock_picking_delivery_insulation_view.xml 2013-07-21 19:14:28 +0000
@@ -6,7 +6,6 @@
<field name="name">stock.picking.delivery.insulation.form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_out_form"/>
- <field name="type">form</field>
<field name="arch" type="xml">
<data>
=== modified file 'stock_picking_delivery_users/__openerp__.py'
--- stock_picking_delivery_users/__openerp__.py 2012-07-31 19:51:47 +0000
+++ stock_picking_delivery_users/__openerp__.py 2013-07-21 19:14:28 +0000
@@ -21,7 +21,7 @@
{
"name" : "Stock Picking Delivery Users",
- "version" : "0.1",
+ "version" : "1.0",
"author" : "Savoir-faire Linux",
"website" : "http://www.savoirfairelinux.com",
"license" : "AGPL-3",
=== modified file 'stock_picking_delivery_users/stock_picking_delivery_users_view.xml'
--- stock_picking_delivery_users/stock_picking_delivery_users_view.xml 2012-07-31 19:51:47 +0000
+++ stock_picking_delivery_users/stock_picking_delivery_users_view.xml 2013-07-21 19:14:28 +0000
@@ -6,7 +6,6 @@
<field name="name">stock.picking.delivery.form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_out_form"/>
- <field name="type">form</field>
<field name="arch" type="xml">
<data>
@@ -28,7 +27,6 @@
<field name="name">stock.picking.delivery.tree</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_out_tree"/>
- <field name="type">tree</field>
<field name="arch" type="xml">
<field name="state" position="before">
<field name="user_id"/>
@@ -40,13 +38,12 @@
<field name="name">stock.picking.delivery.calendar</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.stock_picking_calendar"/>
- <field name="type">calendar</field>
<field name="arch" type="xml">
<data>
<xpath expr="//calendar[@string='Calendar View']" position="replace">
<calendar string="Calendar View" date_start="min_date" date_stop="max_date" color="user_id">
<field name="origin"/>
- <field name="address_id"/>
+ <field name="partner_id"/>
</calendar>
</xpath>
</data>
Follow ups