[IMP] improves the Sales Analysis reporting views (add filters and changes the row/col definitions) in pivot table mode (addon sale)
bzr revid: ged@openerp.com-20140127110102-so4cma7679uvdwtk
This commit is contained in:
@@ -31,11 +31,6 @@ class sale_report(osv.osv):
|
||||
_columns = {
|
||||
'date': fields.date('Date Order', readonly=True),
|
||||
'date_confirm': fields.date('Date Confirm', readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'),
|
||||
('05', 'May'), ('06', 'June'), ('07', 'July'), ('08', 'August'), ('09', 'September'),
|
||||
('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure', readonly=True),
|
||||
'product_uom_qty': fields.float('# of Qty', readonly=True),
|
||||
@@ -71,9 +66,6 @@ class sale_report(osv.osv):
|
||||
count(*) as nbr,
|
||||
s.date_order as date,
|
||||
s.date_confirm as date_confirm,
|
||||
to_char(s.date_order, 'YYYY') as year,
|
||||
to_char(s.date_order, 'MM') as month,
|
||||
to_char(s.date_order, 'YYYY-MM-DD') as day,
|
||||
s.partner_id as partner_id,
|
||||
s.user_id as user_id,
|
||||
s.company_id as company_id,
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<field name="model">sale.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Sales Analysis" type="pivot" stacked="True">
|
||||
<field name="product_id" type="row"/>
|
||||
<field name="user_id" type="row"/>
|
||||
<field name="date" interval="month" type="col"/>
|
||||
<field name="price_total" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
@@ -21,7 +22,7 @@
|
||||
<field name="date"/>
|
||||
<field name="date_confirm"/>
|
||||
<filter icon="terp-document-new" name="Quotations" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-check" name="Sales" domain="[('state','not in',('draft','done','cancel'))]"/>
|
||||
<filter icon="terp-check" name="sales" string="Sales" domain="[('state','not in',('draft','done','cancel'))]"/>
|
||||
<separator/>
|
||||
<filter icon="terp-personal" string="My Sales" help="My Sales" domain="[('user_id','=',uid)]"/>
|
||||
<field name="partner_id"/>
|
||||
@@ -40,9 +41,9 @@
|
||||
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'analytic_account_id'}" groups="analytic.group_analytic_accounting"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<filter string="Company" icon="terp-go-home" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Ordered date of the sales order"/>
|
||||
<filter string="Month" name="order_month" icon="terp-go-month" context="{'group_by':'month'}" help="Ordered month of the sales order"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Ordered Year of the sales order"/>
|
||||
<filter string="Order Date (day)" icon="terp-go-today" context="{'group_by':'date:day'}" help="Ordered date of the sales order"/>
|
||||
<filter string="Order Date (month)" icon="terp-go-today" context="{'group_by':'date:month'}" help="Ordered date of the sales order"/>
|
||||
<filter string="Order Date (year)" icon="terp-go-today" context="{'group_by':'date:year'}" help="Ordered date of the sales order"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -55,7 +56,7 @@
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="search_view_id" ref="view_order_product_search"/>
|
||||
<field name="view_id" ref="view_order_product_graph"/>
|
||||
<field name="context">{'search_default_year':1,'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="context">{'search_default_sales':1, 'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="help">This report performs analysis on your quotations and sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user