mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-23 20:52:04 +00:00
[12.0][ADD]account_ebics_batch_payment
This commit is contained in:
parent
0269a2e5cd
commit
0abf216c63
29
account_ebics_batch_payment/README.rst
Normal file
29
account_ebics_batch_payment/README.rst
Normal file
@ -0,0 +1,29 @@
|
||||
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
|
||||
:target: https://www.gnu.org/licenses/lpgl
|
||||
:alt: License: AGPL-3
|
||||
|
||||
==============================
|
||||
Upload Batch Payment via EBICS
|
||||
==============================
|
||||
|
||||
This module allows to upload a Batch Payment to the bank via the EBICS protocol.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
This module depends upon the following modules:
|
||||
|
||||
- account_ebics (cf. https://github.com/Noviat/account_ebics)
|
||||
- account_ebics_oe (cf. https://github.com/Noviat/account_ebics)
|
||||
- account_batch_payment (Odoo Enterprise)
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Create your Batch Payment and generate the bank file.
|
||||
Upload the generated file via the 'EBICS Upload' button on the batch payment.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* Add support for multiple EBICS connections.
|
1
account_ebics_batch_payment/__init__.py
Normal file
1
account_ebics_batch_payment/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import models
|
13
account_ebics_batch_payment/__manifest__.py
Normal file
13
account_ebics_batch_payment/__manifest__.py
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright 2009-2020 Noviat.
|
||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
||||
|
||||
{
|
||||
"name": "Upload Batch Payment via EBICS",
|
||||
"version": "12.0.1.0.0",
|
||||
"license": "LGPL-3",
|
||||
"author": "Noviat",
|
||||
"category": "Accounting & Finance",
|
||||
"depends": ["account_ebics", "account_batch_payment"],
|
||||
"data": ["views/account_batch_payment_views.xml"],
|
||||
"installable": True,
|
||||
}
|
1
account_ebics_batch_payment/models/__init__.py
Normal file
1
account_ebics_batch_payment/models/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import account_batch_payment
|
38
account_ebics_batch_payment/models/account_batch_payment.py
Normal file
38
account_ebics_batch_payment/models/account_batch_payment.py
Normal file
@ -0,0 +1,38 @@
|
||||
# Copyright 2009-2020 Noviat.
|
||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
||||
|
||||
from odoo import _, api, models
|
||||
|
||||
|
||||
class AccountBatchPayment(models.Model):
|
||||
_inherit = "account.batch.payment"
|
||||
|
||||
@api.multi
|
||||
def ebics_upload(self):
|
||||
self.ensure_one()
|
||||
ctx = self.env.context.copy()
|
||||
|
||||
origin = _("Batch Payment") + ": " + self.name
|
||||
ctx.update(
|
||||
{
|
||||
"default_upload_data": self.export_file,
|
||||
"default_upload_fname": self.export_filename,
|
||||
"origin": origin,
|
||||
}
|
||||
)
|
||||
ebics_xfer = self.env["ebics.xfer"].with_context(ctx).create({})
|
||||
ebics_xfer._onchange_upload_data()
|
||||
ebics_xfer._onchange_format_id()
|
||||
view = self.env.ref("account_ebics.ebics_xfer_view_form_upload")
|
||||
act = {
|
||||
"name": _("EBICS Upload"),
|
||||
"view_type": "form",
|
||||
"view_mode": "form",
|
||||
"res_model": "ebics.xfer",
|
||||
"view_id": view.id,
|
||||
"res_id": ebics_xfer.id,
|
||||
"type": "ir.actions.act_window",
|
||||
"target": "new",
|
||||
"context": ctx,
|
||||
}
|
||||
return act
|
BIN
account_ebics_batch_payment/static/description/icon.png
Normal file
BIN
account_ebics_batch_payment/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="view_batch_payment_form" model="ir.ui.view">
|
||||
<field name="name">account.batch.payment.form</field>
|
||||
<field name="model">account.batch.payment</field>
|
||||
<field name="inherit_id" ref="account_batch_payment.view_batch_payment_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="validate_batch" position="after">
|
||||
<button name="ebics_upload" type="object"
|
||||
attrs="{'invisible': ['|', ('file_generation_enabled', '=', False), ('state', '!=', 'sent')]}"
|
||||
string="EBICS Upload"/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
Loading…
Reference in New Issue
Block a user