[tryton-debian-vcs] tryton-server branch upstream-4.2 updated. upstream/4.2.5-1-g9eada59
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Aug 17 12:46:22 UTC 2017
The following commit has been merged in the upstream-4.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=upstream/4.2.5-1-g9eada59
commit 9eada59c1f2e4192bf6e1a7d9489ff18ec2ac0b0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Aug 17 13:05:59 2017 +0200
Adding upstream version 4.2.6.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index b9a7da8..d606b4f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.6 - 2017-08-08
+* Bug fixes (see mercurial logs for details)
+
Version 4.2.5 - 2017-07-01
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 5bdce41..f810386 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 4.2.5
+Version: 4.2.6
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond.egg-info/PKG-INFO b/trytond.egg-info/PKG-INFO
index 5bdce41..f810386 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 4.2.5
+Version: 4.2.6
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond/__init__.py b/trytond/__init__.py
index 082599a..808be72 100644
--- a/trytond/__init__.py
+++ b/trytond/__init__.py
@@ -5,7 +5,7 @@ import time
import logging
from email import charset
-__version__ = "4.2.5"
+__version__ = "4.2.6"
logger = logging.getLogger(__name__)
os.environ['TZ'] = 'UTC'
diff --git a/trytond/ir/action.py b/trytond/ir/action.py
index 0aa2298..c17045b 100644
--- a/trytond/ir/action.py
+++ b/trytond/ir/action.py
@@ -899,7 +899,6 @@ class ActionActWindow(ActionMixin, ModelSQL, ModelView):
class ActionActWindowView(ModelSQL, ModelView):
"Action act window view"
__name__ = 'ir.action.act_window.view'
- _rec_name = 'view'
sequence = fields.Integer('Sequence', required=True)
view = fields.Many2One('ir.ui.view', 'View', required=True,
ondelete='CASCADE')
diff --git a/trytond/ir/model.py b/trytond/ir/model.py
index 778becb..bfae9b7 100644
--- a/trytond/ir/model.py
+++ b/trytond/ir/model.py
@@ -384,7 +384,6 @@ class ModelField(ModelSQL, ModelView):
class ModelAccess(ModelSQL, ModelView):
"Model access"
__name__ = 'ir.model.access'
- _rec_name = 'model'
model = fields.Many2One('ir.model', 'Model', required=True,
ondelete="CASCADE")
group = fields.Many2One('res.group', 'Group',
@@ -440,6 +439,13 @@ class ModelAccess(ModelSQL, ModelView):
def default_perm_delete():
return False
+ def get_rec_name(self, name):
+ return self.model.rec_name
+
+ @classmethod
+ def search_rec_name(cls, name, clause):
+ return [('model',) + tuple(clause[1:])]
+
@classmethod
def get_access(cls, models):
'Return access for models'
@@ -568,7 +574,6 @@ class ModelAccess(ModelSQL, ModelView):
class ModelFieldAccess(ModelSQL, ModelView):
"Model Field Access"
__name__ = 'ir.model.field.access'
- _rec_name = 'field'
field = fields.Many2One('ir.model.field', 'Field', required=True,
ondelete='CASCADE')
group = fields.Many2One('res.group', 'Group', ondelete='CASCADE')
@@ -618,6 +623,13 @@ class ModelFieldAccess(ModelSQL, ModelView):
def default_perm_delete():
return True
+ def get_rec_name(self, name):
+ return self.field.rec_name
+
+ @classmethod
+ def search_rec_name(cls, name, clause):
+ return [('field',) + tuple(clause[1:])]
+
@classmethod
def get_access(cls, models):
'Return fields access for models'
diff --git a/trytond/ir/module.py b/trytond/ir/module.py
index 63f2cb3..b66e148 100644
--- a/trytond/ir/module.py
+++ b/trytond/ir/module.py
@@ -377,7 +377,6 @@ class ModuleDependency(ModelSQL, ModelView):
class ModuleConfigWizardItem(ModelSQL, ModelView):
"Config wizard to run after activating a module"
__name__ = 'ir.module.config_wizard.item'
- _rec_name = 'action'
action = fields.Many2One('ir.action', 'Action', required=True,
readonly=True)
sequence = fields.Integer('Sequence', required=True)
diff --git a/trytond/model/modelsql.py b/trytond/model/modelsql.py
index 3d5d164..b94d498 100644
--- a/trytond/model/modelsql.py
+++ b/trytond/model/modelsql.py
@@ -606,13 +606,13 @@ class ModelSQL(ModelStorage):
cls._insert_history(new_ids)
+ field_names = cls._fields.keys()
+ cls._update_mptt(field_names, [new_ids] * len(field_names))
+
records = cls.browse(new_ids)
for sub_records in grouped_slice(records, cache_size()):
cls._validate(sub_records)
- field_names = cls._fields.keys()
- cls._update_mptt(field_names, [new_ids] * len(field_names))
-
cls.trigger_create(records)
return records
diff --git a/trytond/protocols/wrappers.py b/trytond/protocols/wrappers.py
index ae20fe3..e3207dd 100644
--- a/trytond/protocols/wrappers.py
+++ b/trytond/protocols/wrappers.py
@@ -151,7 +151,7 @@ def user_application(name, json=True):
pool = Pool()
UserApplication = pool.get('res.user.application')
- authorization = request.headers['Authorization']
+ authorization = wsgi_to_bytes(request.headers['Authorization'])
try:
auth_type, auth_info = authorization.split(None, 1)
auth_type = auth_type.lower()
diff --git a/trytond/tools/misc.py b/trytond/tools/misc.py
index ec53fe3..385b556 100644
--- a/trytond/tools/misc.py
+++ b/trytond/tools/misc.py
@@ -43,12 +43,14 @@ def file_open(name, mode="r", subdir='modules', encoding=None):
epoint = EGG_MODULES[module_name]
mod_path = os.path.join(epoint.dist.location,
*epoint.module_name.split('.')[:-1])
+ mod_path = os.path.abspath(mod_path)
egg_name = secure_join(mod_path, name)
if not os.path.isfile(egg_name):
# Find module in path
for path in sys.path:
mod_path = os.path.join(path,
*epoint.module_name.split('.')[:-1])
+ mod_path = os.path.abspath(mod_path)
egg_name = secure_join(mod_path, name)
if os.path.isfile(egg_name):
break
--
tryton-server
More information about the tryton-debian-vcs
mailing list