[tryton-debian-vcs] tryton-modules-analytic-account branch debian-jessie-3.4 updated. debian/3.4.1-1-4-g570e2d8

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun May 24 12:17:26 UTC 2015


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

commit 570e2d8cf11edd1864ffcc2b5fae300793eecfe2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 23 21:24:21 2015 +0200

    Releasing debian version 3.4.2-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index b165500..5f76939 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-analytic-account (3.4.2-1) unstable; urgency=medium
+
+  * Wrapping and sorting control files (wrap-and-sort -bts).
+  * Setting the branch in the watch file to the fixed version 3.4.
+  * Merging upstream version 3.4.2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sat, 23 May 2015 21:24:21 +0200
+
 tryton-modules-analytic-account (3.4.1-1) unstable; urgency=medium
 
   * Adding actual upstream signing key.
commit 27d09f43a3b69cd21b8aab901adee8fa0a058e95
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 23 21:24:20 2015 +0200

    Merging upstream version 3.4.2.

diff --git a/CHANGELOG b/CHANGELOG
index f459c37..f53da44 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.2 - 2015-05-22
+* Bug fixes (see mercurial logs for details)
+
 Version 3.4.1 - 2015-03-01
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 8041232..50c970d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_analytic_account
-Version: 3.4.1
+Version: 3.4.2
 Summary: Tryton module for analytic accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/__init__.py b/__init__.py
index b42ec04..2cf276a 100644
--- a/__init__.py
+++ b/__init__.py
@@ -13,6 +13,7 @@ def register():
         AccountSelection,
         AccountAccountSelection,
         Line,
+        Move,
         MoveLine,
         module='analytic_account', type_='model')
     Pool.register(
diff --git a/line.py b/line.py
index c3458c3..7827033 100644
--- a/line.py
+++ b/line.py
@@ -6,9 +6,10 @@ from trytond.wizard import Wizard, StateAction
 from trytond import backend
 from trytond.pyson import Eval, PYSONEncoder
 from trytond.transaction import Transaction
-from trytond.pool import Pool
+from trytond.pool import Pool, PoolMeta
 
-__all__ = ['Line', 'MoveLine', 'OpenAccount']
+__all__ = ['Line', 'Move', 'MoveLine', 'OpenAccount']
+__metaclass__ = PoolMeta
 
 
 class Line(ModelSQL, ModelView):
@@ -131,6 +132,24 @@ class Line(ModelSQL, ModelView):
                 (self.account.rec_name,))
 
 
+class Move:
+    __name__ = 'account.move'
+
+    def cancel(self, default=None):
+        'Reverse credit/debit of analytic lines'
+        pool = Pool()
+        AnalyticLine = pool.get('analytic_account.line')
+        cancel_move = super(Move, self).cancel(default)
+        analytic_lines = []
+        for line in cancel_move.lines:
+            for analytic_line in line.analytic_lines:
+                analytic_line.debit, analytic_line.credit = (
+                    analytic_line.credit, analytic_line.debit)
+                analytic_lines.append(analytic_line)
+        AnalyticLine.save(analytic_lines)
+        return cancel_move
+
+
 class MoveLine(ModelSQL, ModelView):
     __name__ = 'account.move.line'
     analytic_lines = fields.One2Many('analytic_account.line', 'move_line',
diff --git a/tryton.cfg b/tryton.cfg
index 9d7161d..71dee61 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.4.2
 depends:
     account
     company
diff --git a/trytond_analytic_account.egg-info/PKG-INFO b/trytond_analytic_account.egg-info/PKG-INFO
index e476e9d..7fd40dc 100644
--- a/trytond_analytic_account.egg-info/PKG-INFO
+++ b/trytond_analytic_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-analytic-account
-Version: 3.4.1
+Version: 3.4.2
 Summary: Tryton module for analytic accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-analytic-account



More information about the tryton-debian-vcs mailing list