[MERGE] merge from dev3
authorARA (OpenERP) <ara@tinyerp.com>
Wed, 22 Dec 2010 13:03:00 +0000 (18:33 +0530)
committerARA (OpenERP) <ara@tinyerp.com>
Wed, 22 Dec 2010 13:03:00 +0000 (18:33 +0530)
bzr revid: ara@tinyerp.com-20101222130300-yj0dqf0u5gvrnnn6

addons/account/account.py
addons/account/account_view.xml
addons/sale/report/sale_report.py
addons/sale/report/sale_report_view.xml

index 86e8ddf..f8a2d00 100644 (file)
@@ -730,7 +730,6 @@ class account_journal(osv.osv):
         user = user_pool.browse(cr, uid, uid)
         if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency:
             view_id = 'account_journal_bank_view_multi'
-
         data_id = obj_data.search(cr, uid, [('model','=','account.journal.view'), ('name','=',view_id)])
         data = obj_data.browse(cr, uid, data_id[0], context=context)
 
index 2b12b6f..be7cee9 100644 (file)
                     <group colspan="4" col="6">
                         <field name="name" select="1"/>
                         <field name="code" select="1"/>
-                        <field name="type" on_change="onchange_type(type, currency)"/>
+                        <field name="type" on_change="onchange_type(type, currency, context)"/>
                     </group>
                     <notebook colspan="4">
                         <page string="General Information">
index f1dcbc3..cdc8689 100644 (file)
@@ -47,7 +47,6 @@ class sale_report(osv.osv):
         'user_id': fields.many2one('res.users', 'Salesman', readonly=True),
         'price_total': fields.float('Total Price', readonly=True),
         'delay': fields.float('Commitment Delay', digits=(16,2), readonly=True),
-        'price_average': fields.float('Average Price', readonly=True,group_operator="avg"),
         'categ_id': fields.many2one('product.category','Category of Product', readonly=True),
         'nbr': fields.integer('# of Lines', readonly=True),
         'state': fields.selection([
@@ -98,7 +97,6 @@ class sale_report(osv.osv):
                         end) as uom_name,
                         sum(l.product_uom_qty/u.factor) as product_uom_qty,
                         sum(l.product_uom_qty*l.price_unit) as price_total,
-                        (sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty/u.factor)*count(l.product_id))::decimal(16,2) as price_average,
                         pt.categ_id, l.order_id
                     from
                      sale_order_line l
@@ -111,7 +109,6 @@ class sale_report(osv.osv):
                     el.uom_name,
                     el.product_uom_qty,
                     el.price_total,
-                    el.price_average,
                     el.categ_id,
                     el.order_id,
                     s.date_order,
index 40e6b02..b1d98ea 100644 (file)
@@ -23,7 +23,6 @@
                 <field name="product_uom_qty" sum="# of Qty"/>
                 <field name="shipped_qty_1" sum="Shipped Qty"/>
                 <field name="uom_name" invisible="not context.get('set_visible',False)"/>
-                <field name="price_average" sum="Average Price"/>
                 <field name="price_total" sum="Total Price"/>
                 <field name="delay" sum="Commitment Delay"/>
                 <field name="state" invisible="1"/>