diff --git a/easy_my_coop_connector/components/emc_bindings.py b/easy_my_coop_connector/components/emc_bindings.py index 0077cdc..221f40a 100644 --- a/easy_my_coop_connector/components/emc_bindings.py +++ b/easy_my_coop_connector/components/emc_bindings.py @@ -73,3 +73,12 @@ class AccountJournalBinding(models.Model): internal_id = fields.Many2one( comodel_name="account.journal", string="Internal ID", required=True ) + + +class AccountAccountBinding(models.Model): + _name = "emc.binding.account.account" + _inherit = "emc.binding" + + internal_id = fields.Many2one( + comodel_name="account.account", string="Internal ID", required=True + ) diff --git a/easy_my_coop_connector/models/__init__.py b/easy_my_coop_connector/models/__init__.py index e3930ee..1090f39 100644 --- a/easy_my_coop_connector/models/__init__.py +++ b/easy_my_coop_connector/models/__init__.py @@ -1,3 +1,4 @@ +from . import account_account from . import account_invoice from . import account_journal from . import account_payment diff --git a/easy_my_coop_connector/models/account_account.py b/easy_my_coop_connector/models/account_account.py new file mode 100644 index 0000000..dfcbe6c --- /dev/null +++ b/easy_my_coop_connector/models/account_account.py @@ -0,0 +1,20 @@ +# Copyright 2020 Coop IT Easy SCRL fs +# Robin Keunen +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +import logging + +from odoo import fields, models + +_logger = logging.getLogger(__name__) + + +class AccountAccount(models.Model): + _inherit = "account.account" + + binding_id = fields.One2many( + comodel_name="emc.binding.account.account", + inverse_name="internal_id", + string="Binding ID", + required=False, + ) diff --git a/easy_my_coop_connector/security/ir.model.access.csv b/easy_my_coop_connector/security/ir.model.access.csv index 96d779b..83a7c46 100644 --- a/easy_my_coop_connector/security/ir.model.access.csv +++ b/easy_my_coop_connector/security/ir.model.access.csv @@ -5,3 +5,4 @@ access_emc_binding_product_template_administrator,access_emc_binding_product_tem access_emc_binding_account_invoice_administrator,access_emc_binding_account_invoice_administrator,model_emc_binding_account_invoice,base.group_system,1,1,1,1 access_emc_binding_account_payment_administrator,access_emc_binding_account_payment_administrator,model_emc_binding_account_payment,base.group_system,1,1,1,1 access_emc_binding_account_journal_administrator,access_emc_binding_account_journal_administrator,model_emc_binding_account_journal,base.group_system,1,1,1,1 +access_emc_binding_account_account_administrator,access_emc_binding_account_account_administrator,model_emc_binding_account_account,base.group_system,1,1,1,1 diff --git a/easy_my_coop_connector/views/actions.xml b/easy_my_coop_connector/views/actions.xml index 0a437ad..bdd6fa1 100644 --- a/easy_my_coop_connector/views/actions.xml +++ b/easy_my_coop_connector/views/actions.xml @@ -40,4 +40,10 @@ emc.binding.account.journal tree,form + + + Account Bindings + emc.binding.account.account + tree,form + diff --git a/easy_my_coop_connector/views/emc_bindings.xml b/easy_my_coop_connector/views/emc_bindings.xml index 8951737..838e283 100644 --- a/easy_my_coop_connector/views/emc_bindings.xml +++ b/easy_my_coop_connector/views/emc_bindings.xml @@ -143,4 +143,32 @@ + + + emc_binding_account_account_view_form + emc.binding.account.account + +
+ + + + + + + +
+
+
+ + + emc_binding_account_account_view_tree + emc.binding.account.account + + + + + + + + diff --git a/easy_my_coop_connector/views/menus.xml b/easy_my_coop_connector/views/menus.xml index 3ce45f8..3710880 100644 --- a/easy_my_coop_connector/views/menus.xml +++ b/easy_my_coop_connector/views/menus.xml @@ -19,41 +19,48 @@ groups="base.group_user" sequence="1010"/> - - - - - + +