mirror of
https://github.com/brain-tec/account_ebics.git
synced 2026-10-16 07:49:07 +00:00
[IMP] Add payment upload state tracking on payment orders
account_ebics_payment_order: Add EBICS notebook page with upload info to payment order form
This commit is contained in:
1 parent
2d301e87f8
commit
6697eefb09
3 files changed
+29
-2
No files matched your search
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"name": "EBICS - Payment Orders (OCA)",
|
||||
"summary": "Send an OCA payment order to the bank over EBICS",
|
||||
"version": "19.0.1.0.1",
|
||||
"version": "19.0.1.1.0",
|
||||
"license": "LGPL-3",
|
||||
"author": "Noviat",
|
||||
"website": "https://www.noviat.com/",
|
||||
|
||||
@@ -8,6 +8,19 @@ from odoo.exceptions import UserError
|
||||
class AccountPaymentOrder(models.Model):
|
||||
_inherit = "account.payment.order"
|
||||
|
||||
ebics_config_id = fields.Many2one(
|
||||
comodel_name="ebics.config",
|
||||
related="journal_id.ebics_config_id",
|
||||
)
|
||||
ebics_file_id = fields.Many2one(
|
||||
comodel_name="ebics.file",
|
||||
string="EBICS Upload File",
|
||||
readonly=True,
|
||||
)
|
||||
ebics_order_number = fields.Char(
|
||||
related="ebics_file_id.ebics_order_number",
|
||||
string="EBICS OrderID",
|
||||
)
|
||||
hide_ebics_upload = fields.Boolean(
|
||||
compute="_compute_hide_ebics_upload", default=True
|
||||
)
|
||||
@@ -16,7 +29,9 @@ class AccountPaymentOrder(models.Model):
|
||||
def _compute_hide_ebics_upload(self):
|
||||
for rec in self:
|
||||
rec.hide_ebics_upload = (
|
||||
not rec.journal_id.ebics_config_id or rec.state != "generated"
|
||||
self.env.neutralized
|
||||
or not rec.journal_id.ebics_config_id
|
||||
or rec.state != "generated"
|
||||
)
|
||||
|
||||
def ebics_upload(self):
|
||||
|
||||
@@ -17,6 +17,18 @@
|
||||
class="oe_highlight"
|
||||
/>
|
||||
</button>
|
||||
<notebook position="inside">
|
||||
<page
|
||||
string="EBICS upload info"
|
||||
name="ebics"
|
||||
invisible="not ebics_config_id"
|
||||
>
|
||||
<group name="ebics_info">
|
||||
<field name="ebics_file_id" string="Upload File" />
|
||||
<field name="ebics_order_number" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in new issue
Block a user