[tryton-debian-vcs] tryton-modules-account-payment-clearing branch upstream-3.4 updated. upstream/3.4.1-1-gcde944b

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sat Apr 9 18:53:07 UTC 2016


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-account-payment-clearing.git;a=commitdiff;h=upstream/3.4.1-1-gcde944b

commit cde944bc911c9be66c1c8a36e6460610dc1619af
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Apr 9 19:29:00 2016 +0200

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

diff --git a/CHANGELOG b/CHANGELOG
index d2965de..afce43c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.2 - 2016-04-06
+* Bug fixes (see mercurial logs for details)
+
 Version 3.4.1 - 2015-03-01
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index a085246..a29b425 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2014-2015 Cédric Krier.
-Copyright (C) 2014-2015 B2CK SPRL.
+Copyright (C) 2014-2016 Cédric Krier.
+Copyright (C) 2014-2016 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index eb02d15..2dad6fa 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_payment_clearing
-Version: 3.4.1
+Version: 3.4.2
 Summary: Tryton module for payment clearing
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/payment.py b/payment.py
index 679b820..8cb2c27 100644
--- a/payment.py
+++ b/payment.py
@@ -1,7 +1,6 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 from collections import defaultdict
-from decimal import Decimal
 
 from trytond.pool import PoolMeta, Pool
 from trytond.model import ModelView, Workflow, fields
@@ -84,8 +83,10 @@ class Payment:
         move = Move(journal=self.journal.clearing_journal, origin=self,
             date=date, period=period)
         line = Line()
-        line.debit = self.amount if self.line.credit else Decimal(0)
-        line.credit = self.amount if self.line.debit else Decimal(0)
+        if self.kind == 'payable':
+            line.debit, line.credit = self.amount, 0
+        else:
+            line.debit, line.credit = 0, self.amount
         line.account = self.line.account
         line.amount_second_currency = (-self.line.amount_second_currency
             if self.line.amount_second_currency else None)
@@ -93,8 +94,10 @@ class Payment:
         line.party = (self.line.party
             if self.line.account.party_required else None)
         counterpart = Line()
-        counterpart.debit = self.amount if self.line.debit else Decimal(0)
-        counterpart.credit = self.amount if self.line.credit else Decimal(0)
+        if self.kind == 'payable':
+            counterpart.debit, counterpart.credit = 0, self.amount
+        else:
+            counterpart.debit, counterpart.credit = self.amount, 0
         counterpart.account = self.journal.clearing_account
         counterpart.amount_second_currency = self.line.amount_second_currency
         counterpart.second_currency = self.line.second_currency
diff --git a/tryton.cfg b/tryton.cfg
index 5d70ad2..ca612a8 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.4.2
 depends:
     account_payment
     ir
diff --git a/trytond_account_payment_clearing.egg-info/PKG-INFO b/trytond_account_payment_clearing.egg-info/PKG-INFO
index aa37d71..f16fb03 100644
--- a/trytond_account_payment_clearing.egg-info/PKG-INFO
+++ b/trytond_account_payment_clearing.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-payment-clearing
-Version: 3.4.1
+Version: 3.4.2
 Summary: Tryton module for payment clearing
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_account_payment_clearing.egg-info/requires.txt b/trytond_account_payment_clearing.egg-info/requires.txt
index a90ce06..1c8e58f 100644
--- a/trytond_account_payment_clearing.egg-info/requires.txt
+++ b/trytond_account_payment_clearing.egg-info/requires.txt
@@ -1,2 +1,2 @@
 trytond_account_payment >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+trytond >= 3.4, < 3.5
-- 
tryton-modules-account-payment-clearing



More information about the tryton-debian-vcs mailing list