[IMP] Removed bad report

bzr revid: fp@openerp.com-20120513103058-n0lusjarb4vxu7nh
This commit is contained in:
Fabien Pinckaers 2012-05-13 12:30:58 +02:00
parent bdac4ab7ad
commit 94c98bab2a
5 changed files with 2 additions and 170 deletions

View File

@ -62,7 +62,6 @@ Main features :
'point_of_sale_report.xml',
'point_of_sale_view.xml',
'report/pos_order_report_view.xml',
'report/report_cash_register_view.xml',
'point_of_sale_sequence.xml',
'point_of_sale_workflow.xml',
'account_statement_view.xml',

View File

@ -719,16 +719,6 @@
<menuitem name="Point of Sale" parent="base.menu_reporting" id="menu_point_rep" sequence="50" groups="group_pos_manager"/>
<!-- Invoice -->
<record model="ir.actions.act_window" id="action_pos_sale_all">
<field name="name">All Sales Orders</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pos.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
</record>
<menuitem parent="menu_point_rep" id="menu_point_ofsale_all" action="action_pos_sale_all" sequence="1"/>
<record model="ir.actions.act_window" id="action_pos_invoice">
<field name="name">Invoices</field>
<field name="type">ir.actions.act_window</field>
@ -986,7 +976,7 @@
<record model="ir.actions.act_window" id="action_pos_session">
<field name="name">Point of Sale Sessions</field>
<field name="name">All Sessions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pos.session</field>
<field name="view_type">form</field>
@ -998,6 +988,7 @@
parent="menu_point_rep"
action="action_pos_session"
id="menu_pos_session"
sequence="0"
groups="group_pos_manager"/>
<record id="view_pos_order_filter" model="ir.ui.view">

View File

@ -33,6 +33,5 @@ import pos_sales_user_today
import pos_payment_report_user
import pos_report
import pos_order_report
import report_cash_register
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,68 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class report_cash_register(osv.osv):
_name = "report.cash.register"
_description = "Point of Sale Cash Register Analysis"
_auto = False
_columns = {
'date': fields.date('Create Date', readonly=True),
'year': fields.char('Year', size=4),
'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),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'state': fields.selection([('draft', 'Quotation'),('open','Open'),('confirm', 'Confirmed')],'State'),
'journal_id': fields.many2one('account.journal', 'Journal'),
'balance_start': fields.float('Opening Balance'),
'balance_end_real': fields.float('Closing Balance'),
}
_order = 'date desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_cash_register')
cr.execute("""
create or replace view report_cash_register as (
select
min(s.id) as id,
to_date(to_char(s.create_date, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
s.user_id as user_id,
s.journal_id as journal_id,
s.state as state,
s.balance_start as balance_start,
s.balance_end_real as balance_end_real,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day
from account_bank_statement as s
group by
s.user_id,s.journal_id, s.balance_start, s.balance_end_real,s.state,to_char(s.create_date, 'dd-MM-YYYY'),
to_char(s.create_date, 'YYYY'),
to_char(s.create_date, 'MM'),
to_char(s.create_date, 'YYYY-MM-DD'))""")
report_cash_register()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_report_cash_register_tree" model="ir.ui.view">
<field name="name">report.cash.register.tree</field>
<field name="model">report.cash.register</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Point of Sale Cash Register Analysis">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="state" invisible="1"/>
<field name="year" invisible="1"/>
<field name="month" invisible="1"/>
<field name="day" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="balance_start" />
<field name="balance_end_real" />
</tree>
</field>
</record>
<record id="view_report_cash_register_search" model="ir.ui.view">
<field name="name">report.cash.register.search</field>
<field name="model">report.cash.register</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Point of Sale Cash Register Analysis">
<group>
<filter icon="terp-go-year" string="Year" name="year"
domain="[('year','=',time.strftime('%%Y'))]"
help="Cash Analysis created during this year"/>
<separator orientation="vertical"/>
<filter icon="terp-go-month" string="Month" name="This Month"
domain="[('date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Cash Analysis created in current month"/>
<filter icon="terp-go-month"
string="Month -1"
domain="[('date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Cash Analysis created in last month"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today"
string=" Today "
name="today"
domain="[('date','=', time.strftime('%%Y-%%m-%%d'))]"
help="Cash Analysis created by today"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=',('draft'))]"/>
<filter icon="terp-camera_test"
string="Confirm"
domain="[('state','=',('confirm'))]"/>
<separator orientation="vertical"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Sales"
help="My Sales"
domain="[('user_id','=',uid)]"/>
</field>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Day from Creation date of cash register"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Month from Creation date of cash register"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Year from Creation date of cash register"/>
</group>
</search>
</field>
</record>
<record id="action_report_cash_register_all" model="ir.actions.act_window">
<field name="name">Register Analysis</field>
<field name="res_model">report.cash.register</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_report_cash_register_search"/>
<field name="context">{'search_default_year':1,'search_default_This Month':1,'search_default_today':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem action="action_report_cash_register_all" id="menu_report_cash_register_all" parent="menu_point_rep" sequence="1"/>
</data>
</openerp>