Use root user to duplicate request in test scenario
Normally user can not create request so this is a way to get around the access rule.
This commit is contained in:
1 parent
75ad8755ea
commit
ba5c6926e0
1 file changed
+2
@@ -185,7 +185,9 @@ Purchase Request state is now 'received'::
|
||||
Duplication of the Purchase Request and set the preferred_quotation_line field
|
||||
with a quotation not having the minimum price unit::
|
||||
|
||||
>>> set_user(0)
|
||||
>>> prequest2, = prequest.duplicate()
|
||||
>>> set_user(purchase_user)
|
||||
>>> prequest2.preferred_quotation_line = sorted(
|
||||
... prequest2.quotation_lines, key=lambda q: q.unit_price)[-1]
|
||||
>>> prequest2.preferred_quotation_line.unit_price
|
||||
|
||||
Reference in new issue
Block a user