[IMP] point_of_sale: fix the problem of wizard and add the pos_payment
bzr revid: sbh@tinyerp.com-20100319150020-9z7bnkmb93uw3508
This commit is contained in:
parent
60f17e19a1
commit
d47574cfbd
|
@ -58,7 +58,9 @@ Main features :
|
|||
'wizard/all_closed_cashbox_of_the_day.xml',
|
||||
'wizard/pos_sales_user_current_user.xml',
|
||||
'wizard/pos_sale_user_today.xml',
|
||||
'wizard/pos_receipt_view.xml',
|
||||
'wizard/pos_receipt_view.xml',
|
||||
'wizard/pos_payment_report_user.xml',
|
||||
'wizard/pos_payment_report.xml',
|
||||
'pos_report.xml',
|
||||
'pos_wizard.xml',
|
||||
'pos_view.xml',
|
||||
|
|
|
@ -993,11 +993,11 @@ invoiced
|
|||
<menuitem icon="STOCK_PRINT" action="action_pos_sales_user_today"
|
||||
id="menu_pos_sales_user_today" parent="menu_trans_pos_tree_today" sequence="2" groups="base.group_extended"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_pos_payment_report_date"
|
||||
id="menu_pos_payment_report_date" parent="menu_trans_pos_tree" type="wizard" sequence="5" groups="base.group_extended"/>
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_payment_repport_date"
|
||||
id="menu_pos_payment_report_date" parent="menu_trans_pos_tree" sequence="5" groups="base.group_extended"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_pos_payment_report_user"
|
||||
id="menu_pos_payment_report_user" parent="menu_trans_pos_tree_today" type="wizard" sequence="6" groups="base.group_extended"/>
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_payment_report_user"
|
||||
id="menu_pos_payment_report_user" parent="menu_trans_pos_tree_today" sequence="6" groups="base.group_extended"/>
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_sales_user_today_current_user"
|
||||
id="menu_pos_sales_user_today_current_user" parent="menu_cashboxes_by_day" sequence="7"/>
|
||||
|
||||
|
|
|
@ -427,8 +427,7 @@
|
|||
<menuitem icon="STOCK_PRINT"
|
||||
action="action_report_all_closed_cashbox_of_the_day"
|
||||
id="menu_all_closed_cashbox_of_the_day"
|
||||
parent="menu_statement_tree_all"
|
||||
type="wizard"/>
|
||||
parent="menu_statement_tree_all"/>
|
||||
|
||||
<menuitem
|
||||
name="Close Register" parent="point_of_sale.menu_point_config"
|
||||
|
|
|
@ -25,12 +25,11 @@ import wizard_default_journal
|
|||
import wizard_scan_product
|
||||
|
||||
import wizard_return
|
||||
import wizard_pos_payment_report
|
||||
|
||||
import pos_payment_report_user
|
||||
import pos_payment_report_date
|
||||
import wizard_pos_sales_user_current_user
|
||||
import wizard_pos_details
|
||||
|
||||
|
||||
|
||||
|
||||
#import wizard_open_statement
|
||||
|
||||
import pos_add_product
|
||||
|
@ -47,6 +46,9 @@ import pos_sales_user_today
|
|||
import pos_sales_user_current_user
|
||||
import all_closed_cashbox_of_the_day
|
||||
import pos_receipt
|
||||
import pos_payment_report_user
|
||||
import pos_payment_report_date
|
||||
import pos_payment_report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?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>
|
|
@ -0,0 +1,74 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import pooler
|
||||
import netsvc
|
||||
import wizard
|
||||
import time# -*- 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 netsvc
|
||||
from osv import osv,fields
|
||||
from tools.translate import _
|
||||
from mx import DateTime
|
||||
import time
|
||||
|
||||
class pos_payment_report(osv.osv_memory):
|
||||
_name = 'pos.payment.report'
|
||||
_description = 'Payment Report'
|
||||
|
||||
def print_report(self, cr, uid, ids, context={}):
|
||||
"""
|
||||
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
|
||||
"""
|
||||
|
||||
datas = {'ids' : context.get('active_ids', [])}
|
||||
return {
|
||||
'type':'ir.actions.report.xml',
|
||||
'report_name':'pos.payment.report',
|
||||
'datas':datas,
|
||||
}
|
||||
pos_payment_report()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- pos.details -->
|
||||
|
||||
<record id="view_pos_payment_report" model="ir.ui.view">
|
||||
<field name="name">Payment Report</field>
|
||||
<field name="model">pos.payment.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="POS Details :">
|
||||
<group col="2" colspan="4">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_pos_payment_report" model="ir.actions.act_window">
|
||||
<field name="name">Payment Report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.details</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,29 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="pos_payment_report_date_form" model="ir.ui.view">
|
||||
<field name="name">pos.payment.report.date.form</field>
|
||||
<field name="model">pos.payment.report.date</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sale by Date and User">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="user_id"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Sales lines Report"
|
||||
res_model="pos.payment.report.date"
|
||||
src_model="pos.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_report_pos_payment_repport_date"/>
|
||||
</data>
|
||||
<data>
|
||||
<record id="pos_payment_report_date_form" model="ir.ui.view">
|
||||
<field name="name">pos.payment.report.date.form</field>
|
||||
<field name="model">pos.payment.report.date</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sale by Date and User">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="user_id"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_pos_payment_repport_date" model="ir.actions.act_window">
|
||||
<field name="name">Sales lines Report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.payment.report.date</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- pos.details -->
|
||||
|
||||
<record id="view_pos_payment_report" model="ir.ui.view">
|
||||
<field name="name">Pyament Report</field>
|
||||
<field name="model">pos.payment.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Pyament Report ">
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_report_pos_payment" model="ir.actions.act_window">
|
||||
<field name="name">Pyament Report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.payment.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<!-- <act_window name="POS Details"
|
||||
res_model="pos.details"
|
||||
src_model="pos.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_report_pos_details"/> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,27 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="pos_payment_report_user_form" model="ir.ui.view">
|
||||
<field name="name">pos.payment.report.user.form</field>
|
||||
<field name="model">pos.payment.report.user</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sale by User">
|
||||
<field name="user_id"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Sales lines by Users"
|
||||
res_model="pos.payment.report.user"
|
||||
src_model="pos.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_report_pos_payment_report_user"/>
|
||||
</data>
|
||||
<data>
|
||||
<record id="pos_payment_report_user_form" model="ir.ui.view">
|
||||
<field name="name">pos.payment.report.user.form</field>
|
||||
<field name="model">pos.payment.report.user</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sale by User">
|
||||
<field name="user_id"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_pos_payment_report_user" model="ir.actions.act_window">
|
||||
<field name="name">Sales lines by Userst</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.payment.report.user</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- pos.details -->
|
||||
|
||||
<record id="view_pos_receipt" model="ir.ui.view">
|
||||
<field name="name">Receipt</field>
|
||||
<field name="model">pos.receipt</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Receipt :">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Fill Inventory"
|
||||
res_model="pos.receipt"
|
||||
src_model="pos.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_report_pos_receipt"/>
|
||||
|
||||
<!--record id="action_report_pos_receipt" model="ir.actions.act_window">
|
||||
<field name="name">Receipt</field>
|
||||
<field name="res_model">pos.receipt</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,40 +0,0 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import pooler
|
||||
import netsvc
|
||||
import wizard
|
||||
import time
|
||||
|
||||
|
||||
class wizard_pos_payment_report(wizard.interface):
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [],
|
||||
'result': {'type':'print', 'report':'pos.payment.report', 'state':'end'}
|
||||
},
|
||||
}
|
||||
|
||||
wizard_pos_payment_report('pos.payment.report')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
Loading…
Reference in New Issue