Add company in context of journal on account receivable rule

Closes #13742
(grafted from 37c56422a08d80416804753adcb90dc58d132d86)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2024-12-09 14:42:37 +01:00
1 parent 6d194a37aa
commit 319adbe7fa
2 files changed
+6 -2

No files matched your search

+4 -1
View File
@@ -45,7 +45,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'