diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 30fcff2e5e6..0d97fdb1a0b 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -69,7 +69,7 @@ class pos_config(osv.osv): 'currency_id' : fields.function(_get_currency, type="many2one", string="Currency", relation="res.currency"), 'iface_self_checkout' : fields.boolean('Self Checkout Mode', help="Check this if this point of sale should open by default in a self checkout mode. If unchecked, OpenERP uses the normal cashier mode by default."), - 'iface_cashdrawer' : fields.boolean('Cashdrawer',help="Automatically open the cashdrawer"), + 'iface_cashdrawer' : fields.boolean('Cashdrawer', help="Automatically open the cashdrawer"), 'iface_payment_terminal' : fields.boolean('Payment Terminal', help="Enables Payment Terminal integration"), 'iface_electronic_scale' : fields.boolean('Electronic Scale', help="Enables Electronic Scale integration"), 'iface_vkeyboard' : fields.boolean('Virtual KeyBoard', help="Enables an integrated Virtual Keyboard"), @@ -1305,7 +1305,7 @@ class product_product(osv.osv): 'income_pdt': fields.boolean('Point of Sale Cash In', help="Check if, this is a product you can use to put cash into a statement for the point of sale backend."), 'expense_pdt': fields.boolean('Point of Sale Cash Out', help="Check if, this is a product you can use to take cash from a statement for the point of sale backend, example: money lost, transfer to bank, etc."), 'available_in_pos': fields.boolean('Available in the Point of Sale', help='Check if you want this product to appear in the Point of Sale'), - 'to_weight' : fields.boolean('To Weight', help="Check if the product should be weighted (mainly used with self check-out interface)."), + 'to_weight' : fields.boolean('To Weigh', help="Check if the product should be weighted (mainly used with self check-out interface)."), } _defaults = { diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 50573017909..7740020e37f 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -116,8 +116,8 @@
Click to create a new order.
- Use this menu to browse your preceeding orders. To record new - orders, you should better use the menu Your Session for + Use this menu to browse previous orders. To record new + orders, you may use the menu Your Session for the touchscreen interface.
@@ -979,7 +979,7 @@ currencies in your cash registers at the beginning and the end of each session.- Note that you should better to use the menu Your Session + Note that you may use the menu Your Session to quickly open a new session.
diff --git a/addons/website/tests/__init__.py b/addons/website/tests/__init__.py index f227a750bdd..b7eb1831806 100644 --- a/addons/website/tests/__init__.py +++ b/addons/website/tests/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- import test_converter -#import test_requests +import test_requests import test_ui import test_views diff --git a/addons/website/tests/cases.py b/addons/website/tests/cases.py new file mode 100644 index 00000000000..3e777293ff9 --- /dev/null +++ b/addons/website/tests/cases.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +import unittest2 + +class URLCase(unittest2.TestCase): + """ + URLCase moved out of test_requests, otherwise discovery attempts to + instantiate and run it + """ + def __init__(self, user, url, source, result): + super(URLCase, self).__init__() + self.user = user + self.url = url + self.source = source + self.result = result + + @property + def username(self): + return self.user or "Anonymous Coward" + + def __str__(self): + if self.source: + return "%s (from %s, as %s)" % (self.url, self.source, self.username) + return "%s (as %s)" % (self.url, self.username) + + __repr__ = __str__ + + def shortDescription(self): + return "" + + def runTest(self): + code = self.result.getcode() + self.assertIn( + code, xrange(200, 300), + "Fetching %s as %s returned an error response (%d)" % ( + self.url, self.username, code)) diff --git a/addons/website/tests/test_requests.py b/addons/website/tests/test_requests.py index 391eee57d0a..9fb29b63c75 100644 --- a/addons/website/tests/test_requests.py +++ b/addons/website/tests/test_requests.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -import collections import urlparse import unittest2 import urllib2 @@ -9,41 +8,10 @@ import lxml.html from openerp import tools +import cases + __all__ = ['load_tests', 'CrawlSuite'] -class URLCase(unittest2.TestCase): - """ - URLCase moved out of test_requests, otherwise discovery attempts to - instantiate and run it - """ - def __init__(self, user, url, source, result): - super(URLCase, self).__init__() - self.user = user - self.url = url - self.source = source - self.result = result - - @property - def username(self): - return self.user or "Anonymous Coward" - - def __str__(self): - if self.source: - return "%s (from %s, as %s)" % (self.url, self.source, self.username) - return "%s (as %s)" % (self.url, self.username) - - __repr__ = __str__ - - def shortDescription(self): - return "" - - def runTest(self): - code = self.result.getcode() - self.assertIn( - code, xrange(200, 300), - "Fetching %s as %s returned an error response (%d)" % ( - self.url, self.username, code)) - class RedirectHandler(urllib2.HTTPRedirectHandler): """ HTTPRedirectHandler is predicated upon HTTPErrorProcessor being used and @@ -96,12 +64,12 @@ class CrawlSuite(unittest2.TestSuite): # blow up in multidb situations self.opener.open('http://localhost:{port}/web/?db={db}'.format( port=tools.config['xmlrpc_port'], - db=werkzeug.url_quote_plus(tools.config['db_name']), + db=werkzeug.urls.url_quote_plus(tools.config['db_name']), )) if user is not None: url = 'http://localhost:{port}/login?{query}'.format( port=tools.config['xmlrpc_port'], - query=werkzeug.url_encode({ + query=werkzeug.urls.url_encode({ 'db': tools.config['db_name'], 'login': user, 'key': password, @@ -149,7 +117,7 @@ class URL(object): self.source = source def to_case(self, user, result): - return URLCase(user, self.url, self.source, result) + return cases.URLCase(user, self.url, self.source, result) def load_tests(loader, base, _): base.addTest(CrawlSuite()) diff --git a/addons/website/views/ir_actions.xml b/addons/website/views/ir_actions.xml index 0573c87af31..ac6005103c1 100644 --- a/addons/website/views/ir_actions.xml +++ b/addons/website/views/ir_actions.xml @@ -17,7 +17,7 @@