Add company in context of journal on account receivable rule

Closes #13742
This commit is contained in:
Cédric Krier committed 2024-12-09 14:42:37 +01:00
1 parent 2e61af81bb
commit b4b2b5674a
2 files changed
+6 -2

No files matched your search

+4 -1
View File
@@ -46,7 +46,10 @@ class AccountRuleAbstract(DeactivableMixin, ModelSQL, ModelView):
'account.journal', "Journal", required=True, ondelete='CASCADE',
domain=[
('type', '=', 'general'),
])
],
context={
'company': Eval('company', -1),
})
priorities = fields.Selection([
('maturity_date|account', "Maturity Date, Account"),
('account|maturity_date', "Account, Maturity Date"),
@@ -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 AccountReceivableRuleTestCase(ModuleTestCase):
class AccountReceivableRuleTestCase(CompanyTestMixin, ModuleTestCase):
'Test Account Receivable Rule module'
module = 'account_receivable_rule'