[MERGE] trunk
bzr revid: sle@openerp.com-20140218140417-lrzzswy31wsjr2py
This commit is contained in:
commit
47d1019ed0
|
@ -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 = {
|
||||
|
|
|
@ -116,8 +116,8 @@
|
|||
<p class="oe_view_nocontent_create">
|
||||
Click to create a new order.
|
||||
</p><p>
|
||||
Use this menu to browse your preceeding orders. To record new
|
||||
orders, you should better use the menu <i>Your Session</i> for
|
||||
Use this menu to browse previous orders. To record new
|
||||
orders, you may use the menu <i>Your Session</i> for
|
||||
the touchscreen interface.
|
||||
</p>
|
||||
</field>
|
||||
|
@ -979,7 +979,7 @@
|
|||
currencies in your cash registers at the beginning and the end
|
||||
of each session.
|
||||
</p><p>
|
||||
Note that you should better to use the menu <i>Your Session</i>
|
||||
Note that you may use the menu <i>Your Session</i>
|
||||
to quickly open a new session.
|
||||
</p>
|
||||
</field>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import test_converter
|
||||
#import test_requests
|
||||
import test_requests
|
||||
import test_ui
|
||||
import test_views
|
||||
|
|
|
@ -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))
|
|
@ -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())
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<field name="website_path"
|
||||
on_change="on_change_website_path(website_path, xml_id, context)"
|
||||
attrs="{'invisible': ['|', ('website_published', '!=', True), ('state', '!=', 'code')]}"/>
|
||||
<field name="website_url" readonly="1"
|
||||
<field name="website_url" readonly="1" widget="url"
|
||||
attrs="{'invisible': ['|', ('website_published', '!=', True), ('state', '!=', 'code')]}"/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue