diff --git a/CHANGELOG b/CHANGELOG
index f0a7e414cd..5cd7a29cef 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,4 @@
+* Add mandate report
* Use FRST sequence type only for the first payment ever processed
* Handle camt.054
* Add generic SEPA Message
diff --git a/MANIFEST.in b/MANIFEST.in
index 9d81a0576c..4b95b3655e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -11,3 +11,4 @@ include doc/*
include tests/*.rst
include tests/*.xsd
include template/*.xml
+include *.odt
diff --git a/__init__.py b/__init__.py
index 98b2a2d376..6b0570de43 100644
--- a/__init__.py
+++ b/__init__.py
@@ -16,3 +16,6 @@ def register():
Party,
Configuration,
module='account_payment_sepa', type_='model')
+ Pool.register(
+ MandateReport,
+ module='account_payment_sepa', type_='report')
diff --git a/mandate.odt b/mandate.odt
new file mode 100644
index 0000000000..ac7e364f1a
Binary files /dev/null and b/mandate.odt differ
diff --git a/payment.py b/payment.py
index 1ef3289bb7..92d477c096 100644
--- a/payment.py
+++ b/payment.py
@@ -16,10 +16,13 @@ from trytond.pyson import Eval, If
from trytond.transaction import Transaction
from trytond.tools import reduce_ids, grouped_slice
from trytond import backend
+from trytond.modules.company import CompanyReport
+
from .sepa_handler import CAMT054
__metaclass__ = PoolMeta
-__all__ = ['Journal', 'Group', 'Payment', 'Mandate', 'Message']
+__all__ = ['Journal', 'Group', 'Payment', 'Mandate', 'Message',
+ 'MandateReport']
class Journal:
@@ -307,6 +310,7 @@ class Mandate(Workflow, ModelSQL, ModelView):
('CORE', 'Core'),
('B2B', 'Business to Business'),
], 'Scheme', required=True)
+ scheme_string = scheme.translated('scheme')
signature_date = fields.Date('Signature Date',
states={
'readonly': Eval('state').in_(['validated', 'canceled']),
@@ -495,6 +499,10 @@ class Mandate(Workflow, ModelSQL, ModelView):
super(Mandate, cls).delete(mandates)
+class MandateReport(CompanyReport):
+ __name__ = 'account.payment.sepa.mandate'
+
+
class Message(Workflow, ModelSQL, ModelView):
'SEPA Message'
__name__ = 'account.payment.sepa.message'
diff --git a/payment.xml b/payment.xml
index 7b824b1729..751007e435 100644
--- a/payment.xml
+++ b/payment.xml
@@ -177,5 +177,18 @@ this repository contains the full copyright notices and license terms. -->
+
+
+ Mandate
+ account.payment.sepa.mandate
+ account.payment.sepa.mandate
+ account_payment_sepa/mandate.odt
+ company/header_A4.odt
+
+
+ form_print
+ account.payment.sepa.mandate,-1
+
+