[tryton-debian-vcs] tryton-modules-account-invoice branch upstream-4.2 updated. upstream/4.2.3-1-g72713ca

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Jan 7 12:54:45 UTC 2018


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

commit 72713ca78f2a72f84c94f26281097049862f9b98
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Jan 6 11:33:29 2018 +0100

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

diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..c4fd423
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,9 @@
+image: python:all
+env:
+  - POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
+  - MYSQL_URI=mysql://root@127.0.0.1:3306/
+script:
+  - pip install tox
+  - tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
+services:
+  - postgres
diff --git a/CHANGELOG b/CHANGELOG
index 70f6d97..72b854b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.4 - 2018-01-04
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.3 - 2017-06-06
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index dba4452..82eb5ed 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2017 Cédric Krier.
+Copyright (C) 2008-2018 Cédric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2017 B2CK SPRL.
+Copyright (C) 2008-2018 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 802aa66..b9f7409 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_invoice
-Version: 4.2.3
+Version: 4.2.4
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/invoice.py b/invoice.py
index 03b3250..f47d477 100644
--- a/invoice.py
+++ b/invoice.py
@@ -2542,8 +2542,11 @@ class PayInvoice(Wizard):
         with Transaction().set_context(date=self.start.date):
             amount = Currency.compute(self.start.currency,
                 self.start.amount, invoice.company.currency)
+            amount_invoice = Currency.compute(
+                self.start.currency, self.start.amount, invoice.currency)
         _, remainder = self.get_reconcile_lines_for_amount(invoice, amount)
-        if remainder == Decimal('0.0') and amount <= invoice.amount_to_pay:
+        if (remainder == Decimal('0.0')
+                and amount_invoice <= invoice.amount_to_pay):
             return 'pay'
         return 'ask'
 
@@ -2566,6 +2569,8 @@ class PayInvoice(Wizard):
         with Transaction().set_context(date=self.start.date):
             amount = Currency.compute(self.start.currency,
                 self.start.amount, invoice.company.currency)
+            amount_invoice = Currency.compute(
+                self.start.currency, self.start.amount, invoice.currency)
 
         if invoice.company.currency.is_zero(amount):
             lines = invoice.lines_to_pay
@@ -2584,7 +2589,7 @@ class PayInvoice(Wizard):
         default['currency_digits_writeoff'] = invoice.company.currency.digits
         default['invoice'] = invoice.id
 
-        if (amount > invoice.amount_to_pay
+        if (amount_invoice > invoice.amount_to_pay
                 or invoice.company.currency.is_zero(amount)):
             default['type'] = 'writeoff'
         return default
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..08e43cf
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+    {py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
+    pypy-postgresql: psycopg2cffi >= 2.5
+    mysql: MySQL-python
+    sqlite: sqlitebck
+setenv =
+    sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
+    postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
+    mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://}
+    sqlite: DB_NAME={env:SQLITE_NAME::memory:}
+    postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
+    mysql: DB_NAME={env:MYSQL_NAME:test}
+install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
diff --git a/tryton.cfg b/tryton.cfg
index b1d079d..bb044e6 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.3
+version=4.2.4
 depends:
     account
     account_product
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index d6d3a05..8a5767a 100644
--- a/trytond_account_invoice.egg-info/PKG-INFO
+++ b/trytond_account_invoice.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-invoice
-Version: 4.2.3
+Version: 4.2.4
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_account_invoice.egg-info/SOURCES.txt b/trytond_account_invoice.egg-info/SOURCES.txt
index 1c11596..fd890eb 100644
--- a/trytond_account_invoice.egg-info/SOURCES.txt
+++ b/trytond_account_invoice.egg-info/SOURCES.txt
@@ -1,15 +1,23 @@
+.drone.yml
+.hgtags
 CHANGELOG
 COPYRIGHT
 INSTALL
 LICENSE
 MANIFEST.in
 README
+__init__.py
+account.py
 account.xml
 invoice.odt
+invoice.py
 invoice.xml
+party.py
 party.xml
+payment_term.py
 payment_term.xml
 setup.py
+tox.ini
 tryton.cfg
 ./__init__.py
 ./account.py
@@ -95,9 +103,12 @@ locale/pt_BR.po
 locale/ru.po
 locale/sl.po
 locale/zh_CN.po
+tests/__init__.py
 tests/scenario_invoice.rst
 tests/scenario_invoice_alternate_currency.rst
 tests/scenario_invoice_supplier.rst
+tests/test_account_invoice.py
+tests/tools.py
 trytond_account_invoice.egg-info/PKG-INFO
 trytond_account_invoice.egg-info/SOURCES.txt
 trytond_account_invoice.egg-info/dependency_links.txt
-- 
tryton-modules-account-invoice



More information about the tryton-debian-vcs mailing list