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

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Jun 7 13:31:59 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.2.0-1-g78cb6f6

commit 78cb6f60282a8e072757ac2f478b4949cfdb4489
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jun 7 15:25:56 2017 +0200

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

diff --git a/CHANGELOG b/CHANGELOG
index c131ba0..944d95c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.4.0 - 2017-05-01
+* Bug fixes (see mercurial logs for details)
+* Allow to set the date of the clearing move
+
 Version 4.2.0 - 2016-11-28
 * Bug fixes (see mercurial logs for details)
 * Mark Payment as succeded or failed when imported in statement
diff --git a/COPYRIGHT b/COPYRIGHT
index a29b425..b707f78 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2014-2016 Cédric Krier.
-Copyright (C) 2014-2016 B2CK SPRL.
+Copyright (C) 2014-2017 Cédric Krier.
+Copyright (C) 2014-2017 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 362e929..844257f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_account_payment_clearing
-Version: 4.2.0
+Version: 4.4.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.2/
+Download-URL: http://downloads.tryton.org/4.4/
 Description: trytond_account_payment_clearing
         ================================
         
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Financial and Insurance Industry
 Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
 Classifier: Natural Language :: Bulgarian
 Classifier: Natural Language :: Catalan
 Classifier: Natural Language :: Chinese (Simplified)
diff --git a/__init__.py b/__init__.py
index bc8b952..ba38f34 100644
--- a/__init__.py
+++ b/__init__.py
@@ -10,7 +10,11 @@ def register():
     Pool.register(
         Journal,
         Payment,
+        SucceedStart,
         Move,
         Statement,
         StatementLine,
         module='account_payment_clearing', type_='model')
+    Pool.register(
+        Succeed,
+        module='account_payment_clearing', type_='wizard')
diff --git a/locale/bg.po b/locale/bg.po
index d268bb4..6210b67 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 #, fuzzy
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
@@ -23,6 +31,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/ca.po b/locale/ca.po
index d36846f..59e841d 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Diari de liquidació"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr "Data"
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "Pagament"
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Grup de pagaments"
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr "Marca pagament amb èxit"
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr "Marca pagaments amb èxit"
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr "Liquidació"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr "Cancel·la"
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr "Amb èxit"
diff --git a/locale/cs.po b/locale/cs.po
index 6c76404..cd4c6e6 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr ""
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/de.po b/locale/de.po
index d01e305..ee87b31 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Auszifferungsjournal"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr "Datum"
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "Zahlung"
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Zahlungsgruppe"
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr "Erfolgreiche Zahlung"
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr "Erfolgreiche Zahlungen"
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr "Auszifferung"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr "Abbrechen"
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr "Erfolgreich"
diff --git a/locale/es.po b/locale/es.po
index 1229c50..b05fb8e 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Diario de liquidación"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "Pago"
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Grupo de pago"
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr "Marcar pagos con éxito"
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr "Marcar pagos con éxito"
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr "Liquidación"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr "Con éxito"
diff --git a/locale/es_419.po b/locale/es_419.po
index 2c552a8..69e1558 100644
--- a/locale/es_419.po
+++ b/locale/es_419.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Libro diario de compensación"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr ""
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr "Compensación"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/fr.po b/locale/fr.po
index 3a3beb3..e519e9c 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Journal de compensation"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr "Date"
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "Paiement"
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Groupe de paiement"
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr "Réussir les paiements"
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr "Réussir les paiements"
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr "Compensation"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr "Annuler"
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr "Réussir"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index 6c76404..cd4c6e6 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr ""
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 38d4a44..f1d3633 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Registro di compensazione"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "Pagamento"
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Raggruppamento pagamenti"
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr "Compensazione"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index 6c76404..cd4c6e6 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr ""
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/lo.po b/locale/lo.po
index 0a538ae..f023015 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -14,14 +14,38 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "ບັນຊີສະສາງປະຈຳວັນ"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr "ວັນທີ"
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr "ເລກລຳດັບ"
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "ການຈ່າຍ"
 
 msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
-msgstr ""
+msgstr "ໝວດການຈ່າຍ"
+
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr "ການຈ່າຍສຳເລັດ"
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr "ການຈ່າຍສຳເລັດ"
 
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
-msgstr ""
+msgstr "ການຊໍາລະ"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr "ຍົກເລີກ"
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr "ສຳເລັດແລ້ວ"
diff --git a/locale/lt.po b/locale/lt.po
index 6c76404..cd4c6e6 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr ""
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/nl.po b/locale/nl.po
index d5cdbba..99b9471 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 #, fuzzy
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
@@ -23,6 +31,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/pl.po b/locale/pl.po
index 6c76404..cd4c6e6 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr ""
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index e4f3383..d7184a5 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -14,14 +14,38 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Diário de Compensação"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr "Data"
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "Pagamento"
 
 msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
-msgstr ""
+msgstr "Pagamento Agrupado"
+
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr "Pagamento com Sucesso"
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr "Pagamentos com Sucesso"
 
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
-msgstr ""
+msgstr "Compensação"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr "Sucesso"
diff --git a/locale/ru.po b/locale/ru.po
index d54ac38..548c71b 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 #, fuzzy
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
@@ -23,6 +31,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/locale/sl.po b/locale/sl.po
index f56c3e4..523bfdb 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr "Klirinški dnevnik"
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr "Datum"
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr "Plačilo"
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr "Plačilna skupina"
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr "Zaključeno plačilo"
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr "Zaključena plačila"
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
-msgstr ""
+msgstr "Kliring"
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr "Prekliči"
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr "Zaključi"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index 6c76404..cd4c6e6 100644
--- a/locale/zh_CN.po
+++ b/locale/zh_CN.po
@@ -14,6 +14,14 @@ msgctxt "field:account.payment.journal,clearing_journal:"
 msgid "Clearing Journal"
 msgstr ""
 
+msgctxt "field:account.payment.succeed.start,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.payment.succeed.start,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.statement.line,payment:"
 msgid "Payment"
 msgstr ""
@@ -22,6 +30,22 @@ msgctxt "field:account.statement.line,payment_group:"
 msgid "Payment Group"
 msgstr ""
 
+msgctxt "model:account.payment.succeed.start,name:"
+msgid "Succeed Payment"
+msgstr ""
+
+msgctxt "model:ir.action,name:wizard_succeed"
+msgid "Succeed Payments"
+msgstr ""
+
 msgctxt "view:account.payment.journal:"
 msgid "Clearing"
 msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,end:"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:account.payment.succeed,start,succeed:"
+msgid "Succeed"
+msgstr ""
diff --git a/payment.py b/payment.py
index 1421092..4ce1894 100644
--- a/payment.py
+++ b/payment.py
@@ -6,8 +6,9 @@ from trytond.pool import PoolMeta, Pool
 from trytond.model import ModelView, Workflow, fields
 from trytond.pyson import Eval, Bool
 from trytond.transaction import Transaction
+from trytond.wizard import Wizard, StateView, StateTransition, Button
 
-__all__ = ['Journal', 'Payment']
+__all__ = ['Journal', 'Payment', 'Succeed', 'SucceedStart']
 
 
 class Journal:
@@ -33,6 +34,18 @@ class Payment:
         readonly=True)
 
     @classmethod
+    def __setup__(cls):
+        super(Payment, cls).__setup__()
+        cls._buttons.update({
+                'succeed_wizard': cls._buttons['succeed'],
+                })
+
+    @classmethod
+    @ModelView.button_action('account_payment_clearing.wizard_succeed')
+    def succeed_wizard(cls, payments):
+        pass
+
+    @classmethod
     @ModelView.button
     @Workflow.transition('succeeded')
     def succeed(cls, payments):
@@ -44,7 +57,8 @@ class Payment:
 
         moves = []
         for payment in payments:
-            move = payment.create_clearing_move()
+            move = payment.create_clearing_move(
+                date=Transaction().context.get('clearing_date'))
             if move:
                 moves.append(move)
         if moves:
@@ -101,7 +115,8 @@ class Payment:
             line.debit, line.credit = 0, local_amount
         line.account = self.line.account
         if not local_currency:
-            line.amount_second_currency = self.amount
+            line.amount_second_currency = self.amount.copy_sign(
+                line.debit - line.credit)
             line.second_currency = self.journal.currency
 
         line.party = (self.line.party
@@ -113,7 +128,8 @@ class Payment:
             counterpart.debit, counterpart.credit = local_amount, 0
         counterpart.account = self.journal.clearing_account
         if not local_currency:
-            counterpart.amount_second_currency = -self.amount
+            counterpart.amount_second_currency = self.amount.copy_sign(
+                counterpart.debit - counterpart.credit)
             counterpart.second_currency = self.journal.currency
         move.lines = (line, counterpart)
         return move
@@ -157,3 +173,35 @@ class Payment:
                 Line.reconcile(lines)
 
         cls.write(payments, {'clearing_move': None})
+
+
+class Succeed(Wizard):
+    "Succeed Payment"
+    __name__ = 'account.payment.succeed'
+    start = StateView('account.payment.succeed.start',
+        'account_payment_clearing.succeed_start_view_form', [
+            Button('Cancel', 'end', 'tryton-cancel'),
+            Button('Succeed', 'succeed', 'tryton-ok', default=True),
+            ])
+    succeed = StateTransition()
+
+    def transition_succeed(self):
+        pool = Pool()
+        Payment = pool.get('account.payment')
+        payments = Payment.browse(Transaction().context['active_ids'])
+
+        with Transaction().set_context(clearing_date=self.start.date):
+            Payment.succeed(payments)
+        return 'end'
+
+
+class SucceedStart(ModelView):
+    "Succeed Payment"
+    __name__ = 'account.payment.succeed.start'
+    date = fields.Date("Date", required=True)
+
+    @classmethod
+    def default_date(cls):
+        pool = Pool()
+        Date = pool.get('ir.date')
+        return Date.today()
diff --git a/payment.xml b/payment.xml
index 2f7c8be..8eacefd 100644
--- a/payment.xml
+++ b/payment.xml
@@ -15,5 +15,23 @@ this repository contains the full copyright notices and license terms. -->
             <field name="inherit" ref="account_payment.payment_view_form"/>
             <field name="name">payment_form</field>
         </record>
+
+        <record model="ir.ui.view" id="payment_view_list">
+            <field name="model">account.payment</field>
+            <field name="inherit" ref="account_payment.payment_view_list"/>
+            <field name="name">payment_list</field>
+        </record>
+
+        <record model="ir.action.wizard" id="wizard_succeed">
+            <field name="name">Succeed Payments</field>
+            <field name="wiz_name">account.payment.succeed</field>
+            <field name="model">account.payment</field>
+        </record>
+
+        <record model="ir.ui.view" id="succeed_start_view_form">
+            <field name="model">account.payment.succeed.start</field>
+            <field name="type">form</field>
+            <field name="name">succeed_start_form</field>
+        </record>
     </data>
 </tryton>
diff --git a/setup.py b/setup.py
index 9ddde83..dbe8b14 100644
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,8 @@ for dep in info.get('depends', []):
 requires.append(get_require_version('trytond'))
 
 tests_require = [get_require_version('proteus'),
-    get_require_version('trytond_account_statement')]
+    get_require_version('trytond_account_statement'),
+    'python-dateutil']
 dependency_links = []
 if minor_version % 2:
     # Add development index for testing with proteus
@@ -86,7 +87,7 @@ setup(name=name,
         'Intended Audience :: Developers',
         'Intended Audience :: Financial and Insurance Industry',
         'Intended Audience :: Legal Industry',
-        'License :: OSI Approved :: GNU General Public License (GPL)',
+        'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
         'Natural Language :: Bulgarian',
         'Natural Language :: Catalan',
         'Natural Language :: Chinese (Simplified)',
diff --git a/tests/scenario_account_negative_payment_clearing.rst b/tests/scenario_account_negative_payment_clearing.rst
index 2a0966b..6a16eb1 100644
--- a/tests/scenario_account_negative_payment_clearing.rst
+++ b/tests/scenario_account_negative_payment_clearing.rst
@@ -99,7 +99,8 @@ Pay the line::
 
 Succeed payment::
 
-    >>> payment.click('succeed')
+    >>> succeed = Wizard('account.payment.succeed', [payment])
+    >>> succeed.execute('succeed')
     >>> payment.state
     u'succeeded'
     >>> payment.clearing_move.state
diff --git a/tests/scenario_account_payment_clearing.rst b/tests/scenario_account_payment_clearing.rst
index 7d3408a..0198ca7 100644
--- a/tests/scenario_account_payment_clearing.rst
+++ b/tests/scenario_account_payment_clearing.rst
@@ -16,6 +16,7 @@ Imports::
     >>> from trytond.modules.account_invoice.tests.tools import \
     ...     set_fiscalyear_invoice_sequences
     >>> today = datetime.date.today()
+    >>> first = today  + relativedelta(day=1)
 
 Install account_payment_clearing and account_statement::
 
@@ -37,6 +38,7 @@ Create chart of accounts::
     >>> _ = create_chart(company)
     >>> accounts = get_accounts(company)
     >>> receivable = accounts['receivable']
+    >>> revenue = accounts['revenue']
     >>> payable = accounts['payable']
     >>> cash = accounts['cash']
 
@@ -51,6 +53,7 @@ Create chart of accounts::
 
     >>> Journal = Model.get('account.journal')
     >>> expense, = Journal.find([('code', '=', 'EXP')])
+    >>> revenue_journal, = Journal.find([('code', '=', 'REV')])
 
 Create payment journal::
 
@@ -65,6 +68,8 @@ Create parties::
     >>> Party = Model.get('party.party')
     >>> supplier = Party(name='Supplier')
     >>> supplier.save()
+    >>> customer = Party(name='Customer')
+    >>> customer.save()
 
 Create payable move::
 
@@ -99,9 +104,15 @@ Partially pay the line::
 
 Succeed payment::
 
-    >>> payment.click('succeed')
+    >>> succeed = Wizard('account.payment.succeed', [payment])
+    >>> succeed.form.date == today
+    True
+    >>> succeed.form.date = first
+    >>> succeed.execute('succeed')
     >>> payment.state
     u'succeeded'
+    >>> payment.clearing_move.date == first
+    True
     >>> payment.clearing_move.state
     u'draft'
     >>> payable.reload()
@@ -146,7 +157,8 @@ Pay the line::
 
 Succeed payment::
 
-    >>> payment.click('succeed')
+    >>> succeed = Wizard('account.payment.succeed', [payment])
+    >>> succeed.execute('succeed')
     >>> payment.state
     u'succeeded'
     >>> payment.clearing_move.state
@@ -170,7 +182,8 @@ Fail payment::
 
 Succeed payment and post clearing::
 
-    >>> payment.click('succeed')
+    >>> succeed = Wizard('account.payment.succeed', [payment])
+    >>> succeed.execute('succeed')
     >>> payment.state
     u'succeeded'
     >>> clearing_move = payment.clearing_move
@@ -193,7 +206,8 @@ Fail payment with posted clearing::
 
 Succeed payment to use on statement::
 
-    >>> payment.click('succeed')
+    >>> succeed = Wizard('account.payment.succeed', [payment])
+    >>> succeed.execute('succeed')
     >>> payment.state
     u'succeeded'
 
@@ -332,13 +346,54 @@ Pay the line::
 
 Succeed payment::
 
-    >>> payment.click('succeed')
+    >>> succeed = Wizard('account.payment.succeed', [payment])
+    >>> succeed.execute('succeed')
     >>> debit_line, = [l for l in payment.clearing_move.lines if l.debit > 0]
     >>> debit_line.debit
     Decimal('20.00')
     >>> debit_line.amount_second_currency
     Decimal('40.00')
 
+Create receivable move::
+
+    >>> move = Move()
+    >>> move.journal = revenue_journal
+    >>> line = move.lines.new(account=receivable, party=customer,
+    ...     debit=Decimal('50.00'), second_currency=euro,
+    ...     amount_second_currency=Decimal('100.0'))
+    >>> line = move.lines.new(account=revenue, credit=Decimal('50.00'))
+    >>> move.click('post')
+    >>> receivable.reload()
+    >>> receivable.balance
+    Decimal('50.00')
+
+Pay the line::
+
+    >>> Payment = Model.get('account.payment')
+    >>> line, = [l for l in move.lines if l.account == receivable]
+    >>> pay_line = Wizard('account.move.line.pay', [line])
+    >>> pay_line.form.journal = euro_payment_journal
+    >>> pay_line.execute('start')
+    >>> payment, = Payment.find([('state', '=', 'draft')])
+    >>> payment.amount
+    Decimal('100.0')
+    >>> payment.click('approve')
+    >>> process_payment = Wizard('account.payment.process', [payment])
+    >>> process_payment.execute('process')
+    >>> payment.reload()
+    >>> payment.state
+    u'processing'
+
+Succeed payment::
+
+    >>> succeed = Wizard('account.payment.succeed', [payment])
+    >>> succeed.execute('succeed')
+    >>> credit_line, = [l for l in payment.clearing_move.lines if l.credit > 0]
+    >>> credit_line.credit
+    Decimal('50.00')
+    >>> credit_line.amount_second_currency
+    Decimal('-100.0')
+
 Validate Statement with processing payment
 --------------------------------------------
 
diff --git a/tryton.cfg b/tryton.cfg
index c5ad434..9672e27 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.0
+version=4.4.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 95473ee..5139125 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.2.0
+Version: 4.4.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.2/
+Download-URL: http://downloads.tryton.org/4.4/
 Description: trytond_account_payment_clearing
         ================================
         
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Financial and Insurance Industry
 Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
 Classifier: Natural Language :: Bulgarian
 Classifier: Natural Language :: Catalan
 Classifier: Natural Language :: Chinese (Simplified)
diff --git a/trytond_account_payment_clearing.egg-info/SOURCES.txt b/trytond_account_payment_clearing.egg-info/SOURCES.txt
index a3cde23..9cdb6fd 100644
--- a/trytond_account_payment_clearing.egg-info/SOURCES.txt
+++ b/trytond_account_payment_clearing.egg-info/SOURCES.txt
@@ -39,8 +39,10 @@ tryton.cfg
 ./tests/test_account_payment_clearing.py
 ./view/payment_form.xml
 ./view/payment_journal_form.xml
+./view/payment_list.xml
 ./view/statement_line_form.xml
 ./view/statement_line_tree.xml
+./view/succeed_start_form.xml
 doc/index.rst
 locale/bg.po
 locale/ca.po
@@ -71,5 +73,7 @@ trytond_account_payment_clearing.egg-info/requires.txt
 trytond_account_payment_clearing.egg-info/top_level.txt
 view/payment_form.xml
 view/payment_journal_form.xml
+view/payment_list.xml
 view/statement_line_form.xml
-view/statement_line_tree.xml
\ No newline at end of file
+view/statement_line_tree.xml
+view/succeed_start_form.xml
\ No newline at end of file
diff --git a/trytond_account_payment_clearing.egg-info/requires.txt b/trytond_account_payment_clearing.egg-info/requires.txt
index d86b9c3..6d8c552 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.2, < 4.3
-trytond >= 4.2, < 4.3
+trytond_account_payment >= 4.4, < 4.5
+trytond >= 4.4, < 4.5
diff --git a/view/payment_form.xml b/view/payment_form.xml
index 1d64b70..766be3c 100644
--- a/view/payment_form.xml
+++ b/view/payment_form.xml
@@ -7,4 +7,7 @@ this repository contains the full copyright notices and license terms. -->
         <label name="clearing_move"/>
         <field name="clearing_move"/>
     </xpath>
+    <xpath expr="//button[@name='succeed']" position="replace_attributes">
+        <button name="succeed_wizard"/>
+    </xpath>
 </data>
diff --git a/view/payment_form.xml b/view/payment_list.xml
similarity index 53%
copy from view/payment_form.xml
copy to view/payment_list.xml
index 1d64b70..16c2227 100644
--- a/view/payment_form.xml
+++ b/view/payment_list.xml
@@ -2,9 +2,7 @@
 <!-- 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/notebook/page[@id='info']/field[@name='group']"
-        position="after">
-        <label name="clearing_move"/>
-        <field name="clearing_move"/>
+    <xpath expr="//button[@name='succeed']" position="replace_attributes">
+        <button name="succeed_wizard"/>
     </xpath>
 </data>
diff --git a/view/succeed_start_form.xml b/view/succeed_start_form.xml
new file mode 100644
index 0000000..e658479
--- /dev/null
+++ b/view/succeed_start_form.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<form>
+    <label name="date"/>
+    <field name="date"/>
+</form>
-- 
tryton-modules-account-payment-clearing



More information about the tryton-debian-vcs mailing list