[tryton-debian-vcs] tryton-modules-account branch upstream-3.6 updated. upstream/3.6.6-1-g78f6d17
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Mon Oct 3 14:11:03 UTC 2016
The following commit has been merged in the upstream-3.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account.git;a=commitdiff;h=upstream/3.6.6-1-g78f6d17
commit 78f6d1754ec171cf6114c7c1514884bf9fa3b308
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Oct 3 12:40:29 2016 +0200
Adding upstream version 3.6.7.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 9ae95ce..144538e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.6.7 - 2016-10-02
+* Bug fixes (see mercurial logs for details)
+
Version 3.6.6 - 2016-09-03
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index b58bf0c..2c95e95 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account
-Version: 3.6.6
+Version: 3.6.7
Summary: Tryton module for accounting
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/party.py b/party.py
index c76aac2..5fafb14 100644
--- a/party.py
+++ b/party.py
@@ -2,7 +2,7 @@
# this repository contains the full copyright notices and license terms.
from decimal import Decimal
-from sql import Literal, Null
+from sql import Literal, Null, Cast
from sql.aggregate import Sum
from sql.conditionals import Coalesce
@@ -146,9 +146,14 @@ class Party:
today_query = ((line.maturity_date <= Date.today())
| (line.maturity_date == Null))
- line_query, _ = MoveLine.query_get(line)
Operator = fields.SQL_OPERATORS[clause[1]]
+ # Need to cast numeric for sqlite
+ type_ = MoveLine.debit.sql_type().base
+ amount = Cast(
+ Sum(Coalesce(line.debit, 0) - Coalesce(line.credit, 0)),
+ type_)
+ value = Cast(Literal(Decimal(clause[2] or 0)), type_)
query = line.join(account, condition=account.id == line.account
).select(line.party,
where=account.active
@@ -156,9 +161,7 @@ class Party:
& (line.party != Null)
& (line.reconciliation == Null)
& (account.company == company_id)
- & line_query & today_query,
+ & today_query,
group_by=line.party,
- having=Operator(Sum(Coalesce(line.debit, 0)
- - Coalesce(line.credit, 0)),
- Decimal(clause[2] or 0)))
+ having=Operator(amount, value))
return [('id', 'in', query)]
diff --git a/tryton.cfg b/tryton.cfg
index c88ef2a7..4990c76 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.6.6
+version=3.6.7
depends:
company
currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index f440df6..cf1484c 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.6.6
+Version: 3.6.7
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