[tryton-debian-vcs] tryton-modules-account branch debian-squeeze-1.6 created. 2ba7f5fc70e1d27e0470e2736c208df3e8794d7f

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 16:52:48 UTC 2013


The following commit has been merged in the debian-squeeze-1.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account.git;a=commitdiff;h=2ba7f5fc70e1d27e0470e2736c208df3e8794d7f
commit 2ba7f5fc70e1d27e0470e2736c208df3e8794d7f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 20 21:29:04 2010 +0100

    Releasing debian version 1.6.1-0~50squeeze1.

diff --git a/debian/changelog b/debian/changelog
index 5431c39..e1d66ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-account (1.6.1-0~50squeeze1) unstable; urgency=low
+
+  * Merging upstream version 1.6.1.
+  * Changing my email address.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sat, 20 Nov 2010 21:27:40 +0100
+
 tryton-modules-account (1.6.0-1) unstable; urgency=low
 
   [ Daniel Baumann ]
commit 6f542847bb28188cec5543877d83daebaba47abe
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 20 21:16:01 2010 +0100

    Changing my email address.

diff --git a/debian/control b/debian/control
index 92e9d62..3d2c33d 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
 Uploaders:
  Daniel Baumann <daniel at debian.org>,
- Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
+ Mathias Behrle <mathiasb at m9s.biz>
 Dm-Upload-Allowed: yes
 Build-Depends: debhelper (>= 7), python, python-setuptools, python-support
 Standards-Version: 3.8.4
commit ff06c54923f2248d2ec4e9185c4860f416811923
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 20 20:47:06 2010 +0100

    Merging upstream version 1.6.1.

diff --git a/CHANGELOG b/CHANGELOG
index 293137a..cd4d2d4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 1.6.1 - 2010-11-02
+* Bug fixes (see mercurial logs for details)
+
 Version 1.6.0 - 2010-05-11
 * Bug fixes (see mercurial logs for details)
 * Add description field on account.tax.code.template and account.tax.code
diff --git a/PKG-INFO b/PKG-INFO
index b901fdf..3ce5f6d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: trytond_account
-Version: 1.6.0
+Version: 1.6.1
 Summary: Financial and Accounting Module with:
     - General accounting
     - Fiscal year management
diff --git a/__tryton__.py b/__tryton__.py
index 83d1bc0..7f913ca 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -6,7 +6,7 @@
     'name_es_CO': 'Contabilidad',
     'name_es_ES': 'Contabilidad',
     'name_fr_FR': 'Comptabilité',
-    'version': '1.6.0',
+    'version': '1.6.1',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/account.py b/account.py
index b1e8dc6..c79bcc0 100644
--- a/account.py
+++ b/account.py
@@ -30,6 +30,12 @@ class TypeTemplate(ModelSQL, ModelView):
 
     def __init__(self):
         super(TypeTemplate, self).__init__()
+        self._constraints += [
+            ('check_recursion', 'recursive_types'),
+        ]
+        self._error_messages.update({
+            'recursive_types': 'You can not create recursive types!',
+        })
         self._order.insert(0, ('sequence', 'ASC'))
 
     def default_balance_sheet(self, cursor, user, context=None):
@@ -175,6 +181,12 @@ class Type(ModelSQL, ModelView):
 
     def __init__(self):
         super(Type, self).__init__()
+        self._constraints += [
+            ('check_recursion', 'recursive_types'),
+        ]
+        self._error_messages.update({
+            'recursive_types': 'You can not create recursive types!',
+        })
         self._order.insert(0, ('sequence', 'ASC'))
 
     def default_balance_sheet(self, cursor, user, context=None):
@@ -280,9 +292,9 @@ class Type(ModelSQL, ModelView):
 
             prev_lang = type._context.get('language') or 'en_US'
             prev_data = {}
-            for field_name, field in template._columns.iteritems():
+            for field_name, field in type.template._columns.iteritems():
                 if getattr(field, 'translate', False):
-                    prev_data[field_name] = template[field_name]
+                    prev_data[field_name] = type.template[field_name]
             ctx = context.copy()
             for lang in lang_obj.get_translatable_languages(cursor, user,
                     context=context):
@@ -291,10 +303,11 @@ class Type(ModelSQL, ModelView):
                 ctx['language'] = lang
                 type.setLang(lang)
                 data = {}
-                for field_name, field in template._columns.iteritems():
-                    if getattr(field, 'translate', False) \
-                            and template[field_name] != prev_data[field_name]:
-                        data[field_name] = template[field_name]
+                for field_name, field in type.template._columns.iteritems():
+                    if (getattr(field, 'translate', False)
+                            and type.template[field_name] !=
+                            prev_data[field_name]):
+                        data[field_name] = type.template[field_name]
                 if data:
                     self.write(cursor, user, type.id, data, context=ctx)
             type.setLang(prev_lang)
@@ -960,9 +973,9 @@ class Account(ModelSQL, ModelView):
 
             prev_lang = account._context.get('language') or 'en_US'
             prev_data = {}
-            for field_name, field in template._columns.iteritems():
+            for field_name, field in account.template._columns.iteritems():
                 if getattr(field, 'translate', False):
-                    prev_data[field_name] = template[field_name]
+                    prev_data[field_name] = account.template[field_name]
             ctx = context.copy()
             for lang in lang_obj.get_translatable_languages(cursor, user,
                     context=context):
@@ -971,10 +984,11 @@ class Account(ModelSQL, ModelView):
                 ctx['language'] = lang
                 account.setLang(lang)
                 data = {}
-                for field_name, field in template._columns.iteritems():
-                    if getattr(field, 'translate', False) \
-                            and template[field_name] != prev_data[field_name]:
-                        data[field_name] = template[field_name]
+                for field_name, field in account.template._columns.iteritems():
+                    if (getattr(field, 'translate', False)
+                            and account.template[field_name] !=
+                            prev_data[field_name]):
+                        data[field_name] = account.template[field_name]
                 if data:
                     self.write(cursor, user, account.id, data, context=ctx)
             account.setLang(prev_lang)
diff --git a/period.py b/period.py
index cb73ea1..1c7c84e 100644
--- a/period.py
+++ b/period.py
@@ -1,7 +1,7 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
 'Period'
-from trytond.model import ModelView, ModelSQL, fields
+from trytond.model import ModelView, ModelSQL, fields, OPERATORS
 from trytond.wizard import Wizard
 from trytond.pyson import Equal, Eval
 
@@ -169,9 +169,10 @@ class Period(ModelSQL, ModelView):
         def process_args(args):
             i = 0
             while i < len(args):
-                if isinstance(args[i], list):
-                    process_args(args[i])
-                if isinstance(args[i], tuple) \
+                # add test for xmlrpc and pyson that doesn't handle tuple
+                if (isinstance(args[i], tuple) \
+                        or (isinstance(args[i], list) and len(args[i]) > 2 \
+                        and args[i][1] in OPERATORS)) \
                         and args[i][0] in ('start_date', 'end_date') \
                         and isinstance(args[i][2], (list, tuple)):
                     if not args[i][2][0]:
@@ -180,6 +181,8 @@ class Period(ModelSQL, ModelView):
                         period = self.browse(cursor, user, args[i][2][0],
                                 context=context)
                         args[i] = (args[i][0], args[i][1], period[args[i][2][1]])
+                elif isinstance(args[i], list):
+                    process_args(args[i])
                 i += 1
         process_args(args)
         return super(Period, self).search(cursor, user, args, offset=offset,
diff --git a/tax.py b/tax.py
index 997e2bd..d21b8e1 100644
--- a/tax.py
+++ b/tax.py
@@ -299,9 +299,9 @@ class Code(ModelSQL, ModelView):
 
             prev_lang = code._context.get('language') or 'en_US'
             prev_data = {}
-            for field_name, field in template._columns.iteritems():
+            for field_name, field in code.template._columns.iteritems():
                 if getattr(field, 'translate', False):
-                    prev_data[field_name] = template[field_name]
+                    prev_data[field_name] = code.template[field_name]
             ctx = context.copy()
             for lang in lang_obj.get_translatable_languages(cursor, user,
                     context=context):
@@ -310,10 +310,11 @@ class Code(ModelSQL, ModelView):
                 ctx['language'] = lang
                 code.setLang(lang)
                 data = {}
-                for field_name, field in template._columns.iteritems():
-                    if getattr(field, 'translate', False) \
-                            and template[field_name] != prev_data[field_name]:
-                        data[field_name] = template[field_name]
+                for field_name, field in code.template._columns.iteritems():
+                    if (getattr(field, 'translate', False)
+                            and code.template[field_name] !=
+                            prev_data[field_name]):
+                        data[field_name] = code.template[field_name]
                 if data:
                     self.write(cursor, user, code.id, data, context=ctx)
             code.setLang(prev_lang)
@@ -924,9 +925,9 @@ class Tax(ModelSQL, ModelView):
 
             prev_lang = tax._context.get('language') or 'en_US'
             prev_data = {}
-            for field_name, field in template._columns.iteritems():
+            for field_name, field in tax.template._columns.iteritems():
                 if getattr(field, 'translate', False):
-                    prev_data[field_name] = template[field_name]
+                    prev_data[field_name] = tax.template[field_name]
             ctx = context.copy()
             for lang in lang_obj.get_translatable_languages(cursor, user,
                     context=context):
@@ -935,10 +936,11 @@ class Tax(ModelSQL, ModelView):
                 ctx['language'] = lang
                 tax.setLang(lang)
                 data = {}
-                for field_name, field in template._columns.iteritems():
-                    if getattr(field, 'translate', False) \
-                            and template[field_name] != prev_data[field_name]:
-                        data[field_name] = template[field_name]
+                for field_name, field in tax.template._columns.iteritems():
+                    if (getattr(field, 'translate', False)
+                            and tax.template[field_name] !=
+                            prev_data[field_name]):
+                        data[field_name] = tax.template[field_name]
                 if data:
                     self.write(cursor, user, tax.id, data, context=ctx)
             tax.setLang(prev_lang)
@@ -1153,9 +1155,9 @@ class Rule(ModelSQL, ModelView):
 
             prev_lang = rule._context.get('language') or 'en_US'
             prev_data = {}
-            for field_name, field in template._columns.iteritems():
+            for field_name, field in rule.template._columns.iteritems():
                 if getattr(field, 'translate', False):
-                    prev_data[field_name] = template[field_name]
+                    prev_data[field_name] = rule.template[field_name]
             ctx = context.copy()
             for lang in lang_obj.get_translatable_languages(cursor, user,
                     context=context):
@@ -1164,10 +1166,11 @@ class Rule(ModelSQL, ModelView):
                 ctx['language'] = lang
                 rule.setLang(lang)
                 data = {}
-                for field_name, field in template._columns.iteritems():
-                    if getattr(field, 'translate', False) \
-                            and template[field_name] != prev_data[field_name]:
-                        data[field_name] = template[field_name]
+                for field_name, field in rule.template._columns.iteritems():
+                    if (getattr(field, 'translate', False)
+                            and rule.template[field_name] !=
+                            prev_data[field_name]):
+                        data[field_name] = rule.template[field_name]
                 if data:
                     self.write(cursor, user, rule.id, data, context=ctx)
             rule.setLang(prev_lang)
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index 25b19dd..f3167c1 100644
--- a/trytond_account.egg-info/PKG-INFO
+++ b/trytond_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: trytond-account
-Version: 1.6.0
+Version: 1.6.1
 Summary: Financial and Accounting Module with:
     - General accounting
     - Fiscal year management
-- 
tryton-modules-account



More information about the tryton-debian-vcs mailing list