Merge branch 'master' of github.com:webnotes/erpnext into wsgi
Conflicts: stock/doctype/stock_entry/test_stock_entry.py
This commit is contained in:
commit
8ae6520129
@ -40,6 +40,7 @@ class TestStockEntry(unittest.TestCase):
|
||||
webnotes.conn.set_default("company", self.old_default_company)
|
||||
|
||||
def test_warehouse_company_validation(self):
|
||||
set_perpetual_inventory(0)
|
||||
self._clear_stock_account_balance()
|
||||
webnotes.bean("Profile", "test2@example.com").get_controller()\
|
||||
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
|
||||
@ -54,6 +55,7 @@ class TestStockEntry(unittest.TestCase):
|
||||
webnotes.session.user = "Administrator"
|
||||
|
||||
def test_warehouse_user(self):
|
||||
set_perpetual_inventory(0)
|
||||
from stock.utils import UserNotAllowedForWarehouse
|
||||
|
||||
webnotes.bean("Profile", "test@example.com").get_controller()\
|
||||
@ -68,6 +70,7 @@ class TestStockEntry(unittest.TestCase):
|
||||
st1.insert()
|
||||
self.assertRaises(UserNotAllowedForWarehouse, st1.submit)
|
||||
|
||||
webnotes.session.user = "test2@example.com"
|
||||
st1 = webnotes.bean(copy=test_records[0])
|
||||
st1.doc.company = "_Test Company 1"
|
||||
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user