Set company in the context of clearing journal

Closes #13591
(grafted from 20987ca4c2cacef09fa96c5d0b8d35150f5df00f)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2024-10-10 17:00:14 +02:00
parent 4f6719704e
commit 2e5d364979
3 changed files with 6 additions and 1 deletions
@@ -30,6 +30,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.0.4
depends:
company
account
account_payment
ir