[MERGE] forward port branch 9.0 up to 9e324c061c
This commit is contained in:
@@ -4,14 +4,11 @@
|
||||
from lxml import etree
|
||||
import os
|
||||
import base64
|
||||
try:
|
||||
import cPickle as pickle
|
||||
except ImportError:
|
||||
import pickle
|
||||
import random
|
||||
import datetime
|
||||
from openerp.release import version_info
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools import pickle
|
||||
from openerp.tools.translate import _
|
||||
from openerp.tools.safe_eval import safe_eval as eval
|
||||
|
||||
@@ -447,7 +444,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||
|
||||
# save pickle:
|
||||
fn = open(abs_filepath, 'w')
|
||||
pickle.dump(data, fn, pickle.HIGHEST_PROTOCOL)
|
||||
pickle.dump(data, fn, -1)
|
||||
|
||||
# update the anonymization fields:
|
||||
values = {
|
||||
|
||||
@@ -10,6 +10,9 @@ from openerp.addons.auth_signup.models.res_partner import SignupError
|
||||
from openerp.osv import osv, fields
|
||||
from openerp import SUPERUSER_ID
|
||||
|
||||
from openerp.addons.base.res import res_users
|
||||
res_users.USER_PRIVATE_FIELDS.append('oauth_access_token')
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class res_users(osv.Model):
|
||||
|
||||
@@ -16,8 +16,8 @@ LINE_FIELDS = ['debit', 'credit', 'account_id', 'move_id', 'partner_id']
|
||||
class AccountMove(models.Model):
|
||||
_inherit = "account.move"
|
||||
|
||||
l10n_fr_secure_sequence_number = fields.Integer(readonly=True)
|
||||
l10n_fr_hash = fields.Char(readonly=True)
|
||||
l10n_fr_secure_sequence_number = fields.Integer(readonly=True, copy=False)
|
||||
l10n_fr_hash = fields.Char(readonly=True, copy=False)
|
||||
l10n_fr_string_to_hash = fields.Char(compute='_compute_string_to_hash', readonly=True, store=False)
|
||||
|
||||
def _get_new_hash(self, secure_seq_number):
|
||||
|
||||
@@ -3,4 +3,11 @@ xset s off
|
||||
xset -dpms
|
||||
|
||||
export HOME=/tmp
|
||||
/usr/bin/firefox http://localhost:8069/point_of_sale/display &
|
||||
|
||||
DISPLAY_URL='http://localhost:8069/point_of_sale/display'
|
||||
|
||||
# wait until odoo is ready, otherwise you will have to plug a
|
||||
# keyboard into the posbox just to refresh firefox
|
||||
until wget -q "${DISPLAY_URL}" -O /dev/null ; do sleep 1 ; done
|
||||
|
||||
/usr/bin/firefox "${DISPLAY_URL}" &
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<field name="price_unit" widget="monetary"/>
|
||||
<field name="discount" widget="monetary"/>
|
||||
<field name="tax_ids_after_fiscal_position" widget="many2many_tags"/>
|
||||
<field name="tax_ids" invisible="1"/>
|
||||
<field name="tax_ids" widget="many2many_tags" invisible="1"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
<field name="price_subtotal_incl" widget="monetary"/>
|
||||
</tree>
|
||||
@@ -42,7 +42,7 @@
|
||||
<field name="price_subtotal" invisible="1" widget="monetary"/>
|
||||
<field name="price_subtotal_incl" invisible="1" widget="monetary"/>
|
||||
<field name="tax_ids_after_fiscal_position" widget="many2many_tags"/>
|
||||
<field name="tax_ids" invisible="1"/>
|
||||
<field name="tax_ids" widget="many2many_tags" invisible="1"/>
|
||||
<field name="notice"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -160,6 +160,8 @@ def redirect_with_hash(url, code=303):
|
||||
# See extensive test page at http://greenbytes.de/tech/tc/httpredirects/
|
||||
if request.httprequest.user_agent.browser in ('firefox',):
|
||||
return werkzeug.utils.redirect(url, code)
|
||||
if urlparse.urlparse(url, scheme='http').scheme not in ('http', 'https'):
|
||||
url = 'http://' + url
|
||||
url = url.replace("'", "%27").replace("<", "%3C")
|
||||
return "<html><head><script>window.location = '%s' + location.hash;</script></head></html>" % url
|
||||
|
||||
|
||||
@@ -47,6 +47,19 @@ psycopg2.extensions.register_type(psycopg2.extensions.new_type((700, 701, 1700,)
|
||||
|
||||
|
||||
import tools
|
||||
|
||||
from tools import parse_version as pv
|
||||
if pv(psycopg2.__version__) < pv('2.7'):
|
||||
from psycopg2._psycopg import QuotedString
|
||||
def adapt_string(adapted):
|
||||
"""Python implementation of psycopg/psycopg2#459 from v2.7"""
|
||||
if '\x00' in adapted:
|
||||
raise ValueError("A string literal cannot contain NUL (0x00) characters.")
|
||||
return QuotedString(adapted)
|
||||
|
||||
psycopg2.extensions.register_adapter(str, adapt_string)
|
||||
psycopg2.extensions.register_adapter(unicode, adapt_string)
|
||||
|
||||
from tools.func import frame_codeinfo
|
||||
from datetime import timedelta
|
||||
import threading
|
||||
|
||||
Reference in New Issue
Block a user