[IMP] account: added settings for account_sepa_direct_debit module
This commit is contained in:
@@ -50,6 +50,7 @@ class AccountConfigSettings(models.TransientModel):
|
||||
help='This allows you to group received checks before you deposit them to the bank.\n'
|
||||
'-This installs the module account_batch_deposit.')
|
||||
module_account_sepa = fields.Boolean(string='Use SEPA payments')
|
||||
module_account_sepa_direct_debit = fields.Boolean(string='Use SEPA Direct Debit')
|
||||
module_account_plaid = fields.Boolean(string="Plaid Connector")
|
||||
module_account_yodlee = fields.Boolean("Bank Interface - Sync your bank feeds automatically")
|
||||
module_account_bank_statement_import_qif = fields.Boolean("Import .qif files")
|
||||
|
||||
@@ -465,6 +465,17 @@ class account_payment(models.Model):
|
||||
@api.multi
|
||||
def action_draft(self):
|
||||
return self.write({'state': 'draft'})
|
||||
|
||||
def action_validate_invoice_payment(self):
|
||||
""" Posts a payment used to pay an invoice. This function only posts the
|
||||
payment by default but can be overridden to apply specific post or pre-processing.
|
||||
It is called by the "validate" button of the popup window
|
||||
triggered on invoice form by the "Register Payment" button.
|
||||
"""
|
||||
if any(len(record.invoice_ids) != 1 for record in self):
|
||||
# For multiple invoices, there is account.register.payments wizard
|
||||
raise UserError(_("This method should only be called to process a single invoice's payment."))
|
||||
self.post();
|
||||
|
||||
def _create_payment_entry(self, amount):
|
||||
""" Create a journal entry corresponding to a payment, if the payment references invoice(s) they are reconciled.
|
||||
|
||||
@@ -247,6 +247,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="If you check this box, you will be able to collect payments using SEPA Direct Debit mandates.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_sepa_direct_debit" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" name="sepa_direct_debit_right_pane">
|
||||
<label string="SEPA Direct Debit (SDD)" for="module_account_sepa"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Collect customer payments in one-click using Euro SEPA Service.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t groups="account.group_account_user">
|
||||
@@ -269,10 +281,10 @@
|
||||
<field name="module_account_sepa" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" name="sepa_right_pane">
|
||||
<label string="SEPA Payments" for="module_account_sepa"/>
|
||||
<label string="SEPA Credit Transfer (SCT)" for="module_account_sepa"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Pay your bills in one-click, using Euro SEPA service
|
||||
Pay your bills in one-click using Euro SEPA service
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button string='Validate' name="post" type="object" class="btn-primary"/>
|
||||
<button string='Validate' name="action_validate_invoice_payment" type="object" class="btn-primary"/>
|
||||
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user