Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
2e580fc345
@ -20,6 +20,7 @@ import webnotes
|
|||||||
from webnotes.utils import add_days
|
from webnotes.utils import add_days
|
||||||
from webnotes.model.wrapper import getlist
|
from webnotes.model.wrapper import getlist
|
||||||
from webnotes import form, msgprint
|
from webnotes import form, msgprint
|
||||||
|
from webnotes.model.code import get_obj
|
||||||
|
|
||||||
sql = webnotes.conn.sql
|
sql = webnotes.conn.sql
|
||||||
|
|
||||||
@ -36,8 +37,8 @@ class DocType:
|
|||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
if self.doc.approval_status=="Draft":
|
if self.doc.approval_status=="Draft":
|
||||||
webnotes.msgprint("""Please set Approval Status to 'Approved' or 'Rejected' before submitting""",
|
webnotes.msgprint("""Please set Approval Status to 'Approved' or \
|
||||||
raise_exception=1)
|
'Rejected' before submitting""", raise_exception=1)
|
||||||
|
|
||||||
def validate_fiscal_year(self):
|
def validate_fiscal_year(self):
|
||||||
fy=sql("select year_start_date from `tabFiscal Year` where name='%s'"%self.doc.fiscal_year)
|
fy=sql("select year_start_date from `tabFiscal Year` where name='%s'"%self.doc.fiscal_year)
|
||||||
@ -57,5 +58,6 @@ def get_approver_list():
|
|||||||
roles = [r[0] for r in webnotes.conn.sql("""select distinct parent from `tabUserRole`
|
roles = [r[0] for r in webnotes.conn.sql("""select distinct parent from `tabUserRole`
|
||||||
where role='Expense Approver'""")]
|
where role='Expense Approver'""")]
|
||||||
if not roles:
|
if not roles:
|
||||||
webnotes.msgprint("No Expense Approvers. Please assign 'Expense Approver' Role to atleast one user.")
|
webnotes.msgprint("No Expense Approvers. Please assign 'Expense Approver' \
|
||||||
|
Role to atleast one user.")
|
||||||
return roles
|
return roles
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
<h5><a href="#List/Sales Order">Sales Order</a></h5>
|
<h5><a href="#List/Sales Order">Sales Order</a></h5>
|
||||||
<p class="help">Confirmed orders from Customers</p>
|
<p class="help">Confirmed orders from Customers</p>
|
||||||
<br>
|
<br>
|
||||||
<h5><a href="#List/Sales Order">Communication</a></h5>
|
<h5><a href="#List/Communication">Communication</a></h5>
|
||||||
<p class="help">Confirmed orders from Customers</p>
|
<p class="help">All communication records</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 48%; float: right;">
|
<div style="width: 48%; float: right;">
|
||||||
<h5><a href="#List/Customer">Customer</a></h5>
|
<h5><a href="#List/Customer">Customer</a></h5>
|
||||||
|
@ -60,7 +60,7 @@ class DocType(TransactionBase):
|
|||||||
if appr_users: add_msg = "Users : "+cstr(appr_users)
|
if appr_users: add_msg = "Users : "+cstr(appr_users)
|
||||||
if appr_roles: add_msg = "Roles : "+cstr(appr_roles)
|
if appr_roles: add_msg = "Roles : "+cstr(appr_roles)
|
||||||
if appr_users and appr_roles: add_msg = "Users : "+cstr(appr_users)+" or "+"Roles : "+cstr(appr_roles)
|
if appr_users and appr_roles: add_msg = "Users : "+cstr(appr_users)+" or "+"Roles : "+cstr(appr_roles)
|
||||||
msgprint("You do not have an authority to submit this %s %s. Please send for approval to %s" % (doctype_name, msg, add_msg))
|
msgprint("You are not authorize to submit this %s %s. Please send for approval to %s" % (doctype_name, msg, add_msg))
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,13 +26,13 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
||||||
|
|
||||||
|
|
||||||
if(doc.based_on == 'Grand Total' || doc.based_on == 'Average Discount' || doc.based_on == 'Total Claimed Amount' || doc.based_on == 'Not Applicable') hide_field('master_name');
|
if(doc.based_on == 'Grand Total' || doc.based_on == 'Average Discount' || doc.based_on == 'Not Applicable') hide_field('master_name');
|
||||||
else unhide_field('master_name');
|
else unhide_field('master_name');
|
||||||
|
|
||||||
if(doc.based_on == 'Not Applicable') hide_field('value');
|
if(doc.based_on == 'Not Applicable') hide_field('value');
|
||||||
else unhide_field('value');
|
else unhide_field('value');
|
||||||
|
|
||||||
if(doc.transaction == 'Expense Claim' || doc.transaction == 'Appraisal'){
|
if(doc.transaction == 'Appraisal'){
|
||||||
hide_field(['master_name','system_role', 'system_user']);
|
hide_field(['master_name','system_role', 'system_user']);
|
||||||
unhide_field(['to_emp','to_designation']);
|
unhide_field(['to_emp','to_designation']);
|
||||||
if(doc.transaction == 'Appraisal') hide_field('value');
|
if(doc.transaction == 'Appraisal') hide_field('value');
|
||||||
@ -45,7 +45,7 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
|||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.based_on = function(doc){
|
cur_frm.cscript.based_on = function(doc){
|
||||||
if(doc.based_on == 'Grand Total' || doc.based_on == 'Average Discount' || doc.based_on == 'Total Claimed Amount' || doc.based_on == 'Not Applicable'){
|
if(doc.based_on == 'Grand Total' || doc.based_on == 'Average Discount' || doc.based_on == 'Not Applicable'){
|
||||||
doc.master_name = '';
|
doc.master_name = '';
|
||||||
refresh_field('master_name');
|
refresh_field('master_name');
|
||||||
hide_field('master_name');
|
hide_field('master_name');
|
||||||
@ -63,24 +63,20 @@ cur_frm.cscript.based_on = function(doc){
|
|||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.transaction = function(doc,cdt,cdn){
|
cur_frm.cscript.transaction = function(doc,cdt,cdn){
|
||||||
if(doc.transaction == 'Expense Claim' || doc.transaction == 'Appraisal'){
|
if (doc.transaction == 'Appraisal'){
|
||||||
doc.master_name = doc.system_role = doc.system_user = '';
|
doc.master_name = doc.system_role = doc.system_user = '';
|
||||||
refresh_many(['master_name','system_role', 'system_user']);
|
refresh_many(['master_name','system_role', 'system_user']);
|
||||||
hide_field(['master_name','system_role', 'system_user']);
|
hide_field(['master_name','system_role', 'system_user']);
|
||||||
unhide_field(['to_emp','to_designation']);
|
unhide_field(['to_emp','to_designation']);
|
||||||
if(doc.transaction == 'Appraisal') {
|
|
||||||
doc.value =0;
|
doc.value =0;
|
||||||
refresh_many('value');
|
refresh_many('value');
|
||||||
hide_field('value');
|
hide_field('value');
|
||||||
}
|
}
|
||||||
else unhide_field('value');
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
unhide_field(['master_name','system_role', 'system_user','value']);
|
unhide_field(['master_name','system_role', 'system_user','value']);
|
||||||
hide_field(['to_emp','to_designation']);
|
hide_field(['to_emp','to_designation']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.transaction == 'Expense Claim') doc.based_on = 'Total Claimed Amount';
|
|
||||||
if(doc.transaction == 'Appraisal') doc.based_on == 'Not Applicable';
|
if(doc.transaction == 'Appraisal') doc.based_on == 'Not Applicable';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,70 +31,76 @@ class DocType:
|
|||||||
self.doc, self.doclist = d, dl
|
self.doc, self.doclist = d, dl
|
||||||
|
|
||||||
|
|
||||||
# Duplicate Entry
|
|
||||||
# ----------------
|
|
||||||
def check_duplicate_entry(self):
|
def check_duplicate_entry(self):
|
||||||
exists = sql("select name, docstatus from `tabAuthorization Rule` where transaction = %s and based_on = %s and system_user = %s and system_role = %s and approving_user = %s and approving_role = %s and to_emp =%s and to_designation=%s and name != %s", (self.doc.transaction, self.doc.based_on, cstr(self.doc.system_user), cstr(self.doc.system_role), cstr(self.doc.approving_user), cstr(self.doc.approving_role), cstr(self.doc.to_emp), cstr(self.doc.to_designation), self.doc.name))
|
exists = sql("""select name, docstatus from `tabAuthorization Rule`
|
||||||
|
where transaction = %s and based_on = %s and system_user = %s
|
||||||
|
and system_role = %s and approving_user = %s and approving_role = %s
|
||||||
|
and to_emp =%s and to_designation=%s and name != %s""",
|
||||||
|
(self.doc.transaction, self.doc.based_on, cstr(self.doc.system_user),
|
||||||
|
cstr(self.doc.system_role), cstr(self.doc.approving_user),
|
||||||
|
cstr(self.doc.approving_role), cstr(self.doc.to_emp),
|
||||||
|
cstr(self.doc.to_designation), self.doc.name))
|
||||||
auth_exists = exists and exists[0][0] or ''
|
auth_exists = exists and exists[0][0] or ''
|
||||||
if auth_exists:
|
if auth_exists:
|
||||||
if cint(exists[0][1]) == 2:
|
if cint(exists[0][1]) == 2:
|
||||||
msgprint("Duplicate Entry. Please remove from trash Authorization Rule : %s." %(auth_exists))
|
msgprint("""Duplicate Entry. Please untrash Authorization Rule : %s \
|
||||||
raise Exception
|
from Recycle Bin""" % (auth_exists), raise_exception=1)
|
||||||
else:
|
else:
|
||||||
msgprint("Duplicate Entry. Please check Authorization Rule : %s." % (auth_exists))
|
msgprint("Duplicate Entry. Please check Authorization Rule : %s" %
|
||||||
raise Exception
|
(auth_exists), raise_exception=1)
|
||||||
|
|
||||||
|
|
||||||
# Validate Master Name
|
|
||||||
# ---------------------
|
|
||||||
def validate_master_name(self):
|
def validate_master_name(self):
|
||||||
if self.doc.based_on == 'Customerwise Discount' and not sql("select name from tabCustomer where name = '%s' and docstatus != 2" % (self.doc.master_name)):
|
if self.doc.based_on == 'Customerwise Discount' and \
|
||||||
msgprint("Please select valid Customer Name for Customerwise Discount.")
|
not sql("select name from tabCustomer where name = '%s' and docstatus != 2" % \
|
||||||
raise Exception
|
(self.doc.master_name)):
|
||||||
elif self.doc.based_on == 'Itemwise Discount' and not sql("select name from tabItem where name = '%s' and docstatus != 2" % (self.doc.master_name)):
|
msgprint("Please select valid Customer Name for Customerwise Discount",
|
||||||
msgprint("Please select valid Item Name for Itemwise Discount.")
|
raise_exception=1)
|
||||||
raise Exception
|
elif self.doc.based_on == 'Itemwise Discount' and \
|
||||||
elif (self.doc.based_on == 'Grand Total' or self.doc.based_on == 'Average Discount') and self.doc.master_name:
|
not sql("select name from tabItem where name = '%s' and docstatus != 2" % \
|
||||||
msgprint("Please remove Customer / Item Name for %s." % (self.doc.based_on))
|
(self.doc.master_name)):
|
||||||
raise Exception
|
msgprint("Please select valid Item Name for Itemwise Discount", raise_exception=1)
|
||||||
|
elif (self.doc.based_on == 'Grand Total' or \
|
||||||
|
self.doc.based_on == 'Average Discount') and self.doc.master_name:
|
||||||
|
msgprint("Please remove Customer/Item Name for %s." %
|
||||||
|
self.doc.based_on, raise_exception=1)
|
||||||
|
|
||||||
|
|
||||||
# Validate Rule
|
|
||||||
# --------------
|
|
||||||
def validate_rule(self):
|
def validate_rule(self):
|
||||||
if not self.doc.transaction == 'Expense Claim' and not self.doc.transaction == 'Appraisal':
|
if self.doc.transaction != 'Appraisal':
|
||||||
if not self.doc.approving_role and not self.doc.approving_user:
|
if not self.doc.approving_role and not self.doc.approving_user:
|
||||||
msgprint("Please enter Approving Role or Approving User")
|
msgprint("Please enter Approving Role or Approving User", raise_exception=1)
|
||||||
raise Exception
|
|
||||||
elif self.doc.system_user and self.doc.system_user == self.doc.approving_user:
|
elif self.doc.system_user and self.doc.system_user == self.doc.approving_user:
|
||||||
msgprint("Approving User cannot be same as user the rule is Applicable To (User).")
|
msgprint("Approving User cannot be same as user the rule is Applicable To (User)",
|
||||||
raise Exception
|
raise_exception=1)
|
||||||
elif self.doc.system_role and self.doc.system_role == self.doc.approving_role:
|
elif self.doc.system_role and self.doc.system_role == self.doc.approving_role:
|
||||||
msgprint("Approving Role cannot be same as user the rule is Applicable To (Role).")
|
msgprint("Approving Role cannot be same as user the rule is \
|
||||||
raise Exception
|
Applicable To (Role).", raise_exception=1)
|
||||||
elif self.doc.system_user and self.doc.approving_role and has_common([self.doc.approving_role],[x[0] for x in sql("select role from `tabUserRole` where parent = '%s'" % (self.doc.system_user))]):
|
elif self.doc.system_user and self.doc.approving_role and \
|
||||||
msgprint("System User : %s is assigned role : %s. So rule does not make sense." % (self.doc.system_user,self.doc.approving_role))
|
has_common([self.doc.approving_role], [x[0] for x in \
|
||||||
raise Exception
|
sql("select role from `tabUserRole` where parent = '%s'" % \
|
||||||
elif (self.doc.transaction == 'Purchase Order' or self.doc.transaction == 'Purchase Receipt' or self.doc.transaction == 'Purchase Invoice' or self.doc.transaction == 'Stock Entry') and (self.doc.based_on == 'Average Discount' or self.doc.based_on == 'Customerwise Discount' or self.doc.based_on == 'Itemwise Discount'):
|
(self.doc.system_user))]):
|
||||||
msgprint("You cannot set authorization on basis of Discount for %s." % (self.doc.transaction))
|
msgprint("System User : %s is assigned role : %s. So rule does not make sense" %
|
||||||
raise Exception
|
(self.doc.system_user,self.doc.approving_role), raise_exception=1)
|
||||||
|
elif self.doc.transaction in ['Purchase Order', 'Purchase Receipt', \
|
||||||
|
'Purchase Invoice', 'Stock Entry'] and self.doc.based_on \
|
||||||
|
in ['Average Discount', 'Customerwise Discount', 'Itemwise Discount']:
|
||||||
|
msgprint("You cannot set authorization on basis of Discount for %s" %
|
||||||
|
self.doc.transaction, raise_exception=1)
|
||||||
elif self.doc.based_on == 'Average Discount' and flt(self.doc.value) > 100.00:
|
elif self.doc.based_on == 'Average Discount' and flt(self.doc.value) > 100.00:
|
||||||
msgprint("Discount cannot given for more than 100 %s." % ('%'))
|
msgprint("Discount cannot given for more than 100%", raise_exception=1)
|
||||||
raise Exception
|
|
||||||
elif self.doc.based_on == 'Customerwise Discount' and not self.doc.master_name:
|
elif self.doc.based_on == 'Customerwise Discount' and not self.doc.master_name:
|
||||||
msgprint("Please enter Customer Name for 'Customerwise Discount'")
|
msgprint("Please enter Customer Name for 'Customerwise Discount'",
|
||||||
raise Exception
|
raise_exception=1)
|
||||||
else:
|
else:
|
||||||
if self.doc.transaction == 'Appraisal' and self.doc.based_on != 'Not Applicable':
|
if self.doc.transaction == 'Appraisal' and self.doc.based_on != 'Not Applicable':
|
||||||
msgprint("Based on is 'Not Applicable' while setting authorization rule for 'Appraisal'")
|
msgprint("Based on should be 'Not Applicable' while setting authorization rule\
|
||||||
raise Exception
|
for 'Appraisal'", raise_exception=1)
|
||||||
if self.doc.transaction == 'Expense Claim' and self.doc.based_on != 'Total Claimed Amount':
|
|
||||||
msgprint("Authorization rule should be based on 'Total Calimed Amount' while setting authorization rule for 'Expense Claim'")
|
|
||||||
raise Exception
|
|
||||||
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.check_duplicate_entry()
|
self.check_duplicate_entry()
|
||||||
self.validate_rule()
|
self.validate_rule()
|
||||||
self.validate_master_name()
|
self.validate_master_name()
|
||||||
if not self.doc.value: self.doc.value = flt(0)
|
if not self.doc.value: self.doc.value = 0.0
|
@ -1,212 +1,163 @@
|
|||||||
# DocType, Authorization Rule
|
|
||||||
[
|
[
|
||||||
|
|
||||||
# These values are common in all dictionaries
|
|
||||||
{
|
{
|
||||||
'creation': '2012-03-27 14:36:18',
|
"owner": "Administrator",
|
||||||
'docstatus': 0,
|
"docstatus": 0,
|
||||||
'modified': '2012-03-27 14:36:18',
|
"creation": "2012-07-03 13:30:00",
|
||||||
'modified_by': u'Administrator',
|
"modified_by": "Administrator",
|
||||||
'owner': u'Administrator'
|
"modified": "2012-12-12 10:42:42"
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
|
||||||
{
|
{
|
||||||
'_last_update': u'1308741898',
|
"autoname": "AR.####",
|
||||||
'allow_trash': 1,
|
"name": "__common__",
|
||||||
'autoname': u'AR.####',
|
"search_fields": "transaction,based_on,system_user,system_role,approving_user,approving_role",
|
||||||
'colour': u'White:FFF',
|
"module": "Setup",
|
||||||
'doctype': 'DocType',
|
"doctype": "DocType",
|
||||||
'document_type': u'Master',
|
"document_type": "Master"
|
||||||
'module': u'Setup',
|
|
||||||
'name': '__common__',
|
|
||||||
'search_fields': u'transaction,based_on,system_user,system_role,approving_user,approving_role',
|
|
||||||
'section_style': u'Simple',
|
|
||||||
'server_code_error': u' ',
|
|
||||||
'version': 58
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"name": "__common__",
|
||||||
'name': '__common__',
|
"parent": "Authorization Rule",
|
||||||
'parent': u'Authorization Rule',
|
"doctype": "DocField",
|
||||||
'parentfield': u'fields',
|
"parenttype": "DocType",
|
||||||
'parenttype': u'DocType',
|
"permlevel": 0,
|
||||||
'permlevel': 0
|
"parentfield": "fields"
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocPerm
|
|
||||||
{
|
{
|
||||||
'cancel': 1,
|
"name": "__common__",
|
||||||
'create': 1,
|
"parent": "Authorization Rule",
|
||||||
'doctype': u'DocPerm',
|
"read": 1,
|
||||||
'name': '__common__',
|
"create": 1,
|
||||||
'parent': u'Authorization Rule',
|
"doctype": "DocPerm",
|
||||||
'parentfield': u'permissions',
|
"write": 1,
|
||||||
'parenttype': u'DocType',
|
"cancel": 1,
|
||||||
'permlevel': 0,
|
"parenttype": "DocType",
|
||||||
'read': 1,
|
"role": "System Manager",
|
||||||
'role': u'System Manager',
|
"permlevel": 0,
|
||||||
'write': 1
|
"parentfield": "permissions"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocType, Authorization Rule
|
|
||||||
{
|
{
|
||||||
'doctype': 'DocType',
|
"name": "Authorization Rule",
|
||||||
'name': u'Authorization Rule'
|
"doctype": "DocType"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocPerm'
|
"oldfieldtype": "Link",
|
||||||
|
"doctype": "DocField",
|
||||||
|
"label": "Company",
|
||||||
|
"oldfieldname": "company",
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"search_index": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"options": "Company"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocPerm'
|
"oldfieldtype": "Select",
|
||||||
|
"doctype": "DocField",
|
||||||
|
"label": "Transaction",
|
||||||
|
"oldfieldname": "transaction",
|
||||||
|
"fieldname": "transaction",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"reqd": 1,
|
||||||
|
"options": "\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nStock Entry\nAppraisal"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"oldfieldtype": "Select",
|
||||||
'fieldname': u'company',
|
"doctype": "DocField",
|
||||||
'fieldtype': u'Link',
|
"label": "Based On",
|
||||||
'label': u'Company',
|
"oldfieldname": "based_on",
|
||||||
'oldfieldname': u'company',
|
"fieldname": "based_on",
|
||||||
'oldfieldtype': u'Link',
|
"fieldtype": "Select",
|
||||||
'options': u'Company',
|
"reqd": 1,
|
||||||
'reqd': 0,
|
"options": "\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nNot Applicable"
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"oldfieldtype": "Link",
|
||||||
'fieldname': u'transaction',
|
"doctype": "DocField",
|
||||||
'fieldtype': u'Select',
|
"label": "Customer / Item Name",
|
||||||
'label': u'Transaction',
|
"oldfieldname": "master_name",
|
||||||
'oldfieldname': u'transaction',
|
"fieldname": "master_name",
|
||||||
'oldfieldtype': u'Select',
|
"fieldtype": "Link",
|
||||||
'options': u'\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nStock Entry\nExpense Claim\nAppraisal',
|
"options": "[Select]"
|
||||||
'reqd': 1
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"oldfieldtype": "Link",
|
||||||
'fieldname': u'based_on',
|
"doctype": "DocField",
|
||||||
'fieldtype': u'Select',
|
"label": "Applicable To (Role)",
|
||||||
'label': u'Based On',
|
"oldfieldname": "system_role",
|
||||||
'oldfieldname': u'based_on',
|
"fieldname": "system_role",
|
||||||
'oldfieldtype': u'Select',
|
"fieldtype": "Link",
|
||||||
'options': u'\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nTotal Claimed Amount\nNot Applicable',
|
"options": "Role"
|
||||||
'reqd': 1,
|
|
||||||
'trigger': u'Client'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"oldfieldtype": "Link",
|
||||||
'fieldname': u'master_name',
|
"doctype": "DocField",
|
||||||
'fieldtype': u'Link',
|
"label": "Applicable To (User)",
|
||||||
'label': u'Customer / Item Name',
|
"oldfieldname": "system_user",
|
||||||
'oldfieldname': u'master_name',
|
"fieldname": "system_user",
|
||||||
'oldfieldtype': u'Link',
|
"fieldtype": "Link",
|
||||||
'trigger': u'Client'
|
"options": "Profile"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"description": "This will be used for setting rule in HR module",
|
||||||
'fieldname': u'system_role',
|
"oldfieldtype": "Link",
|
||||||
'fieldtype': u'Link',
|
"doctype": "DocField",
|
||||||
'label': u'Applicable To (Role)',
|
"label": "Applicable To (Employee)",
|
||||||
'oldfieldname': u'system_role',
|
"oldfieldname": "to_emp",
|
||||||
'oldfieldtype': u'Link',
|
"fieldname": "to_emp",
|
||||||
'options': u'Role'
|
"fieldtype": "Link",
|
||||||
|
"search_index": 0,
|
||||||
|
"options": "Employee"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
"description": "This will be used for setting rule in HR module",
|
||||||
'doctype': u'DocField',
|
"oldfieldtype": "Link",
|
||||||
'fieldname': u'system_user',
|
"doctype": "DocField",
|
||||||
'fieldtype': u'Link',
|
"label": "Applicable To (Designation)",
|
||||||
'label': u'Applicable To (User)',
|
"oldfieldname": "to_designation",
|
||||||
'oldfieldname': u'system_user',
|
"fieldname": "to_designation",
|
||||||
'oldfieldtype': u'Link',
|
"fieldtype": "Link",
|
||||||
'options': u'Profile'
|
"search_index": 0,
|
||||||
|
"options": "Designation"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
"oldfieldtype": "Link",
|
||||||
'description': u'This will be used for setting rule in HR module',
|
"doctype": "DocField",
|
||||||
'doctype': u'DocField',
|
"label": "Approving Role",
|
||||||
'fieldname': u'to_emp',
|
"oldfieldname": "approving_role",
|
||||||
'fieldtype': u'Link',
|
"fieldname": "approving_role",
|
||||||
'label': u'Applicable To (Employee)',
|
"fieldtype": "Link",
|
||||||
'oldfieldname': u'to_emp',
|
"options": "Role"
|
||||||
'oldfieldtype': u'Link',
|
|
||||||
'options': u'Employee',
|
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
"oldfieldtype": "Link",
|
||||||
'description': u'This will be used for setting rule in HR module',
|
"doctype": "DocField",
|
||||||
'doctype': u'DocField',
|
"label": "Approving User",
|
||||||
'fieldname': u'to_designation',
|
"oldfieldname": "approving_user",
|
||||||
'fieldtype': u'Link',
|
"fieldname": "approving_user",
|
||||||
'label': u'Applicable To (Designation)',
|
"fieldtype": "Link",
|
||||||
'oldfieldname': u'to_designation',
|
"options": "Profile"
|
||||||
'oldfieldtype': u'Link',
|
|
||||||
'options': u'Designation',
|
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"default": "0.00",
|
||||||
'fieldname': u'approving_role',
|
"oldfieldtype": "Currency",
|
||||||
'fieldtype': u'Link',
|
"doctype": "DocField",
|
||||||
'label': u'Approving Role',
|
"label": "Above Value",
|
||||||
'oldfieldname': u'approving_role',
|
"oldfieldname": "value",
|
||||||
'oldfieldtype': u'Link',
|
"fieldname": "value",
|
||||||
'options': u'Role'
|
"fieldtype": "Currency"
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"oldfieldtype": "Small Text",
|
||||||
'fieldname': u'approving_user',
|
"doctype": "DocField",
|
||||||
'fieldtype': u'Link',
|
"label": "Trash Reason",
|
||||||
'label': u'Approving User',
|
"oldfieldname": "trash_reason",
|
||||||
'oldfieldname': u'approving_user',
|
"fieldname": "trash_reason",
|
||||||
'oldfieldtype': u'Link',
|
"fieldtype": "Small Text"
|
||||||
'options': u'Profile'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'default': u'0.00',
|
"doctype": "DocPerm"
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'value',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Above Value',
|
|
||||||
'oldfieldname': u'value',
|
|
||||||
'oldfieldtype': u'Currency'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
"doctype": "DocPerm"
|
||||||
'fieldname': u'trash_reason',
|
|
||||||
'fieldtype': u'Small Text',
|
|
||||||
'label': u'Trash Reason',
|
|
||||||
'oldfieldname': u'trash_reason',
|
|
||||||
'oldfieldtype': u'Small Text'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
x
Reference in New Issue
Block a user