[tryton-debian-vcs] tryton-modules-account branch upstream updated. upstream/3.4.1-1-g1aa43cd

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Mar 4 00:28:48 UTC 2015


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

commit 1aa43cdcead97898fa77a5d5742cff29d7d22a47
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Mar 3 12:29:24 2015 +0100

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

diff --git a/CHANGELOG b/CHANGELOG
index 354604b..fc682ca 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 3.4.2 - 2015-03-02
+* Bug fixes (see mercurial logs for details)
+* Add fix_party script
+
 Version 3.4.1 - 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 e758884..8456846 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account
-Version: 3.4.1
+Version: 3.4.2
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/journal.py b/journal.py
index 38c1cb1..833c58d 100644
--- a/journal.py
+++ b/journal.py
@@ -140,8 +140,8 @@ class Journal(ModelSQL, ModelView):
         # Migration from 1.0 sequence Many2One change into Property
         if table.column_exist('sequence'):
             Property = Pool().get('ir.property')
-            table = cls.__table__()
-            cursor.execute(*table.select(table.id, table.sequence))
+            sql_table = cls.__table__()
+            cursor.execute(*sql_table.select(sql_table.id, sql_table.sequence))
             for journal_id, sequence_id in cursor.fetchall():
                 Property.set('sequence', cls._name,
                         journal_id, (sequence_id and
diff --git a/move.py b/move.py
index 5e33006..a9500e9 100644
--- a/move.py
+++ b/move.py
@@ -156,6 +156,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),
@@ -313,7 +318,7 @@ class Move(ModelSQL, ModelView):
             cursor.execute(*line.select(line.move, line.id,
                     where=red_sql & (line.state == 'draft'),
                     order_by=line.move))
-            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 = []
@@ -325,8 +330,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):
                 draft_moves.append(move.id)
                 continue
@@ -958,6 +962,8 @@ class Line(ModelSQL, ModelView):
             if self.account.second_currency:
                 changes['second_currency_digits'] = \
                     self.account.second_currency.digits
+            if not self.account.party_required:
+                changes['party'] = None
         return changes
 
     @fields.depends('account')
diff --git a/party.py b/party.py
index de9579f..c7f2d7b 100644
--- a/party.py
+++ b/party.py
@@ -173,7 +173,7 @@ class Party:
                     & (line.party != None)
                     & (line.reconciliation == None)
                     & (account.company == company_id)
-                    & today_query,
+                    & line_query & today_query,
                     group_by=line.party,
                     having=Operator(Sum(Coalesce(line.debit, 0)
                             - Coalesce(line.credit, 0)),
diff --git a/setup.py b/setup.py
index 9c76991..663f810 100644
--- a/setup.py
+++ b/setup.py
@@ -47,6 +47,12 @@ for dep in info.get('depends', []):
         requires.append(get_require_version('trytond_%s' % dep))
 requires.append(get_require_version('trytond'))
 
+tests_require = [get_require_version('proteus')]
+dependency_links = []
+if minor_version % 2:
+    # Add development index for testing with proteus
+    dependency_links.append('https://trydevpi.tryton.org/')
+
 setup(name=name,
     version=version,
     description='Tryton module for accounting',
@@ -91,6 +97,7 @@ setup(name=name,
         ],
     license='GPL-3',
     install_requires=requires,
+    dependency_links=dependency_links,
     zip_safe=False,
     entry_points="""
     [trytond.modules]
@@ -98,4 +105,5 @@ setup(name=name,
     """,
     test_suite='tests',
     test_loader='trytond.test_loader:Loader',
+    tests_require=tests_require,
     )
diff --git a/tryton.cfg b/tryton.cfg
index 18b170f..bb978e4 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.4.2
 depends:
     company
     currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index 77eb31c..89221d2 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: 3.4.1
+Version: 3.4.2
 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