[tryton-debian-vcs] tryton-modules-account branch upstream-2.8 updated. upstream/2.8.8-1-g3049598

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Mar 4 00:28:49 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-modules-account.git;a=commitdiff;h=upstream/2.8.8-1-g3049598

commit 3049598c81dd6ef6c550683acc096944a1c67ffb
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Mar 3 12:31:20 2015 +0100

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

diff --git a/CHANGELOG b/CHANGELOG
index 1385c1e..41e17e5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.9 - 2015-03-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.8 - 2014-12-03
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 77715d8..3a28212 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2014 Cédric Krier.
+Copyright (C) 2008-2015 Cédric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2014 B2CK SPRL.
+Copyright (C) 2008-2015 B2CK SPRL.
 Copyright (C) 2004-2008 Tiny SPRL.
 
 This program is free software: you can redistribute it and/or modify
diff --git a/PKG-INFO b/PKG-INFO
index e891e30..146e9ff 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account
-Version: 2.8.8
+Version: 2.8.9
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/move.py b/move.py
index cc9dad3..b1cfcf6 100644
--- a/move.py
+++ b/move.py
@@ -144,6 +144,11 @@ class Move(ModelSQL, ModelView):
     def on_change_with_date(self):
         Line = Pool().get('account.move.line')
         date = self.date
+        if date:
+            if self.period and not (
+                    self.period.start_date <= date <= self.period.end_date):
+                date = self.period.start_date
+            return date
         lines = Line.search([
                 ('journal', '=', self.journal),
                 ('period', '=', self.period),
@@ -322,7 +327,7 @@ class Move(ModelSQL, ModelView):
                 'FROM "' + MoveLine._table + '" '
                 'WHERE ' + red_sql + ' AND state = %s '
                 'ORDER BY move', red_ids + ['draft'])
-            move2draft_lines.update(dict((k, (j[1] for j in g))
+            move2draft_lines.update(dict((k, [j[1] for j in g])
                     for k, g in groupby(cursor.fetchall(), itemgetter(0))))
 
         valid_moves = []
@@ -334,8 +339,7 @@ class Move(ModelSQL, ModelView):
             # SQLite uses float for SUM
             if not isinstance(amount, Decimal):
                 amount = Decimal(amount)
-            draft_lines = MoveLine.browse(
-                list(move2draft_lines.get(move.id, [])))
+            draft_lines = MoveLine.browse(move2draft_lines.get(move.id, []))
             if not company.currency.is_zero(amount):
                 if not move.journal.centralised:
                     draft_moves.append(move.id)
diff --git a/setup.py b/setup.py
index 0c4cb4c..3c12ba4 100644
--- a/setup.py
+++ b/setup.py
@@ -30,6 +30,9 @@ for dep in info.get('depends', []):
 requires.append('trytond >= %s.%s, < %s.%s' %
         (major_version, minor_version, major_version, minor_version + 1))
 
+tests_require = ['proteus >= %s.%s, < %s.%s' %
+    (major_version, minor_version, major_version, minor_version + 1)]
+
 setup(name='trytond_account',
     version=info.get('version', '0.0.1'),
     description='Tryton module for accounting',
@@ -80,4 +83,5 @@ setup(name='trytond_account',
     """,
     test_suite='tests',
     test_loader='trytond.test_loader:Loader',
+    tests_require=tests_require,
     )
diff --git a/tryton.cfg b/tryton.cfg
index f910c1d..bb8a5d5 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.8.8
+version=2.8.9
 depends:
     company
     currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index 6860a80..2e0bd5e 100644
--- a/trytond_account.egg-info/PKG-INFO
+++ b/trytond_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account
-Version: 2.8.8
+Version: 2.8.9
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-account



More information about the tryton-debian-vcs mailing list