mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[ADD] Add context in tests for account_invoice_constraint_chronology addons
This commit is contained in:
committed by
Francesco Apruzzese
parent
6de4623638
commit
a1e51c5e7f
@@ -42,7 +42,7 @@ def get_simple_product_id(self):
|
||||
self.uid,
|
||||
{'name': 'product_test_01',
|
||||
'lst_price': 2000.00,
|
||||
}, context={})
|
||||
}, context=self.context)
|
||||
|
||||
|
||||
def get_journal_check(self, value):
|
||||
@@ -50,13 +50,13 @@ def get_journal_check(self, value):
|
||||
journal_id = self.registry('account.journal').copy(self.cr,
|
||||
self.uid,
|
||||
sale_journal_id,
|
||||
{},
|
||||
context={})
|
||||
self.context,
|
||||
context=self.context)
|
||||
self.registry('account.journal').write(self.cr,
|
||||
self.uid,
|
||||
[journal_id],
|
||||
{'check_chronology': value},
|
||||
context={})
|
||||
context=self.context)
|
||||
return journal_id
|
||||
|
||||
|
||||
@@ -95,6 +95,8 @@ class TestAccountConstraintChronology(common.TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestAccountConstraintChronology, self).setUp()
|
||||
self.context = self.registry("res.users").context_get(self.cr,
|
||||
self.uid)
|
||||
|
||||
def test_invoice_draft(self):
|
||||
journal_id = get_journal_check(self, True)
|
||||
|
||||
Reference in New Issue
Block a user