From 9bbeaca7d3a3594d775fb114c40469ec2a45e37e Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Sun, 25 Sep 2011 23:08:44 +0200 Subject: [PATCH] [IMP] useability and code cleaning bzr revid: fp@tinyerp.com-20110925210844-g86ikbvnvnsjpzpk --- .../point_of_sale/account_statement_view.xml | 28 ++++------- .../account_statement_wizard.xml | 9 ---- .../point_of_sale/point_of_sale_sequence.xml | 2 +- addons/point_of_sale/point_of_sale_view.xml | 4 +- .../wizard/all_closed_cashbox_of_the_day.py | 48 ------------------- .../wizard/all_closed_cashbox_of_the_day.xml | 31 ------------ .../point_of_sale/wizard/pos_box_entries.xml | 2 +- addons/point_of_sale/wizard/pos_box_out.xml | 2 +- 8 files changed, 14 insertions(+), 112 deletions(-) delete mode 100644 addons/point_of_sale/account_statement_wizard.xml delete mode 100644 addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.py delete mode 100644 addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.xml diff --git a/addons/point_of_sale/account_statement_view.xml b/addons/point_of_sale/account_statement_view.xml index ee922d4fee65..e314f6af1bc9 100644 --- a/addons/point_of_sale/account_statement_view.xml +++ b/addons/point_of_sale/account_statement_view.xml @@ -20,17 +20,6 @@ </field> </record> - <menuitem name="Cash Register" parent="point_of_sale.menu_point_root" id="menu_cash_register" - sequence="4" groups="point_of_sale.group_pos_manager"/> - - <!--<menuitem - name="All Cash Registers" - parent="menu_cash_register" - action="account.action_view_bank_statement_tree" - id="menu_all_menu_cash_register" - sequence="4" - />--> - <record id="view_pos_open_cash_statement_filter" model="ir.ui.view"> <field name="name">account.bank.statement.inherit</field> <field name="model">account.bank.statement</field> @@ -139,14 +128,6 @@ <field name="act_window_id" ref="action_new_bank_statement_all_tree"/> </record> - <menuitem - name="Cash Registers" - parent="menu_cash_register" - action="action_new_bank_statement_all_tree" - id="menu_all_menu_all_register" - sequence="4" - /> - <menuitem name="Cash Register Management" parent="point_of_sale.menu_point_root" id="menu_point_open_config" sequence="1"/> <menuitem @@ -161,5 +142,14 @@ action="action_pos_close_statement" id="menu_close_statement" sequence="2" /> + <menuitem + name="List of Cash Registers" + parent="menu_point_open_config" + action="action_new_bank_statement_all_tree" + id="menu_all_menu_all_register" + sequence="4" + /> + + </data> </openerp> diff --git a/addons/point_of_sale/account_statement_wizard.xml b/addons/point_of_sale/account_statement_wizard.xml deleted file mode 100644 index 25f099810b44..000000000000 --- a/addons/point_of_sale/account_statement_wizard.xml +++ /dev/null @@ -1,9 +0,0 @@ -<openerp> - <data> - - <menuitem icon="STOCK_PRINT" - action="action_report_all_closed_cashbox_of_the_day" - id="menu_all_closed_cashbox_of_the_day" - parent="menu_point_report_register"/> - </data> -</openerp> diff --git a/addons/point_of_sale/point_of_sale_sequence.xml b/addons/point_of_sale/point_of_sale_sequence.xml index d2d4bcc313c0..bf83fe17942b 100644 --- a/addons/point_of_sale/point_of_sale_sequence.xml +++ b/addons/point_of_sale/point_of_sale_sequence.xml @@ -14,7 +14,7 @@ <field name="name">POS Order</field> <field name="code">pos.order</field> <field name="prefix">POS</field> - <field name="padding">6</field> + <field name="padding">4</field> </record> <record model="ir.sequence.type" id="seq_type_pos_order_line"> diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 3ffc5f7dc92d..d7089ec3fd1c 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -694,12 +694,12 @@ groups="group_pos_manager"/> <menuitem - name="Put Money" parent="menu_point_of_sale" + parent="menu_point_of_sale" action="action_box_entries" id="menu_wizard_enter_jrnl" sequence="2" /> <menuitem - name="Take Money" parent="menu_point_of_sale" + parent="menu_point_of_sale" action="action_box_out" id="menu_wizard_enter_jrnl2" sequence="3" /> diff --git a/addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.py b/addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.py deleted file mode 100644 index 330668548e46..000000000000 --- a/addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.py +++ /dev/null @@ -1,48 +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/>. -# -############################################################################## - -from osv import osv - -class all_closed_cashbox_of_the_day(osv.osv_memory): - _name = 'all.closed.cashbox.of.the.day' - _description = 'All closed cashbox of the day' - - def print_report(self, cr, uid, ids, context=None): - """ - To get the date and print the report - @param self: The object pointer. - @param cr: A database cursor - @param uid: ID of the user currently logged in - @param context: A standard dictionary - @return : retrun report - """ - if context is None: - context = {} - datas = {'ids': context.get('active_ids', [])} - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'all.closed.cashbox.of.the.day', - 'datas': datas, - } - -all_closed_cashbox_of_the_day() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.xml b/addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.xml deleted file mode 100644 index e78ef5c6d6a2..000000000000 --- a/addons/point_of_sale/wizard/all_closed_cashbox_of_the_day.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<openerp> - <data> - <!-- pos.details --> - - <record id="view_all_closed_cashbox_of_the_day" model="ir.ui.view"> - <field name="name">all closed cashbox of the day</field> - <field name="model">all.closed.cashbox.of.the.day</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="All Cashboxes Of the day :"> - <button icon='gtk-cancel' special="cancel" - string="Close" /> - <button name="print_report" string="Print Report" - colspan="1" type="object" icon="gtk-print" /> - </form> - </field> - </record> - - - - <record id="action_report_all_closed_cashbox_of_the_day" model="ir.actions.act_window"> - <field name="name">All Cashboxes Of the day</field> - <field name="res_model">all.closed.cashbox.of.the.day</field> - <field name="view_type">form</field> - <field name="view_mode">form</field> - <field name="target">new</field> - </record> - - </data> -</openerp> diff --git a/addons/point_of_sale/wizard/pos_box_entries.xml b/addons/point_of_sale/wizard/pos_box_entries.xml index a3045c4aa74d..2db10e36aa85 100644 --- a/addons/point_of_sale/wizard/pos_box_entries.xml +++ b/addons/point_of_sale/wizard/pos_box_entries.xml @@ -27,7 +27,7 @@ </record> <record id="action_box_entries" model="ir.actions.act_window"> - <field name="name">Box Entries</field> + <field name="name">Put Money In</field> <field name="type">ir.actions.act_window</field> <field name="res_model">pos.box.entries</field> <field name="view_type">form</field> diff --git a/addons/point_of_sale/wizard/pos_box_out.xml b/addons/point_of_sale/wizard/pos_box_out.xml index 97a617b12768..4f19a407a389 100644 --- a/addons/point_of_sale/wizard/pos_box_out.xml +++ b/addons/point_of_sale/wizard/pos_box_out.xml @@ -27,7 +27,7 @@ </record> <record id="action_box_out" model="ir.actions.act_window"> - <field name="name">Take Money</field> + <field name="name">Take Money Out</field> <field name="type">ir.actions.act_window</field> <field name="res_model">pos.box.out</field> <field name="view_type">form</field> -- GitLab