[tryton-debian-vcs] tryton-modules-account-payment-clearing branch upstream updated. upstream/4.4.0-1-gc5dd8b2

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Fri Nov 10 12:07:14 UTC 2017


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

commit c5dd8b21867c88b03b1117ccca4cc63544c42775
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Nov 6 14:40:28 2017 +0100

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

diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..e0bc2f7
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,51 @@
+clone:
+    hg:
+        image: plugins/hg
+
+pipeline:
+    tox:
+        image: ${IMAGE}
+        environment:
+            - CFLAGS=-O0
+            - DB_CACHE=/cache
+            - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
+            - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
+        commands:
+            - pip install tox
+            - tox -e "${TOXENV}-${DATABASE}"
+        volumes:
+            - cache:/root/.cache
+
+services:
+    postgresql:
+        image: postgres
+        when:
+            matrix:
+                DATABASE: postgresql
+
+matrix:
+    include:
+        - IMAGE: python:2.7
+          TOXENV: py27
+          DATABASE: sqlite
+        - IMAGE: python:2.7
+          TOXENV: py27
+          DATABASE: postgresql
+        - IMAGE: python:3.4
+          TOXENV: py34
+          DATABASE: sqlite
+        - IMAGE: python:3.4
+          TOXENV: py34
+          DATABASE: postgresql
+        - IMAGE: python:3.5
+          TOXENV: py35
+          DATABASE: sqlite
+        - IMAGE: python:3.5
+          TOXENV: py35
+          DATABASE: postgresql
+        - IMAGE: python:3.6
+          TOXENV: py36
+          DATABASE: sqlite
+        - IMAGE: python:3.6
+          TOXENV: py36
+          DATABASE: postgresql
diff --git a/CHANGELOG b/CHANGELOG
index 944d95c..e0b7531 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.6.0 - 2017-10-30
+* Bug fixes (see mercurial logs for details)
+* Allow to use account instead of line for clearing
+
 Version 4.4.0 - 2017-05-01
 * Bug fixes (see mercurial logs for details)
 * Allow to set the date of the clearing move
diff --git a/MANIFEST.in b/MANIFEST.in
index f2f691a..71b68f1 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -6,6 +6,7 @@ include LICENSE
 include tryton.cfg
 include *.xml
 include view/*.xml
+include *.fodt
 include locale/*.po
 include doc/*
 include tests/*.rst
diff --git a/PKG-INFO b/PKG-INFO
index 844257f..5d22027 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_account_payment_clearing
-Version: 4.4.0
+Version: 4.6.0
 Summary: Tryton module for payment clearing
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/4.4/
+Download-URL: http://downloads.tryton.org/4.6/
 Description: trytond_account_payment_clearing
         ================================
         
@@ -69,9 +69,9 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/locale/bg.po b/locale/bg.po
index 6210b67..560f6d2 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -31,6 +35,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/ca.po b/locale/ca.po
index 59e841d..bf25676 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr "Compte"
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Assentament de liquidació"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Grup de pagaments"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr "Defineix el compte a utilitzar pel moviment de liquidació."
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr "Marca pagament amb èxit"
diff --git a/locale/cs.po b/locale/cs.po
index cd4c6e6..a1ae9c1 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/de.po b/locale/de.po
index ee87b31..a5d1baf 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Auszifferungsbuchungssatz"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Zahlungsgruppe"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr "Erfolgreiche Zahlung"
diff --git a/locale/es.po b/locale/es.po
index b05fb8e..314ae3e 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr "Cuenta"
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Asiento de liquidación"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Grupo de pago"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr "Define la cuenta a utilizar para el movimiento de liquidación."
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr "Marcar pagos con éxito"
diff --git a/locale/es_419.po b/locale/es_419.po
index 69e1558..95a43a6 100644
--- a/locale/es_419.po
+++ b/locale/es_419.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Asiento de compensación"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/fr.po b/locale/fr.po
index e519e9c..dce8a02 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr "Compte"
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Mouvement de compensation"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Groupe de paiement"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr "Définit le compte à utiliser pour le mouvement de compensation."
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr "Réussir les paiements"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index cd4c6e6..a1ae9c1 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index f1d3633..df752c6 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Movimento di compensazione"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Raggruppamento pagamenti"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index cd4c6e6..a1ae9c1 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/lo.po b/locale/lo.po
index f023015..46a482b 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "ຊໍາລະເຄື່ອນຍ້າຍ"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "ໝວດການຈ່າຍ"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr "ການຈ່າຍສຳເລັດ"
diff --git a/locale/lt.po b/locale/lt.po
index cd4c6e6..a1ae9c1 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/nl.po b/locale/nl.po
index 99b9471..2165642 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -31,6 +35,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/pl.po b/locale/pl.po
index cd4c6e6..d442fb0 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr "Konto"
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -16,11 +20,11 @@ msgstr ""
 
 msgctxt "field:account.payment.succeed.start,date:"
 msgid "Date"
-msgstr ""
+msgstr "Data"
 
 msgctxt "field:account.payment.succeed.start,id:"
 msgid "ID"
-msgstr ""
+msgstr "ID"
 
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
@@ -44,7 +52,7 @@ msgstr ""
 
 msgctxt "wizard_button:account.payment.succeed,start,end:"
 msgid "Cancel"
-msgstr ""
+msgstr "Anuluj"
 
 msgctxt "wizard_button:account.payment.succeed,start,succeed:"
 msgid "Succeed"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index d7184a5..15fdaa8 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr "Conta"
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Movimento de Compensação"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Pagamento Agrupado"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr "Define a conta usada para o movimento de compensação."
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr "Pagamento com Sucesso"
diff --git a/locale/ru.po b/locale/ru.po
index 548c71b..861d304 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -31,6 +35,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/locale/sl.po b/locale/sl.po
index 523bfdb..cae5d8b 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr "Klirinška knjižba"
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Plačilna skupina"
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr "Zaključeno plačilo"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index cd4c6e6..a1ae9c1 100644
--- a/locale/zh_CN.po
+++ b/locale/zh_CN.po
@@ -1,7 +1,11 @@
-# 
+#
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+msgctxt "field:account.payment,account:"
+msgid "Account"
+msgstr ""
+
 msgctxt "field:account.payment,clearing_move:"
 msgid "Clearing Move"
 msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "help:account.payment,account:"
+msgid "Define the account to use for clearing move."
+msgstr ""
+
 msgctxt "model:account.payment.succeed.start,name:"
 msgid "Succeed Payment"
 msgstr ""
diff --git a/payment.py b/payment.py
index 4ce1894..e3ecfd1 100644
--- a/payment.py
+++ b/payment.py
@@ -30,12 +30,36 @@ class Journal:
 class Payment:
     __metaclass__ = PoolMeta
     __name__ = 'account.payment'
+    account = fields.Many2One(
+        'account.account', "Account", ondelete='RESTRICT',
+        domain=[
+            ('company', '=', Eval('company', -1)),
+            ('kind', 'in', ['receivable', 'payable', 'deposit']),
+            ['OR',
+                ('second_currency', '=', Eval('currency', None)),
+                [
+                    ('company.currency', '=', Eval('currency', None)),
+                    ('second_currency', '=', None),
+                    ],
+                ],
+            ],
+        states={
+            'readonly': Eval('state') != 'draft',
+            'invisible': Bool(Eval('line')),
+            },
+        depends=['company', 'currency', 'state', 'line'],
+        help="Define the account to use for clearing move.")
     clearing_move = fields.Many2One('account.move', 'Clearing Move',
         readonly=True)
 
     @classmethod
     def __setup__(cls):
         super(Payment, cls).__setup__()
+        line_invisible = Bool(Eval('account'))
+        if 'invisible' in cls.line.states:
+            cls.line.states['invisible'] &= line_invisible
+        else:
+            cls.line.states['invisible'] = line_invisible
         cls._buttons.update({
                 'succeed_wizard': cls._buttons['succeed'],
                 })
@@ -78,6 +102,20 @@ class Payment:
         for lines in to_reconcile:
             Line.reconcile(lines)
 
+    @property
+    def clearing_account(self):
+        if self.line:
+            return self.line.account
+        elif self.account:
+            return self.account
+
+    @property
+    def clearing_party(self):
+        if self.line:
+            return self.line.party
+        else:
+            return self.party
+
     def create_clearing_move(self, date=None):
         pool = Pool()
         Move = pool.get('account.move')
@@ -86,7 +124,7 @@ class Payment:
         Period = pool.get('account.period')
         Date = pool.get('ir.date')
 
-        if not self.line:
+        if not self.clearing_account:
             return
         if (not self.journal.clearing_account
                 or not self.journal.clearing_journal):
@@ -113,14 +151,14 @@ class Payment:
             line.debit, line.credit = local_amount, 0
         else:
             line.debit, line.credit = 0, local_amount
-        line.account = self.line.account
+        line.account = self.clearing_account
         if not local_currency:
             line.amount_second_currency = self.amount.copy_sign(
                 line.debit - line.credit)
             line.second_currency = self.journal.currency
 
-        line.party = (self.line.party
-            if self.line.account.party_required else None)
+        line.party = (self.clearing_party
+            if line.account.party_required else None)
         counterpart = Line()
         if self.kind == 'payable':
             counterpart.debit, counterpart.credit = 0, local_amount
@@ -164,6 +202,11 @@ class Payment:
                         if line.account.reconcile:
                             to_reconcile[payment.party][line.account].append(
                                 line)
+
+        # Remove clearing_move before delete in case reconciliation triggers
+        # would use it.
+        cls.write(payments, {'clearing_move': None})
+
         if to_unreconcile:
             Reconciliation.delete(to_unreconcile)
         if to_delete:
@@ -172,8 +215,6 @@ class Payment:
             for lines in to_reconcile[party].itervalues():
                 Line.reconcile(lines)
 
-        cls.write(payments, {'clearing_move': None})
-
 
 class Succeed(Wizard):
     "Succeed Payment"
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff --git a/setup.py b/setup.py
index dbe8b14..855db1a 100644
--- a/setup.py
+++ b/setup.py
@@ -77,7 +77,7 @@ setup(name=name,
         ],
     package_data={
         'trytond.modules.account_payment_clearing': (info.get('xml', [])
-            + ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt',
+            + ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
                 'icons/*.svg', 'tests/*.rst']),
         },
     classifiers=[
@@ -105,9 +105,9 @@ setup(name=name,
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
-        'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
+        'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Office/Business',
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..527d859
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+envlist = {py27,py34,py35,py36}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+    {py27,py34,py35,py36}-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 9672e27..ad52969 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.4.0
+version=4.6.0
 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 5139125..be0c7b6 100644
--- a/trytond_account_payment_clearing.egg-info/PKG-INFO
+++ b/trytond_account_payment_clearing.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-account-payment-clearing
-Version: 4.4.0
+Version: 4.6.0
 Summary: Tryton module for payment clearing
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/4.4/
+Download-URL: http://downloads.tryton.org/4.6/
 Description: trytond_account_payment_clearing
         ================================
         
@@ -69,9 +69,9 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/trytond_account_payment_clearing.egg-info/SOURCES.txt b/trytond_account_payment_clearing.egg-info/SOURCES.txt
index 9cdb6fd..3c957c6 100644
--- a/trytond_account_payment_clearing.egg-info/SOURCES.txt
+++ b/trytond_account_payment_clearing.egg-info/SOURCES.txt
@@ -1,12 +1,19 @@
+.drone.yml
+.hgtags
 CHANGELOG
 COPYRIGHT
 INSTALL
 LICENSE
 MANIFEST.in
 README
+__init__.py
+account.py
+payment.py
 payment.xml
 setup.py
+statement.py
 statement.xml
+tox.ini
 tryton.cfg
 ./__init__.py
 ./account.py
@@ -62,8 +69,10 @@ locale/pt_BR.po
 locale/ru.po
 locale/sl.po
 locale/zh_CN.po
+tests/__init__.py
 tests/scenario_account_negative_payment_clearing.rst
 tests/scenario_account_payment_clearing.rst
+tests/test_account_payment_clearing.py
 trytond_account_payment_clearing.egg-info/PKG-INFO
 trytond_account_payment_clearing.egg-info/SOURCES.txt
 trytond_account_payment_clearing.egg-info/dependency_links.txt
diff --git a/trytond_account_payment_clearing.egg-info/requires.txt b/trytond_account_payment_clearing.egg-info/requires.txt
index 6d8c552..78234d6 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 >= 4.4, < 4.5
-trytond >= 4.4, < 4.5
+trytond_account_payment >= 4.6, < 4.7
+trytond >= 4.6, < 4.7
diff --git a/view/payment_form.xml b/view/payment_form.xml
index 766be3c..84e3478 100644
--- a/view/payment_form.xml
+++ b/view/payment_form.xml
@@ -2,6 +2,11 @@
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
 <data>
+    <xpath expr="/form/field[@name='line']" position="after">
+        <label name="account"/>
+        <field name="account"/>
+        <newline/>
+    </xpath>
     <xpath expr="/form/notebook/page[@id='info']/field[@name='group']"
         position="after">
         <label name="clearing_move"/>
-- 
tryton-modules-account-payment-clearing



More information about the tryton-debian-vcs mailing list