Take into accounts the remarks of Eric Caudal

This commit is contained in:
Alexis de Lattre
2016-05-23 10:42:28 +02:00
committed by Enric Tobella
parent e561b49fcd
commit b9c9d10dad
5 changed files with 11 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
=======================
Account Banking Mandate
=======================
@@ -46,11 +47,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/bank-payment/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/
bank-payment/issues/new?body=module:%20
account_banking_mandate%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======

View File

@@ -7,7 +7,7 @@
{
'name': 'Account Banking Mandate',
'summary': 'Banking mandates',
'version': '9.0.0.2.0',
'version': '9.0.1.0.0',
'license': 'AGPL-3',
'author': "Compassion CH, "
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
@@ -31,7 +31,6 @@
'security/mandate_security.xml',
'security/ir.model.access.csv',
],
'demo': [],
'test': ['test/banking_mandate.yml'],
'installable': True,
}

View File

@@ -54,7 +54,7 @@ class AccountBankingMandate(models.Model):
_sql_constraints = [(
'mandate_ref_company_uniq',
'unique(unique_mandate_reference, company_id)',
'A Mandate with the same reference already exists for this company !')]
'A Mandate with the same reference already exists for this company!')]
@api.multi
@api.constrains('signature_date', 'last_debit_date')
@@ -65,7 +65,7 @@ class AccountBankingMandate(models.Model):
mandate)):
raise ValidationError(
_("The date of signature of mandate '%s' "
"is in the future !")
"is in the future!")
% mandate.unique_mandate_reference)
if (mandate.signature_date and mandate.last_debit_date and
mandate.signature_date > mandate.last_debit_date):
@@ -108,7 +108,7 @@ class AccountBankingMandate(models.Model):
for mandate in self:
if mandate.state != 'draft':
raise UserError(
_('Mandate should be in draft state'))
_('Mandate should be in draft state.'))
self.write({'state': 'valid'})
return True
@@ -117,7 +117,7 @@ class AccountBankingMandate(models.Model):
for mandate in self:
if mandate.state not in ('draft', 'valid'):
raise UserError(
_('Mandate should be in draft or valid state'))
_('Mandate should be in draft or valid state.'))
self.write({'state': 'cancel'})
return True
@@ -129,6 +129,6 @@ class AccountBankingMandate(models.Model):
for mandate in self:
if mandate.state != 'cancel':
raise UserError(
_('Mandate should be in cancel state'))
_('Mandate should be in cancel state.'))
self.write({'state': 'draft'})
return True

View File

@@ -10,5 +10,5 @@ class AccountPaymentMethod(models.Model):
mandate_required = fields.Boolean(
string='Mandate Required',
help="Activate this option is this payment method requires your "
help="Activate this option if this payment method requires your "
"customer to sign a direct debit mandate with your company.")

View File

@@ -12,5 +12,5 @@ class ResPartnerBank(models.Model):
mandate_ids = fields.One2many(
comodel_name='account.banking.mandate', inverse_name='partner_bank_id',
string='Direct Debit Mandates',
help='Banking mandates represents an authorization that the bank '
'account owner gives to a company for a specific operation')
help='Banking mandates represent an authorization that the bank '
'account owner gives to a company for a specific operation.')