[tryton-debian-vcs] tryton-modules-analytic-account branch upstream-3.4 updated. upstream/3.4.1-1-g798f2f4
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Sun May 24 12:17:27 UTC 2015
The following commit has been merged in the upstream-3.4 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-analytic-account.git;a=commitdiff;h=upstream/3.4.1-1-g798f2f4
commit 798f2f4c59729369680eececa429ec680d31db25
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat May 23 21:24:20 2015 +0200
Adding upstream version 3.4.2.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
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