Hi,
I’m trying to port a module from 4.8 to 7.0. When running the test-suite via tox, one of the classes fails with
File "/home/hartmut/devel/tryton/community/modules/bank_fints/.tox/py-sqlite/lib/python3.10/site-packages/trytond/tests/test_tryton.py", line 491, in test_missing_parent
self.assertIn('_parent_%s' % depend, parent_depends,
AssertionError: '_parent_account' not found in {'account'} : Missing "_parent_account" in "bank.account.number"."fints_company"."on_change_with"
The code of that class is quite simple:
class BankAccountNumber2(ModelSQL, ModelView):
'Bank Account Number'
__name__ = 'bank.account.number'
fints_company = fields.Function(fields.One2Many('party.party', None,
'Owner', states={'invisible': True}), 'on_change_with_fints_company')
@fields.depends('account')
def on_change_with_fints_company(self, name=None):
if self.account is None:
return []
return [x.id for x in self.account.owners]
Model bank.account.number
is defined in official trytond_bank
and contains the account
field:
if self.account is None:
return []
return [x.id for x in self.account.owners]
bank
is declared as depends
in tryton.cfg
and the module is installed in the virtual environment created by tox.
What piece I’m missing?