[tryton-debian-vcs] tryton-server branch upstream-3.0 updated. upstream/3.0.15-1-ge6a236f

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-3.0 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=upstream/3.0.15-1-ge6a236f

commit e6a236f968e950d03fec48abc48e2a84f49269f0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Apr 9 20:08:47 2016 +0200

    Adding upstream version 3.0.16.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 8fddd7f..5c237a1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.16 - 2016-04-06
+* Bug fixes (see mercurial logs for details)
+
 Version 3.0.15 - 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 a4ca70b..fa93cfd 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 3.0.15
+Version: 3.0.16
 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 a4ca70b..fa93cfd 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.0.15
+Version: 3.0.16
 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 efcab94..6589854 100644
--- a/trytond.egg-info/requires.txt
+++ b/trytond.egg-info/requires.txt
@@ -5,11 +5,11 @@ python-dateutil
 polib
 python-sql >= 0.2
 
-[cdecimal]
-cdecimal
+[Levenshtein]
+python-Levenshtein
 
-[unoconv]
-unoconv
+[MySQL]
+MySQL-python
 
 [PostgreSQL]
 psycopg2 >= 2.0
@@ -17,17 +17,17 @@ psycopg2 >= 2.0
 [WebDAV]
 PyWebDAV >= 0.9.8
 
+[cdecimal]
+cdecimal
+
+[graphviz]
+pydot
+
 [simplejson]
 simplejson
 
-[MySQL]
-MySQL-python
-
 [timezone]
 pytz
 
-[Levenshtein]
-python-Levenshtein
-
-[graphviz]
-pydot
\ No newline at end of file
+[unoconv]
+unoconv
diff --git a/trytond/backend/mysql/table.py b/trytond/backend/mysql/table.py
index 3fc878f..6d4956f 100644
--- a/trytond/backend/mysql/table.py
+++ b/trytond/backend/mysql/table.py
@@ -86,6 +86,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 be4478f..933c298 100644
--- a/trytond/backend/postgresql/table.py
+++ b/trytond/backend/postgresql/table.py
@@ -108,6 +108,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 f2fafcb..f7dc74c 100644
--- a/trytond/backend/sqlite/table.py
+++ b/trytond/backend/sqlite/table.py
@@ -113,6 +113,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 c50fb1d..6871597 100644
--- a/trytond/ir/cron.py
+++ b/trytond/ir/cron.py
@@ -16,6 +16,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),
@@ -208,3 +210,4 @@ class Cron(ModelSQL, ModelView):
                     tb_s = tb_s.decode('utf-8', 'ignore')
                     logger = logging.getLogger('cron')
                     logger.error('Exception:\n%s' % tb_s)
+            Cache.resets(db_name)
diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py
index f2ee5e4..b292f4a 100644
--- a/trytond/protocols/dispatcher.py
+++ b/trytond/protocols/dispatcher.py
@@ -316,12 +316,14 @@ def restore(database_name, password, data, update=False):
     logger = logging.getLogger('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:
diff --git a/trytond/version.py b/trytond/version.py
index 66a4912..3b78b06 100644
--- a/trytond/version.py
+++ b/trytond/version.py
@@ -1,6 +1,6 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
 PACKAGE = "trytond"
-VERSION = "3.0.15"
+VERSION = "3.0.16"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-server



More information about the tryton-debian-vcs mailing list