[tryton-debian-vcs] tryton-server branch debian-wheezy-2.6 created. ad14e10e1e47cec8347acadab22d33d3a2379132

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:15:11 UTC 2013


The following commit has been merged in the debian-wheezy-2.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=ad14e10e1e47cec8347acadab22d33d3a2379132
commit ad14e10e1e47cec8347acadab22d33d3a2379132
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Oct 17 13:54:33 2013 +0200

    Releasing debian version 2.6.7-1.

diff --git a/debian/changelog b/debian/changelog
index 535fc71..e1f91e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-server (2.6.7-1) unstable; urgency=low
+
+  * Merging upstream version 2.6.7.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Thu, 17 Oct 2013 13:11:36 +0200
+
 tryton-server (2.6.6-1) unstable; urgency=low
 
   * Merging upstream version 2.6.6.
commit 71b0f6782e166035654d88d387055594e02d446c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Oct 17 13:09:26 2013 +0200

    Merging upstream version 2.6.7.

diff --git a/CHANGELOG b/CHANGELOG
index 9f56a78..18c70bb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.7 - 2013-10-01
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.6 - 2013-07-22
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 777f824..335248c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.6
+Version: 2.6.7
 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 777f824..335248c 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.6
+Version: 2.6.7
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/backend/mysql/table.py b/trytond/backend/mysql/table.py
index a579ac6..7978cc0 100644
--- a/trytond/backend/mysql/table.py
+++ b/trytond/backend/mysql/table.py
@@ -272,7 +272,8 @@ class TableHandler(TableHandlerInterface):
                     return
 
             if index_name in self._indexes:
-                self.cursor.execute('DROP INDEX `%s` ' % (index_name,))
+                self.cursor.execute('DROP INDEX `%s` ON `%s`'
+                    % (index_name, self.table_name))
                 self._update_definitions()
         else:
             raise Exception('Index action not supported!')
diff --git a/trytond/ir/trigger.py b/trytond/ir/trigger.py
index 06032bf..742bd9d 100644
--- a/trytond/ir/trigger.py
+++ b/trytond/ir/trigger.py
@@ -212,6 +212,8 @@ class Trigger(ModelSQL, ModelView):
                             timepart_full[0].split(":"))
                         if len(timepart_full) == 2:
                             microseconds = int(timepart_full[1])
+                        else:
+                            microseconds = 0
                         delay[record_id] = datetime.datetime(year, month, day,
                                 hours, minutes, seconds, microseconds)
                     if (datetime.datetime.now() - delay[record_id]
diff --git a/trytond/ir/ui/view.py b/trytond/ir/ui/view.py
index 9047a6e..4f68a54 100644
--- a/trytond/ir/ui/view.py
+++ b/trytond/ir/ui/view.py
@@ -147,15 +147,10 @@ class View(ModelSQL, ModelView):
             # validate pyson attributes
             validates = {
                 'states': fields.states_validate,
-                'domain': fields.domain_validate,
-                'context': fields.context_validate,
-                'digits': fields.digits_validate,
-                'add_remove': fields.add_remove_validate,
             }
 
             def encode(element):
-                for attr in ('states', 'domain', 'context', 'digits',
-                        'add_remove', 'spell', 'colors'):
+                for attr in ('states', 'domain', 'spell', 'colors'):
                     if element.get(attr):
                         try:
                             value = safe_eval(element.get(attr), CONTEXT)
diff --git a/trytond/model/fields/binary.py b/trytond/model/fields/binary.py
index a728303..19f0cab 100644
--- a/trytond/model/fields/binary.py
+++ b/trytond/model/fields/binary.py
@@ -43,7 +43,8 @@ class Binary(Field):
         res = {}
         converter = buffer
         default = False
-        format_ = Transaction().context.pop('%s.%s' % (model, name), '')
+        format_ = Transaction().context.pop('%s.%s' % (model.__name__, name),
+            '')
         if format_ == 'size':
             converter = len
             default = 0
diff --git a/trytond/model/modelview.py b/trytond/model/modelview.py
index 8997f5d..69aee4f 100644
--- a/trytond/model/modelview.py
+++ b/trytond/model/modelview.py
@@ -471,8 +471,7 @@ class ModelView(Model):
 
         # convert attributes into pyson
         encoder = PYSONEncoder()
-        for attr in ('states', 'domain', 'context', 'digits', 'add_remove',
-                'spell', 'colors'):
+        for attr in ('states', 'domain', 'spell', 'colors'):
             if element.get(attr):
                 element.set(attr, encoder.encode(safe_eval(element.get(attr),
                     CONTEXT)))
diff --git a/trytond/security.py b/trytond/security.py
index 14729bc..7455dff 100644
--- a/trytond/security.py
+++ b/trytond/security.py
@@ -35,11 +35,14 @@ def logout(dbname, user, session):
     with Transaction().start(dbname, 0) as transaction:
         pool = _get_pool(dbname)
         Session = pool.get('ir.session')
-        session, = Session.search([
+        sessions = Session.search([
                 ('key', '=', session),
                 ])
+        if not sessions:
+            return
+        session, = sessions
         name = session.create_uid.login
-        Session.delete([session])
+        Session.delete(sessions)
         transaction.cursor.commit()
     return name
 
diff --git a/trytond/version.py b/trytond/version.py
index d64595e..e80852b 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 = "2.6.6"
+VERSION = "2.6.7"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
commit 44ff95ae6bcecd01611bbfec176516c0ce92e299
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Aug 7 17:00:34 2013 +0200

    Releasing debian version 2.6.6-1.

diff --git a/debian/changelog b/debian/changelog
index ad15b71..535fc71 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-server (2.6.6-1) unstable; urgency=low
+
+  * Merging upstream version 2.6.6.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 07 Aug 2013 16:48:42 +0200
+
 tryton-server (2.6.5-1) unstable; urgency=low
 
   * Merging upstream version 2.6.5.
commit 1314a93da3b89c23ec426c7b514e7b88f1da261a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Aug 7 16:43:09 2013 +0200

    Merging upstream version 2.6.6.

diff --git a/CHANGELOG b/CHANGELOG
index 358f843..9f56a78 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.6 - 2013-07-22
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.5 - 2013-06-09
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 6b4669c..777f824 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.5
+Version: 2.6.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 6b4669c..777f824 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.5
+Version: 2.6.6
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py
index b6f1ccb..9bcbac2 100644
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -420,7 +420,7 @@ class ModelStorage(Model):
         if (rec_name not in cls._fields
                 and rec_name not in cls._inherit_fields):
             return []
-        return [(rec_name,) + clause[1:]]
+        return [(rec_name,) + tuple(clause[1:])]
 
     @classmethod
     def browse(cls, ids):
diff --git a/trytond/version.py b/trytond/version.py
index 395ff22..d64595e 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 = "2.6.5"
+VERSION = "2.6.6"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
commit 346d027b3002d44e5ff96b12f20308fd42ba5175
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Jun 11 13:42:27 2013 +0200

    Releasing debian version 2.6.5-1.

diff --git a/debian/changelog b/debian/changelog
index cfe7b1f..ad15b71 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-server (2.6.5-1) unstable; urgency=low
+
+  * Merging upstream version 2.6.5.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Mon, 10 Jun 2013 18:22:25 +0200
+
 tryton-server (2.6.4-1) experimental; urgency=low
 
   * Updating README.Debian to current version.
commit 4b5d793b28a66ffd0f9ae85c40d41dd340803e08
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Jun 10 18:14:37 2013 +0200

    Merging upstream version 2.6.5.

diff --git a/CHANGELOG b/CHANGELOG
index b782ab5..358f843 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.5 - 2013-06-09
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.4 - 2013-05-02
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 16cd738..6b4669c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.4
+Version: 2.6.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 16cd738..6b4669c 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.4
+Version: 2.6.5
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/model/modelsql.py b/trytond/model/modelsql.py
index b85124f..fbb5240 100644
--- a/trytond/model/modelsql.py
+++ b/trytond/model/modelsql.py
@@ -1511,7 +1511,7 @@ class ModelSQL(ModelStorage):
                         ids2 = map(int, Target.search([
                                     ('rec_name', 'ilike', domain[i][2]),
                                     ], order=[]))
-                    elif isinstance(domain[i][2], (int, long)):
+                    elif not isinstance(domain[i][2], list):
                         ids2 = [domain[i][2]]
                     else:
                         ids2 = domain[i][2]
@@ -1605,7 +1605,7 @@ class ModelSQL(ModelStorage):
                         ids2 = map(int, Field.search([
                                     ('rec_name', 'like', domain[i][2]),
                                     ], order=[]))
-                    elif isinstance(domain[i][2], (int, long)):
+                    elif not isinstance(domain[i][2], list):
                         ids2 = [domain[i][2]]
                     else:
                         ids2 = domain[i][2]
diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py
index a7fecf0..b6f1ccb 100644
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -933,7 +933,7 @@ class ModelStorage(Model):
                             domain = PYSONDecoder(env).decode(pyson_domain)
                             relation_ids = []
                             if getattr(record, field_name):
-                                if field._type in ('many2one',):
+                                if field._type in ('many2one', 'one2one'):
                                     relation_ids.append(
                                         getattr(record, field_name).id)
                                 else:
@@ -953,7 +953,7 @@ class ModelStorage(Model):
                         relation_ids = []
                         for record in records:
                             if getattr(record, field_name):
-                                if field._type in ('many2one',):
+                                if field._type in ('many2one', 'one2one'):
                                     relation_ids.append(
                                         getattr(record, field_name).id)
                                 else:
diff --git a/trytond/version.py b/trytond/version.py
index 5f99f74..395ff22 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 = "2.6.4"
+VERSION = "2.6.5"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
commit eabc056205547f30e7bdd104ff1c8d39318720a7
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 12:07:21 2013 +0200

    Releasing debian version 2.6.4-1.

diff --git a/debian/changelog b/debian/changelog
index dfe8c62..cfe7b1f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+tryton-server (2.6.4-1) experimental; urgency=low
+
+  * Updating README.Debian to current version.
+  * Adding group read permissions to trytond conf file.
+  * Removing Daniel from Uploaders. Thanks for your work! (Closes: #704410).
+  * Versioning watch file for Tryton branch 2.6.
+  * Fixing a typo in README.Debian.
+  * Merging upstream version 2.6.4.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sat, 04 May 2013 02:37:20 +0200
+
 tryton-server (2.6.3-2) experimental; urgency=low
 
   * Updating Vcs-Git to correct address.
commit 0ccbdc458f30d068435bddcb6d390b22b3096054
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 02:24:11 2013 +0200

    Merging upstream version 2.6.4.

diff --git a/CHANGELOG b/CHANGELOG
index f906b7b..b782ab5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.4 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.3 - 2013-02-12
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 5c20516..16cd738 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.3
+Version: 2.6.4
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/doc/ref/models/models.rst b/doc/ref/models/models.rst
index 10f173c..fb7d268 100644
--- a/doc/ref/models/models.rst
+++ b/doc/ref/models/models.rst
@@ -388,10 +388,6 @@ Class attributes are:
 
 Class methods:
 
-.. classmethod:: ModelSQL.default_sequence()
-
-    Return default value for sequence field if the model has one.
-
 .. classmethod:: ModelSQL.table_query()
 
     Could be overrided to use a custom SQL query instead of a table of the
diff --git a/doc/topics/views/index.rst b/doc/topics/views/index.rst
index af1aa4e..93872e4 100644
--- a/doc/topics/views/index.rst
+++ b/doc/topics/views/index.rst
@@ -280,9 +280,6 @@ Display a button.
 
     * ``string``: The string that will be displayed inside the button.
 
-    * ``type``: It can be ``object`` or ``action``. The default is ``object``.
-      It defines which type of action must be run when clicking on it.
-
     * ``name``: The name of the action:
 
         * ``object``: the name of the function that will called.  The function
diff --git a/trytond.egg-info/PKG-INFO b/trytond.egg-info/PKG-INFO
index 5c20516..16cd738 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.6.3
+Version: 2.6.4
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/backend/sqlite/database.py b/trytond/backend/sqlite/database.py
index 78715d4..1d902f1 100644
--- a/trytond/backend/sqlite/database.py
+++ b/trytond/backend/sqlite/database.py
@@ -39,6 +39,8 @@ def extract(lookup_type, date):
             hours, minutes, seconds = map(int, timepart_full[0].split(":"))
             if len(timepart_full) == 2:
                 microseconds = int(timepart_full[1])
+            else:
+                microseconds = 0
             date = datetime.datetime(year, month, day, hours, minutes, seconds,
                     microseconds)
     except Exception:
diff --git a/trytond/convert.py b/trytond/convert.py
index 23fe53c..f15b13f 100644
--- a/trytond/convert.py
+++ b/trytond/convert.py
@@ -606,6 +606,7 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
                             'db_id': inherit_db_ids[table],
                             'inherit': True,
                             })
+                        data, = data
                     else:
                         data = self.ModelData.create({
                             'fs_id': fs_id,
diff --git a/trytond/ir/action.py b/trytond/ir/action.py
index 30eb92d..c3fdc3b 100644
--- a/trytond/ir/action.py
+++ b/trytond/ir/action.py
@@ -65,11 +65,11 @@ class Action(ModelSQL, ModelView):
                     'ir.action.url',
                     ):
                 Action = pool.get(action_type)
-                action_id2 = Action.search([
+                actions = Action.search([
                     ('id', '=', action_id),
                     ])
-                if action_id2:
-                    action = Action.browse(action_id2[0])
+                if actions:
+                    action, = actions
                     return action.action.id
 
     @classmethod
@@ -728,7 +728,7 @@ class ActionActWindow(ModelSQL, ModelView):
     def delete(cls, act_windows):
         Action = Pool().get('ir.action')
 
-        actions = [x.action.id for x in act_windows]
+        actions = [x.action for x in act_windows]
         super(ActionActWindow, cls).delete(act_windows)
         Action.delete(actions)
 
@@ -824,7 +824,7 @@ class ActionWizard(ModelSQL, ModelView):
         pool = Pool()
         Action = pool.get('ir.action')
 
-        actions = [x.action.id for x in wizards]
+        actions = [x.action for x in wizards]
 
         super(ActionWizard, cls).delete(wizards)
         Action.delete(actions)
diff --git a/trytond/ir/model.py b/trytond/ir/model.py
index 7480026..9b3880d 100644
--- a/trytond/ir/model.py
+++ b/trytond/ir/model.py
@@ -450,7 +450,6 @@ class ModelFieldAccess(ModelSQL, ModelView):
         pool = Pool()
         Model = pool.get('ir.model')
         ModelField = pool.get('ir.model.field')
-        UserGroup = pool.get('res.user-res.group')
 
         cursor = Transaction().cursor
         key = (model_name, mode, access, Transaction().user)
@@ -464,13 +463,13 @@ class ModelFieldAccess(ModelSQL, ModelView):
                     'ON (a.field = f.id) '
                 'JOIN "%s" AS m '
                     'ON (f.model = m.id) '
-                'LEFT JOIN "%s" AS gu '
+                'LEFT JOIN "res_user-res_group" AS gu '
                     'ON (gu."group" = a."group") '
                 'WHERE m.model = %%s '
                     'AND (gu."user" = %%s OR a."group" IS NULL) '
                 'GROUP BY f.name'
                 % (mode, cls._table, ModelField._table,
-                    Model._table, UserGroup._table), (model_name,
+                    Model._table), (model_name,
                     Transaction().user))
             accesses = dict(cursor.fetchall())
             cls._get_access_cache.set(key, accesses)
diff --git a/trytond/ir/translation.py b/trytond/ir/translation.py
index 31079d2..799dd8b 100644
--- a/trytond/ir/translation.py
+++ b/trytond/ir/translation.py
@@ -105,9 +105,9 @@ class Translation(ModelSQL, ModelView):
             while translations:
                 translations = cls.search([], offset=offset, limit=limit)
                 offset += limit
-                for translation in cls.browse(translations):
+                for translation in translations:
                     src_md5 = cls.get_src_md5(translation.src)
-                    cls.write(translation.id, {
+                    cls.write([translation], {
                         'src_md5': src_md5,
                     })
             table = TableHandler(cursor, cls, module_name)
diff --git a/trytond/ir/trigger.py b/trytond/ir/trigger.py
index e8da5d4..06032bf 100644
--- a/trytond/ir/trigger.py
+++ b/trytond/ir/trigger.py
@@ -161,7 +161,8 @@ class Trigger(ModelSQL, ModelView):
         """
         pool = Pool()
         TriggerLog = pool.get('ir.trigger.log')
-        Model = pool.get(trigger.action_model.model)
+        Model = pool.get(trigger.model.model)
+        ActionModel = pool.get(trigger.action_model.model)
         cursor = Transaction().cursor
         ids = map(int, records)
 
@@ -221,7 +222,7 @@ class Trigger(ModelSQL, ModelView):
 
         records = Model.browse(ids)
         if records:
-            getattr(Model, trigger.action_function)(records, trigger)
+            getattr(ActionModel, trigger.action_function)(records, trigger)
         if trigger.limit_number or trigger.minimum_delay:
             for record in records:
                 TriggerLog.create({
diff --git a/trytond/ir/ui/menu.py b/trytond/ir/ui/menu.py
index c7ea2dd..df5c263 100644
--- a/trytond/ir/ui/menu.py
+++ b/trytond/ir/ui/menu.py
@@ -209,7 +209,10 @@ class UIMenu(ModelSQL, ModelView):
         if action_keywords:
             with Transaction().set_context(_timestamp=False):
                 ActionKeyword.delete(action_keywords)
-        action_type, action_id = value.split(',')
+        if isinstance(value, basestring):
+            action_type, action_id = value.split(',')
+        else:
+            action_type, action_id = value
         if not int(action_id):
             return
         Action = pool.get(action_type)
diff --git a/trytond/model/modelsql.py b/trytond/model/modelsql.py
index d80f4f9..b85124f 100644
--- a/trytond/model/modelsql.py
+++ b/trytond/model/modelsql.py
@@ -369,7 +369,7 @@ class ModelSQL(ModelStorage):
                 for name, _, error in cls._sql_constraints:
                     if name in exception[0]:
                         cls.raise_user_error(error)
-                for name, error in cls._sql_error_messages:
+                for name, error in cls._sql_error_messages.iteritems():
                     if name in exception[0]:
                         cls.raise_user_error(error)
             raise
@@ -886,7 +886,7 @@ class ModelSQL(ModelStorage):
                     for name, _, error in cls._sql_constraints:
                         if name in exception[0]:
                             cls.raise_user_error(error)
-                    for name, error in cls._sql_error_messages:
+                    for name, error in cls._sql_error_messages.iteritems():
                         if name in exception[0]:
                             cls.raise_user_error(error)
                 raise
@@ -1108,7 +1108,7 @@ class ModelSQL(ModelStorage):
                     for name, _, error in cls._sql_constraints:
                         if name in exception[0]:
                             cls.raise_user_error(error)
-                    for name, error in cls._sql_error_messages:
+                    for name, error in cls._sql_error_messages.iteritems():
                         if name in exception[0]:
                             cls.raise_user_error(error)
                 raise
@@ -1677,7 +1677,7 @@ class ModelSQL(ModelStorage):
                         table_join = 'LEFT JOIN "ir_translation" ' \
                                 'ON (ir_translation.name = ' \
                                         'ir_model.model||\',%s\' ' \
-                                    'AND ir_translation.res_id = 0 ' \
+                                    'AND ir_translation.res_id IS NULL ' \
                                     'AND ir_translation.lang = %%s ' \
                                     'AND ir_translation.type = \'model\' ' \
                                     'AND ir_translation.fuzzy = %%s)' % \
@@ -1692,7 +1692,7 @@ class ModelSQL(ModelStorage):
                                 'LEFT JOIN "ir_translation" ' \
                                 'ON (ir_translation.name = ' \
                                         'ir_model.model||\',\'||%s.name ' \
-                                    'AND ir_translation.res_id = 0 ' \
+                                    'AND ir_translation.res_id IS NULL ' \
                                     'AND ir_translation.lang = %%s ' \
                                     'AND ir_translation.type = \'%s\' ' \
                                     'AND ir_translation.fuzzy = %%s)' % \
@@ -1990,7 +1990,7 @@ class ModelSQL(ModelStorage):
                     table_join = 'LEFT JOIN "ir_translation" ' \
                             'AS "%s" ON ' \
                             '("%s".name = "ir_model".model||\',%s\' ' \
-                                'AND "%s".res_id = 0 ' \
+                                'AND "%s".res_id IS NULL ' \
                                 'AND "%s".lang = %%s ' \
                                 'AND "%s".type = \'model\' ' \
                                 'AND "%s".fuzzy = %%s)' % \
@@ -2009,7 +2009,7 @@ class ModelSQL(ModelStorage):
                     table_join = 'LEFT JOIN "ir_translation" ' \
                             'AS "%s" ON ' \
                             '("%s".name = "ir_model".model||\',\'||%s.name ' \
-                                'AND "%s".res_id = 0 ' \
+                                'AND "%s".res_id IS NULL ' \
                                 'AND "%s".lang = %%s ' \
                                 'AND "%s".type = \'%s\' ' \
                                 'AND "%s".fuzzy = %%s)' % \
diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py
index 39d5c9d..a7fecf0 100644
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -557,7 +557,7 @@ class ModelStorage(Model):
                     warn('too_many_relations_found', value, relation)
                     res = None
                 else:
-                    res = res[0]
+                    res = res[0].id
                 return res
 
             def get_many2many(relation, value):
@@ -577,7 +577,7 @@ class ModelStorage(Model):
                     else:
                         res.extend(res2)
                 if len(res):
-                    res = [('set', res)]
+                    res = [('set', [x.id for x in res])]
                 return res
 
             def get_one2one(relation, value):
@@ -669,11 +669,11 @@ class ModelStorage(Model):
                         else:
                             res = bool(int(value))
                     elif field_type == 'integer':
-                        res = value and int(value) or None
+                        res = int(value) if value else None
                     elif field_type == 'float':
-                        res = value and float(value) or None
+                        res = float(value) if value else None
                     elif field_type == 'numeric':
-                        res = value and Decimal(value) or None
+                        res = Decimal(value) if value else None
                     elif field_type == 'date':
                         res = value and datetime.date(*time.strptime(value,
                             '%Y-%m-%d')[:3])
diff --git a/trytond/model/modelview.py b/trytond/model/modelview.py
index 7424b38..8997f5d 100644
--- a/trytond/model/modelview.py
+++ b/trytond/model/modelview.py
@@ -202,7 +202,7 @@ class ModelView(Model):
         else:
             if view_type == 'form':
                 res = cls.fields_get()
-                xml = '''<?xml version="1.0" encoding="utf-8"?>''' \
+                xml = '''<?xml version="1.0"?>''' \
                 '''<form string="%s" col="4">''' % (cls.__doc__,)
                 for i in res:
                     if i in ('create_uid', 'create_date',
@@ -220,7 +220,7 @@ class ModelView(Model):
                 field = 'id'
                 if cls._rec_name in cls._fields:
                     field = cls._rec_name
-                xml = '''<?xml version="1.0" encoding="utf-8"?>''' \
+                xml = '''<?xml version="1.0"?>''' \
                 '''<tree string="%s"><field name="%s"/></tree>''' \
                 % (cls.__doc__, field)
             else:
diff --git a/trytond/modules/__init__.py b/trytond/modules/__init__.py
index b9bdd94..96374e1 100644
--- a/trytond/modules/__init__.py
+++ b/trytond/modules/__init__.py
@@ -404,7 +404,8 @@ def load_modules(database_name, pool, update=False, lang=None):
                             'WHERE module = %s ' \
                             'ORDER BY id DESC', (mod_name,))
                     for rmod, rid in cursor.fetchall():
-                        pool.get(rmod).delete([rmod(rid)])
+                        Model = pool.get(rmod)
+                        Model.delete([Model(rid)])
                     cursor.commit()
                 cursor.execute("UPDATE ir_module_module SET state = %s " \
                         "WHERE state IN ('to remove')", ('uninstalled',))
diff --git a/trytond/res/user.py b/trytond/res/user.py
index c8da3a1..7e80264 100644
--- a/trytond/res/user.py
+++ b/trytond/res/user.py
@@ -549,7 +549,7 @@ class Warning_(ModelSQL, ModelView):
             ])
         if not warnings:
             return True
-        cls.delete([x.id for x in warnings if not x.always])
+        cls.delete([x for x in warnings if not x.always])
         return False
 
 
@@ -575,5 +575,8 @@ class UserConfig(Wizard):
     add = StateTransition()
 
     def transition_add(self):
+        pool = Pool()
+        User = pool.get('res.user')
         self.user.save()
+        self.user = User()
         return 'user'
diff --git a/trytond/version.py b/trytond/version.py
index 5c55226..5f99f74 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 = "2.6.3"
+VERSION = "2.6.4"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
diff --git a/trytond/webdav/webdav.py b/trytond/webdav/webdav.py
index 24663e4..5c3ad66 100644
--- a/trytond/webdav/webdav.py
+++ b/trytond/webdav/webdav.py
@@ -508,7 +508,7 @@ class Collection(ModelSQL, ModelView):
                     data = DAV_NotFound
                     try:
                         if attachment.data is not None:
-                            data = attachment.data
+                            data = str(attachment.data)
                     except Exception:
                         pass
                     if attachment.id == object_id:
@@ -586,20 +586,20 @@ class Collection(ModelSQL, ModelView):
 
     @classmethod
     def rmcol(cls, uri, cache=None):
-        from pywebdav.errors import DAV_Forbidden
+        from pywebdav.lib.errors import DAV_Forbidden
         object_name, object_id = cls._uri2object(uri, cache=cache)
         if object_name != 'webdav.collection' \
                 or not object_id:
             raise DAV_Forbidden
         try:
-            cls.delete(object_id)
+            cls.delete([cls(object_id)])
         except Exception:
             raise DAV_Forbidden
         return 200
 
     @classmethod
     def rm(cls, uri, cache=None):
-        from pywebdav.errors import DAV_Forbidden
+        from pywebdav.lib.errors import DAV_Forbidden
         object_name, object_id = cls._uri2object(uri, cache=cache)
         if not object_name:
             raise DAV_Forbidden
@@ -609,7 +609,7 @@ class Collection(ModelSQL, ModelView):
         pool = Pool()
         Model = pool.get(object_name)
         try:
-            Model.delete(object_id)
+            Model.delete([Model(object_id)])
         except Exception:
             raise DAV_Forbidden
         return 200
commit 78b90765c133bb193c8bf7b5713931f934d65705
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Apr 27 12:30:39 2013 +0200

    Fixing a typo in README.Debian.

diff --git a/debian/tryton-server.README.Debian b/debian/tryton-server.README.Debian
index ebeb49d..6db5454 100644
--- a/debian/tryton-server.README.Debian
+++ b/debian/tryton-server.README.Debian
@@ -101,6 +101,6 @@ Now, you're finished. Please be aware of the following things:
 
     Remember to replace tryton with the name of your database.
 
-  * Only the same major version of Tryton Client and Tryton server can connect.
+  * Only the same major version of Tryton client and Tryton server can connect.
 
  -- Mathias Behrle <mathiasb at m9s.biz>  Fri, 12 Apr 2013 12:00:00 +0200
commit 02f2cc5cea57a8e32f6203f6b0abcabf08f04fc7
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Apr 24 00:59:52 2013 +0200

    Versioning watch file for Tryton branch 2.6.

diff --git a/debian/watch b/debian/watch
index 66a0e54..1f340e3 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
 version=3
-http://downloads.tryton.org/current/ .*trytond-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
+http://downloads.tryton.org/2.6/ .*trytond-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
-- 
tryton-server



More information about the tryton-debian-vcs mailing list