ebics config bank account domain

This commit is contained in:
Luc De Meyer 2020-06-21 13:01:06 +02:00
parent 8365651efb
commit 8662a1215b
3 changed files with 13 additions and 4 deletions

View File

@ -3,7 +3,8 @@
{
'name': 'EBICS banking protocol',
'version': '13.0.1.0.1',
'version': '13.0.1.0.2',
'license': 'LGPL-3',
'author': 'Noviat',
'category': 'Accounting & Finance',

View File

@ -1,4 +1,4 @@
# Copyright 2009-2019 Noviat.
# Copyright 2009-2020 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
import base64
@ -49,10 +49,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)]},

View File

@ -35,7 +35,7 @@
</header>
<group col="4">
<field name="name" colspan="2"/>
<field name="bank_id" domain="[('company_id', '=', company_id)]"/>
<field name="bank_id"/>
<field name="ebics_host"/>
<field name="ebics_url"/>
<field name="ebics_partner"/>
@ -47,6 +47,7 @@
attrs="{'invisible': [('ebics_version', '=', 'H004')]}"/>
<field name="active"/>
<field name="company_id" widget='selection' groups="base.group_multi_company"/>
<field name="company_partner_id" invisible="1"/>
</group>
<notebook>
<page string="Keys" groups="account_ebics.group_ebics_manager">