From fe73ab07950a7a06334deb259aacb0b05c64f3cc Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Wed, 7 Jan 2015 15:14:04 +0100 Subject: [PATCH] [IMP] Add settings in Sales Config to install pos_restaurant,pos_loyalty,pos_discount --- addons/point_of_sale/__init__.py | 3 +++ addons/point_of_sale/__openerp__.py | 1 + addons/point_of_sale/res_config.py | 13 ++++++++++ addons/point_of_sale/res_config_view.xml | 32 ++++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 addons/point_of_sale/res_config.py create mode 100644 addons/point_of_sale/res_config_view.xml diff --git a/addons/point_of_sale/__init__.py b/addons/point_of_sale/__init__.py index 6456bb710d5..3303cbd320d 100644 --- a/addons/point_of_sale/__init__.py +++ b/addons/point_of_sale/__init__.py @@ -26,3 +26,6 @@ import report import res_users import res_partner import wizard +import res_config + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index 0479f6e8828..8e3d9859cc1 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -72,6 +72,7 @@ Main Features 'account_statement_report.xml', 'res_users_view.xml', 'res_partner_view.xml', + 'res_config_view.xml', 'views/report_statement.xml', 'views/report_usersproduct.xml', 'views/report_receipt.xml', diff --git a/addons/point_of_sale/res_config.py b/addons/point_of_sale/res_config.py new file mode 100644 index 00000000000..74c5ba90fea --- /dev/null +++ b/addons/point_of_sale/res_config.py @@ -0,0 +1,13 @@ +from openerp.osv import fields, osv + +class sale_configuration(osv.TransientModel): + _inherit = 'sale.config.settings' + + _columns = { + 'module_pos_restaurant': fields.boolean("Use restaurant extensions", + help='This module adds several restaurant features to the Point of Sale: \n\n- Bill Printing: Allows you to print a receipt before the order is paid \n\n- Bill Splitting: Allows you to split an order into different orders \n\n- Kitchen Order Printing: allows you to print orders updates to kitchen or bar printers'), + 'module_pos_loyalty': fields.boolean("Use loyalty programs", + help='Allows you to define a loyalty program in the point of sale, where the customers earn loyalty points and get rewards'), + 'module_pos_discount': fields.boolean("Allow global discounts on point of sales orders", + help='Allows the cashier to quickly give a percentage sale discount for all the sales order to a customer'), + } diff --git a/addons/point_of_sale/res_config_view.xml b/addons/point_of_sale/res_config_view.xml new file mode 100644 index 00000000000..3f8a2c6e7f5 --- /dev/null +++ b/addons/point_of_sale/res_config_view.xml @@ -0,0 +1,32 @@ + + + + + sale.config.settings.form.pos + sale.config.settings + + + + + + + + + + + \ No newline at end of file