Add mandate report

issue3922
review9701002
This commit is contained in:
Cédric Krier
2014-09-19 18:41:57 +02:00
parent e0ae4ca5c1
commit 301249c6c5
6 changed files with 27 additions and 1 deletions
+1
View File
@@ -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
+1
View File
@@ -11,3 +11,4 @@ include doc/*
include tests/*.rst
include tests/*.xsd
include template/*.xml
include *.odt
+3
View File
@@ -16,3 +16,6 @@ def register():
Party,
Configuration,
module='account_payment_sepa', type_='model')
Pool.register(
MandateReport,
module='account_payment_sepa', type_='report')
BIN
View File
Binary file not shown.
+9 -1
View File
@@ -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'
+13
View File
@@ -177,5 +177,18 @@ this repository contains the full copyright notices and license terms. -->
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.action.report" id="report_mandate">
<field name="name">Mandate</field>
<field name="model">account.payment.sepa.mandate</field>
<field name="report_name">account.payment.sepa.mandate</field>
<field name="report">account_payment_sepa/mandate.odt</field>
<field name="style">company/header_A4.odt</field>
</record>
<record model="ir.action.keyword" id="report_mandate_keyword">
<field name="keyword">form_print</field>
<field name="model">account.payment.sepa.mandate,-1</field>
<field name="action" ref="report_mandate"/>
</record>
</data>
</tryton>