Set company in the context of clearing journal

Closes #13591
This commit is contained in:
Cédric Krier
2024-10-10 17:00:14 +02:00
parent 492fb7731b
commit 6f049b695b
3 changed files with 6 additions and 1 deletions
@@ -31,6 +31,9 @@ class Journal(metaclass=PoolMeta):
clearing_journal = fields.Many2One('account.journal', 'Clearing Journal',
states={
'required': Bool(Eval('clearing_account')),
},
context={
'company': Eval('company', None),
})
clearing_posting_delay = fields.TimeDelta(
"Clearing Posting Delay",
@@ -1,10 +1,11 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.modules.company.tests import CompanyTestMixin
from trytond.tests.test_tryton import ModuleTestCase
class AccountPaymentTestCase(ModuleTestCase):
class AccountPaymentTestCase(CompanyTestMixin, ModuleTestCase):
'Test Account Payment module'
module = 'account_payment_clearing'
extras = ['account_statement', 'account_statement_rule']
@@ -1,6 +1,7 @@
[tryton]
version=7.5.0
depends:
company
account
account_payment
ir