[tryton-debian-vcs] tryton-server branch upstream-2.8 updated. upstream/2.8.15-1-g06979da

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Fri Nov 13 19:32:00 UTC 2015


The following commit has been merged in the upstream-2.8 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=upstream/2.8.15-1-g06979da

commit 06979dadfa346b213ec1c400c96e194dbd62c7be
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri Nov 13 18:20:43 2015 +0100

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

diff --git a/CHANGELOG b/CHANGELOG
index 73bf3bb..afc5ba3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.16 - 2015-11-09
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.15 - 2015-05-19
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 0c5cb41..d16e43e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 2.8.15
+Version: 2.8.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 0c5cb41..d16e43e 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.8.15
+Version: 2.8.16
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/convert.py b/trytond/convert.py
index 852a252..6ce89ed 100644
--- a/trytond/convert.py
+++ b/trytond/convert.py
@@ -717,10 +717,10 @@ def post_import(pool, module, to_delete):
 
     object_name_list = set(pool.object_name_list())
     for mrec in mdata:
-        model, db_id = mrec.model, mrec.db_id
+        model, db_id, fs_id = mrec.model, mrec.db_id, mrec.fs_id
 
         logging.getLogger("convert").info(
-                'Deleting %s@%s' % (db_id, model))
+            'Deleting %s@%s from %s.%s', db_id, model, module, fs_id)
         try:
             # Deletion of the record
             if model in object_name_list:
@@ -744,9 +744,15 @@ def post_import(pool, module, to_delete):
                     'Exception: %s' %
                     (db_id, model, tb_s))
             if 'active' in Model._fields:
-                Model.write([Model(db_id)], {
-                        'active': False,
-                        })
+                try:
+                    Model.write([Model(db_id)], {
+                            'active': False,
+                            })
+                except Exception:
+                    cursor.rollback()
+                    logging.getLogger("convert").error(
+                        'Could not inactivate id: %d of model %s\n',
+                        db_id, model, exc_info=True)
 
     # Clean model_data:
     if mdata_delete:
diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py
index 0a414a9..8bc1547 100644
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -281,9 +281,18 @@ class ModelStorage(Model):
             return data, data_o2m
 
         new_ids = {}
+        # Reset MPTT field to the default value
+        mptt = set()
+        for field in cls._fields.itervalues():
+            if (isinstance(field, fields.Many2One)
+                    and field.model_name == cls.__name__
+                    and field.left and field.right):
+                mptt.add(field.left)
+                mptt.add(field.right)
         fields_names = [n for n, f in cls._fields.iteritems()
             if (not isinstance(f, fields.Function)
-                or isinstance(f, fields.Property))]
+                or isinstance(f, fields.Property))
+            and n not in mptt]
         ids = map(int, records)
         datas = cls.read(ids, fields_names=fields_names)
         field_defs = cls.fields_get(fields_names=fields_names)
diff --git a/trytond/version.py b/trytond/version.py
index d753df8..b1d84af 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.8.15"
+VERSION = "2.8.16"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-server



More information about the tryton-debian-vcs mailing list