diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py
index 4128e992c82..b3e18ced10a 100644
--- a/addons/product/__terp__.py
+++ b/addons/product/__terp__.py
@@ -49,13 +49,13 @@
'update_xml': [
'security/product_security.xml',
'security/ir.model.access.csv',
+ 'wizard/product_price_view.xml',
'product_data.xml',
'product_report.xml',
'product_view.xml',
'pricelist_view.xml',
'partner_view.xml',
'company_view.xml',
- 'product_wizard.xml',
'process/product_process.xml'
],
'installable': True,
diff --git a/addons/product/product_wizard.xml b/addons/product/product_wizard.xml
deleted file mode 100644
index f226cd4e543..00000000000
--- a/addons/product/product_wizard.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
diff --git a/addons/product/wizard/__init__.py b/addons/product/wizard/__init__.py
index fed1bcf3783..47f5f2641fc 100644
--- a/addons/product/wizard/__init__.py
+++ b/addons/product/wizard/__init__.py
@@ -18,7 +18,7 @@
# along with this program. If not, see .
#
##############################################################################
-import wizard_price
+import product_price
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/product/wizard/product_price.py b/addons/product/wizard/product_price.py
new file mode 100644
index 00000000000..e5d73945c13
--- /dev/null
+++ b/addons/product/wizard/product_price.py
@@ -0,0 +1,67 @@
+# -*- 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 .
+#
+##############################################################################
+
+from osv import osv, fields
+from tools.translate import _
+
+
+class product_price_list(osv.osv_memory):
+ _name = 'product.price_list'
+ _description = 'Product Price List'
+
+ _columns = {
+ 'price_list': fields.many2one('product.pricelist', 'PriceList', required=True),
+ 'qty1': fields.integer('Quantity-1'),
+ 'qty2': fields.integer('Quantity-2'),
+ 'qty3': fields.integer('Quantity-3'),
+ 'qty4': fields.integer('Quantity-4'),
+ 'qty5': fields.integer('Quantity-5'),
+ }
+ _defaults = {
+ 'qty1': lambda *a: 0,
+ 'qty2': lambda *a: 0,
+ 'qty3': lambda *a: 0,
+ 'qty4': lambda *a: 0,
+ 'qty5': lambda *a: 0,
+ }
+
+ 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 : return report
+ """
+ datas = {'ids': context.get('active_ids', [])}
+ res = self.read(cr, uid, ids, ['price_list','qty1', 'qty2','qty3','qty4','qty5'], context)
+ res = res and res[0] or {}
+ datas['form'] = res
+ return {
+ 'type': 'ir.actions.report.xml',
+ 'report_name': 'product.pricelist',
+ 'datas': datas,
+ }
+product_price_list()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product/wizard/product_price_view.xml b/addons/product/wizard/product_price_view.xml
new file mode 100644
index 00000000000..17d9010ed43
--- /dev/null
+++ b/addons/product/wizard/product_price_view.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+ Price List
+ product.price_list
+ form
+
+
+
+
+
+
+
+
+
diff --git a/addons/product/wizard/wizard_price.py b/addons/product/wizard/wizard_price.py
deleted file mode 100644
index 12c810b802d..00000000000
--- a/addons/product/wizard/wizard_price.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- 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 wizard
-
-qty1_form = '''
-'''
-qty1_fields = {
- 'price_list' : {'string' : 'PriceList', 'type' : 'many2one', 'relation' : 'product.pricelist', 'required':True },
- 'qty1': {'string':'Quantity-1', 'type':'integer', 'default':0},
- 'qty2': {'string':'Quantity-2', 'type':'integer', 'default':0},
- 'qty3': {'string':'Quantity-3', 'type':'integer', 'default':0},
- 'qty4': {'string':'Quantity-4', 'type':'integer', 'default':0},
- 'qty5': {'string':'Quantity-5', 'type':'integer', 'default':0},
-}
-
-
-class wizard_qty(wizard.interface):
-
- states = {
- 'init': {
- 'actions': [],
- 'result': {'type':'form', 'arch':qty1_form, 'fields':qty1_fields, 'state':[('end','Cancel'),('price','Print')]}
- },
- 'price': {
- 'actions': [],
- 'result': {'type':'print', 'report':'product.pricelist', 'state':'end'}
- }
-
- }
-wizard_qty('product.price_list')
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-