[stock] [minor] Added Warehouse User check in Sales Order
This commit is contained in:
parent
e55fb97b5c
commit
c2d2ab796c
4 changed files with 16 additions and 3 deletions
|
|
@ -252,7 +252,17 @@ Thank you,<br>
|
|||
if not validate_email_add(email):
|
||||
webnotes.msgprint("%s is not a valid email id" % email)
|
||||
raise Exception
|
||||
|
||||
|
||||
def add_roles(self, *roles):
|
||||
for role in roles:
|
||||
self.bean.doclist.append({
|
||||
"doctype": "UserRole",
|
||||
"parentfield": "user_roles",
|
||||
"role": role
|
||||
})
|
||||
|
||||
self.bean.save()
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_all_roles(arg=None):
|
||||
"""return all roles"""
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ session_stopped = """<!DOCTYPE html>
|
|||
<body style="background-color: #eee; font-family: Arial, Sans Serif;">
|
||||
<div style="margin: 30px auto; width: 500px; background-color: #fff;
|
||||
border: 1px solid #aaa; padding: 20px; text-align: center">
|
||||
<b>%(app_name)s Upgrading...</b>
|
||||
<b>%(app_name)s: Upgrading...</b>
|
||||
<p>We will be back in a few moments.</p>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</script>
|
||||
<style>
|
||||
body, #container, .outer {
|
||||
background-color: #F5EFE6 !important;
|
||||
background-color: #F5EFE6;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,9 @@ class Bean:
|
|||
self.controller = self.obj
|
||||
return self.obj
|
||||
|
||||
def get_controller(self):
|
||||
return self.make_controller()
|
||||
|
||||
def to_dict(self):
|
||||
return [d.fields for d in self.doclist]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue