diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py
index 69cba05..23c5b2b 100644
--- a/account_ebics/__manifest__.py
+++ b/account_ebics/__manifest__.py
@@ -3,7 +3,7 @@
{
'name': 'EBICS banking protocol',
- 'version': '12.0.1.0.2',
+ 'version': '12.0.1.0.3',
'license': 'LGPL-3',
'author': 'Noviat',
'category': 'Accounting & Finance',
diff --git a/account_ebics/models/ebics_config.py b/account_ebics/models/ebics_config.py
index 0c912e2..ca49192 100644
--- a/account_ebics/models/ebics_config.py
+++ b/account_ebics/models/ebics_config.py
@@ -1,4 +1,4 @@
-# Copyright 2009-2019 Noviat.
+# Copyright 2009-2020 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
"""
@@ -56,10 +56,17 @@ class EbicsConfig(models.Model):
_order = 'name'
name = fields.Char(string='Name', required=True)
+ company_partner_id = fields.Many2one(
+ comodel_name='res.partner',
+ related='company_id.partner_id',
+ string='Account Holder',
+ readonly=True, store=False)
bank_id = fields.Many2one(
comodel_name='res.partner.bank',
readonly=True, states={'draft': [('readonly', False)]},
- string='Bank Account', required=True)
+ string='Bank Account',
+ domain="[('partner_id','=', company_partner_id)]",
+ required=True)
ebics_host = fields.Char(
string='EBICS HostID', required=True,
readonly=True, states={'draft': [('readonly', False)]},
diff --git a/account_ebics/views/ebics_config.xml b/account_ebics/views/ebics_config.xml
index fd51728..57b11e4 100644
--- a/account_ebics/views/ebics_config.xml
+++ b/account_ebics/views/ebics_config.xml
@@ -35,7 +35,7 @@
-
+
@@ -47,6 +47,7 @@
attrs="{'invisible': [('ebics_version', '=', 'H004')]}"/>
+