[IMP] no need to inherit sale.order report we are already in sale/report +change file name for invoice report
This commit is contained in:
parent
ca008ef74b
commit
6ccbd2cd82
|
@ -19,8 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import sales_crm_account_invoice_report
|
||||
import sale_report
|
||||
import sale_analysis_report
|
||||
|
||||
import invoice_report
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
||||
class sale_report(osv.osv):
|
||||
_inherit = "sale.report"
|
||||
_columns = {
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
}
|
||||
|
||||
def _select(self):
|
||||
return super(sale_report, self)._select() + ", s.section_id as section_id"
|
||||
|
||||
def _group_by(self):
|
||||
return super(sale_report, self)._group_by() + ", s.section_id"
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_order_product_search_sale_crm_inherit" model="ir.ui.view">
|
||||
<field name="name">sale.report.search.sale.crm</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="inherit_id" ref="sale.view_order_product_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="User" position="after">
|
||||
<separator/>
|
||||
<filter string="Sales Team" context="{'group_by':'section_id'}"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -53,6 +53,7 @@ class sale_report(osv.osv):
|
|||
], 'Order Status', readonly=True),
|
||||
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
}
|
||||
_order = 'date desc'
|
||||
|
||||
|
@ -73,7 +74,8 @@ class sale_report(osv.osv):
|
|||
s.state,
|
||||
t.categ_id as categ_id,
|
||||
s.pricelist_id as pricelist_id,
|
||||
s.project_id as analytic_account_id
|
||||
s.project_id as analytic_account_id,
|
||||
s.section_id as section_id
|
||||
"""
|
||||
return select_str
|
||||
|
||||
|
@ -101,7 +103,8 @@ class sale_report(osv.osv):
|
|||
s.company_id,
|
||||
s.state,
|
||||
s.pricelist_id,
|
||||
s.project_id
|
||||
s.project_id,
|
||||
s.section_id
|
||||
"""
|
||||
return group_by_str
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
</group>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Salesperson" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Sales Team" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Partner" icon="terp-partner" name="Customer" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
|
||||
<filter string="Reference Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom'}"/>
|
||||
|
|
Loading…
Reference in New Issue