[tryton-debian-vcs] tryton-server branch upstream updated. upstream/3.8.4-1-g8cb50eb
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Sat Apr 9 18:56:23 UTC 2016
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=upstream/3.8.4-1-g8cb50eb
commit 8cb50eb3c0d9439430e985853eed99a4013f1b09
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Apr 9 20:05:26 2016 +0200
Adding upstream version 3.8.5.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index fa52ece..d28a116 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.5 - 2016-04-06
+* Bug fixes (see mercurial logs for details)
+
Version 3.8.4 - 2016-03-14
* Bug fixes (see mercurial logs for details)
* Limit the login size in LoginAttempt
diff --git a/PKG-INFO b/PKG-INFO
index c6f2da8..eaae680 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 3.8.4
+Version: 3.8.5
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 c6f2da8..eaae680 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 3.8.4
+Version: 3.8.5
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond.egg-info/requires.txt b/trytond.egg-info/requires.txt
index b1f81fe..12c57b9 100644
--- a/trytond.egg-info/requires.txt
+++ b/trytond.egg-info/requires.txt
@@ -5,11 +5,14 @@ python-dateutil
polib
python-sql >= 0.4
-[cdecimal]
-cdecimal
+[BCrypt]
+bcrypt
-[unoconv]
-unoconv
+[Levenshtein]
+python-Levenshtein
+
+[MySQL]
+MySQL-python
[PostgreSQL]
psycopg2 >= 2.0
@@ -17,17 +20,14 @@ psycopg2 >= 2.0
[WebDAV]
PyWebDAV >= 0.9.8
-[simplejson]
-simplejson
-
-[MySQL]
-MySQL-python
+[cdecimal]
+cdecimal
-[BCrypt]
-bcrypt
+[graphviz]
+pydot
-[Levenshtein]
-python-Levenshtein
+[simplejson]
+simplejson
-[graphviz]
-pydot
\ No newline at end of file
+[unoconv]
+unoconv
diff --git a/trytond/__init__.py b/trytond/__init__.py
index 5e7fd21..43b3472 100644
--- a/trytond/__init__.py
+++ b/trytond/__init__.py
@@ -4,7 +4,7 @@ import os
import time
from email import charset
-__version__ = "3.8.4"
+__version__ = "3.8.5"
os.environ['TZ'] = 'UTC'
if hasattr(time, 'tzset'):
diff --git a/trytond/backend/mysql/table.py b/trytond/backend/mysql/table.py
index 8fff840..14b604d 100644
--- a/trytond/backend/mysql/table.py
+++ b/trytond/backend/mysql/table.py
@@ -88,6 +88,7 @@ class TableHandler(TableHandlerInterface):
self.cursor.execute('ALTER TABLE `%s` '
'RENAME COLUMN `%s` TO `%s`'
% (self.table_name, old_name, new_name))
+ self._update_definitions()
elif exception and self.column_exist(new_name):
raise Exception('Unable to rename column %s.%s to %s.%s: '
'%s.%s already exist!'
diff --git a/trytond/backend/postgresql/table.py b/trytond/backend/postgresql/table.py
index 66407f5..932481c 100644
--- a/trytond/backend/postgresql/table.py
+++ b/trytond/backend/postgresql/table.py
@@ -134,6 +134,7 @@ class TableHandler(TableHandlerInterface):
self.cursor.execute('ALTER TABLE "%s" '
'RENAME COLUMN "%s" TO "%s"'
% (self.table_name, old_name, new_name))
+ self._update_definitions()
elif exception and self.column_exist(new_name):
raise Exception('Unable to rename column %s.%s to %s.%s: '
'%s.%s already exist!'
diff --git a/trytond/backend/sqlite/table.py b/trytond/backend/sqlite/table.py
index 0e7317b..236645e 100644
--- a/trytond/backend/sqlite/table.py
+++ b/trytond/backend/sqlite/table.py
@@ -115,6 +115,7 @@ class TableHandler(TableHandlerInterface):
','.join('"%s"' % x for x in old_columns) + ' ' +
'FROM "%s"') % (self.table_name, temp_table))
self.cursor.execute('DROP TABLE "%s"' % temp_table)
+ self._update_definitions()
elif exception and self.column_exist(new_name):
raise Exception('Unable to rename column %s.%s to %s.%s: '
'%s.%s already exist!'
diff --git a/trytond/ir/cron.py b/trytond/ir/cron.py
index 336def8..470e901 100644
--- a/trytond/ir/cron.py
+++ b/trytond/ir/cron.py
@@ -15,6 +15,7 @@ from ..transaction import Transaction
from ..pool import Pool
from .. import backend
from ..config import config
+from ..cache import Cache
__all__ = [
'Cron',
@@ -176,6 +177,7 @@ class Cron(ModelSQL, ModelView):
def run(cls, db_name):
now = datetime.datetime.now()
with Transaction().start(db_name, 0) as transaction:
+ Cache.clean(db_name)
transaction.cursor.lock(cls._table)
crons = cls.search([
('number_calls', '!=', 0),
@@ -204,3 +206,4 @@ class Cron(ModelSQL, ModelView):
except Exception:
transaction.cursor.rollback()
logger.error('Running cron %s', cron.id, exc_info=True)
+ Cache.resets(db_name)
diff --git a/trytond/model/fields/property.py b/trytond/model/fields/property.py
index 10a82a6..4cac907 100644
--- a/trytond/model/fields/property.py
+++ b/trytond/model/fields/property.py
@@ -4,6 +4,7 @@ import copy
from sql import Cast, Literal, Null
from sql.functions import Substring, Position
+from sql.conditionals import Case
from .function import Function
from .field import Field, SQL_OPERATORS
@@ -97,7 +98,11 @@ class Property(Function):
Position(',', property_.res) + Literal(1)),
Model.id.sql_type().base),
property_.id,
- where=cond & self.get_condition(sql_type, domain, property_)))
+ # Use a Case because the condition created by get_condition
+ # could result in an invalid Cast
+ where=Case(
+ (cond, self.get_condition(sql_type, domain, property_)),
+ else_=(Literal(1) == Literal(0)))))
props = cursor.fetchall()
default = None
diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py
index c3288ed..4061fbf 100644
--- a/trytond/protocols/dispatcher.py
+++ b/trytond/protocols/dispatcher.py
@@ -296,12 +296,14 @@ def restore(database_name, password, data, update=False):
Database = backend.get('Database')
security.check_super(password)
try:
- database = Database().connect()
+ database = Database(database_name).connect()
cursor = database.cursor()
cursor.close(close=True)
- raise Exception("Database already exists!")
+ existing = True
except Exception:
- pass
+ existing = False
+ if existing:
+ raise Exception('Database already exists!')
Database.restore(database_name, data)
logger.info('RESTORE DB: %s', database_name)
if update:
--
tryton-server
More information about the tryton-debian-vcs
mailing list