Add set_user tools for test scenario
When changing the user of proteus, the context should be reloaded. issue6652 review42551002
This commit is contained in:
@@ -9,7 +9,7 @@ Imports::
|
||||
>>> from decimal import Decimal
|
||||
>>> from operator import attrgetter
|
||||
>>> from proteus import Model, Wizard, Report
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.tests.tools import activate_modules, set_user
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
|
||||
@@ -96,7 +96,7 @@ Create payment term::
|
||||
|
||||
Purchase with analytic accounts::
|
||||
|
||||
>>> config.user = purchase_user.id
|
||||
>>> set_user(purchase_user)
|
||||
>>> Purchase = Model.get('purchase.purchase')
|
||||
>>> purchase = Purchase()
|
||||
>>> purchase.party = supplier
|
||||
@@ -133,7 +133,7 @@ Check invoice analytic accounts::
|
||||
|
||||
Purchase with an empty analytic account::
|
||||
|
||||
>>> config.user = purchase_user.id
|
||||
>>> set_user(purchase_user)
|
||||
>>> Purchase = Model.get('purchase.purchase')
|
||||
>>> purchase = Purchase()
|
||||
>>> purchase.party = supplier
|
||||
|
||||
Reference in New Issue
Block a user