mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
fields.date.context_today doesn't work with datetime => we now use the native field create_date Coding style improvements.
This commit is contained in:
committed by
Enric Tobella
parent
abedbfaa96
commit
0779669064
@@ -20,6 +20,5 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard
|
||||
import account_banking_sepa
|
||||
|
||||
from . import wizard
|
||||
from . import account_banking_sepa
|
||||
|
||||
@@ -35,7 +35,7 @@ class banking_export_sepa(orm.Model):
|
||||
for sepa_file in self.browse(cr, uid, ids, context=context):
|
||||
ref = sepa_file.payment_order_ids[0].reference
|
||||
if ref:
|
||||
label = ref.replace('/', '-')
|
||||
label = unidecode(ref.replace('/', '-'))
|
||||
else:
|
||||
label = 'error'
|
||||
res[sepa_file.id] = 'sct_%s.xml' % label
|
||||
@@ -64,8 +64,7 @@ class banking_export_sepa(orm.Model):
|
||||
('SLEV', 'Following Service Level'),
|
||||
], 'Charge Bearer', readonly=True,
|
||||
help='Shared : transaction charges on the sender side are to be borne by the debtor, transaction charges on the receiver side are to be borne by the creditor (most transfers use this). Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor. Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme.'),
|
||||
'generation_date': fields.datetime(
|
||||
'Generation Date', readonly=True),
|
||||
'create_date': fields.datetime('Generation Date', readonly=True),
|
||||
'file': fields.binary('SEPA XML File', readonly=True),
|
||||
'filename': fields.function(
|
||||
_generate_filename, type='char', size=256, string='Filename',
|
||||
@@ -78,6 +77,5 @@ class banking_export_sepa(orm.Model):
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'generation_date': fields.date.context_today,
|
||||
'state': 'draft',
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<field name="prefered_exec_date" />
|
||||
<field name="batch_booking" />
|
||||
<field name="charge_bearer"/>
|
||||
<field name="generation_date" />
|
||||
<field name="create_date" />
|
||||
<newline />
|
||||
<field name="file" filename="filename"/>
|
||||
<field name="filename" invisible="True"/>
|
||||
@@ -48,7 +48,7 @@
|
||||
<tree string="SEPA Credit Transfer">
|
||||
<field name="filename"/>
|
||||
<field name="prefered_exec_date"/>
|
||||
<field name="generation_date"/>
|
||||
<field name="create_date"/>
|
||||
<field name="nb_transactions"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import export_sepa
|
||||
from . import export_sepa
|
||||
|
||||
@@ -36,7 +36,7 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
class banking_export_sepa_wizard(orm.TransientModel):
|
||||
_name = 'banking.export.sepa.wizard'
|
||||
_description = 'Export SEPA Credit Transfer XML file'
|
||||
_description = 'Export SEPA Credit Transfer File'
|
||||
|
||||
_columns = {
|
||||
'state': fields.selection([
|
||||
@@ -418,7 +418,7 @@ class banking_export_sepa_wizard(orm.TransientModel):
|
||||
}, context=context)
|
||||
|
||||
action = {
|
||||
'name': 'SEPA Credit Transfer XML',
|
||||
'name': 'SEPA Credit Transfer File',
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form,tree',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2010-2012 Akretion (http://www.akretion.com)
|
||||
Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user