From fad70b1cb21d60b6f7aadb60a1d235c9719a51d7 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 18 Mar 2010 14:48:38 +0530 Subject: [PATCH] [Add] Point_of_sale: Add the report of pos_details bzr revid: sbh@tinyerp.com-20100318091838-vpfesi6lv4br700o --- addons/point_of_sale/__terp__.py | 1 + addons/point_of_sale/pos_view.xml | 1 + addons/point_of_sale/wizard/__init__.py | 1 + addons/point_of_sale/wizard/pos_details.py | 59 +++++++++++++++++++++ addons/point_of_sale/wizard/pos_details.xml | 34 ++++++++++++ 5 files changed, 96 insertions(+) create mode 100644 addons/point_of_sale/wizard/pos_details.py create mode 100644 addons/point_of_sale/wizard/pos_details.xml diff --git a/addons/point_of_sale/__terp__.py b/addons/point_of_sale/__terp__.py index 1721d6609d5..938ad7628a9 100644 --- a/addons/point_of_sale/__terp__.py +++ b/addons/point_of_sale/__terp__.py @@ -51,6 +51,7 @@ Main features : 'wizard/pos_close_statement.xml', 'wizard/pos_box_entries.xml', 'wizard/pos_box_out.xml', + 'wizard/pos_details.xml', 'pos_view.xml', 'pos_sequence.xml', 'posrule_data.xml', diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index 0a72e5f1a50..530a06d4fba 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -995,6 +995,7 @@ invoiced id="menu_pos_payment_report_user" parent="menu_trans_pos_tree_today" type="wizard" sequence="6" groups="base.group_extended"/> + diff --git a/addons/point_of_sale/wizard/__init__.py b/addons/point_of_sale/wizard/__init__.py index 641736a3460..8eafa86daf3 100644 --- a/addons/point_of_sale/wizard/__init__.py +++ b/addons/point_of_sale/wizard/__init__.py @@ -42,5 +42,6 @@ import pos_open_statement import pos_close_statement import pos_box_entries import pos_box_out +import pos_details # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_details.py b/addons/point_of_sale/wizard/pos_details.py new file mode 100644 index 00000000000..69a7ba2c308 --- /dev/null +++ b/addons/point_of_sale/wizard/pos_details.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +import netsvc +from osv import osv,fields +from tools.translate import _ +from mx import DateTime +import time + +class pos_details(osv.osv_memory): + _name = 'pos.details' + _description = 'Order Details' + + _columns = { + 'date_start': fields.datetime('Date Start',), + 'date_end': fields.datetime('Date End'), + } + + def print_report(self, cr, uid, ids, context=None): + + """ + @summary: 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 + """ +# reportname='report.pos.details' +# srv = netsvc.LocalService(reportname) +## pdf, _ = srv.create(cr, uid, ids, {}, context=context) + + return { + 'type' : 'ir.actions.report.xml', + 'report_name':'pos.details', + } + +pos_details() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/point_of_sale/wizard/pos_details.xml b/addons/point_of_sale/wizard/pos_details.xml new file mode 100644 index 00000000000..61b7cf5c97e --- /dev/null +++ b/addons/point_of_sale/wizard/pos_details.xml @@ -0,0 +1,34 @@ + + + + + + + POS Details + pos.details + form + +
+ + + +