removed schedule date mandatory from purchase receipt
This commit is contained in:
parent
48c774137a
commit
08a437bad7
@ -32,13 +32,8 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||
var callback = function(doc, dt, dn) {
|
||||
var callback1 = function(doc, dt, dn) {
|
||||
if(doc.__islocal){
|
||||
cur_frm.cscript.get_default_schedule_date(doc);
|
||||
}
|
||||
}
|
||||
// defined in purchase_common.js
|
||||
cur_frm.cscript.update_item_details(doc, dt, dn, callback1);
|
||||
cur_frm.cscript.update_item_details(doc, dt, dn, function(r,rt) { });
|
||||
}
|
||||
cur_frm.cscript.dynamic_label(doc, dt, dn, callback);
|
||||
}
|
||||
@ -118,13 +113,6 @@ cur_frm.cscript.new_contact = function(){
|
||||
loaddoc('Contact', tn);
|
||||
}
|
||||
|
||||
//======================= posting date =============================
|
||||
cur_frm.cscript.transaction_date = function(doc,cdt,cdn){
|
||||
if(doc.__islocal){
|
||||
cur_frm.cscript.get_default_schedule_date(doc);
|
||||
}
|
||||
}
|
||||
|
||||
// ***************** Get project name *****************
|
||||
cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
|
||||
return 'SELECT `tabProject`.name FROM `tabProject` \
|
||||
|
@ -43,19 +43,9 @@ class DocType(TransactionBase):
|
||||
def autoname(self):
|
||||
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
|
||||
|
||||
|
||||
# Client Trigger Functions
|
||||
#----------------------------------------------------------------------------------------------------
|
||||
|
||||
def get_default_schedule_date(self):
|
||||
get_obj(dt = 'Purchase Common').get_default_schedule_date(self)
|
||||
|
||||
#-----------------Validation For Fiscal Year------------------------
|
||||
def validate_fiscal_year(self):
|
||||
get_obj(dt = 'Purchase Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.posting_date,'Transaction Date')
|
||||
|
||||
|
||||
# Get Item Details
|
||||
def get_item_details(self, arg = ''):
|
||||
if arg:
|
||||
return get_obj(dt='Purchase Common').get_item_details(self,arg)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,99 +1,73 @@
|
||||
# DocType, Rename Tool
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
u'creation': '2012-07-03 13:30:42',
|
||||
u'docstatus': 0,
|
||||
u'modified': '2012-11-16 14:16:09',
|
||||
u'modified_by': u'Administrator',
|
||||
u'owner': u'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': u'1308739509',
|
||||
'allow_email': 1,
|
||||
'allow_print': 1,
|
||||
'colour': u'White:FFF',
|
||||
u'doctype': u'DocType',
|
||||
'hide_heading': 0,
|
||||
'hide_toolbar': 0,
|
||||
'issingle': 1,
|
||||
'module': u'Utilities',
|
||||
u'name': u'__common__',
|
||||
'section_style': u'Simple',
|
||||
'show_in_menu': 0,
|
||||
'version': 1
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
{
|
||||
u'doctype': u'DocField',
|
||||
u'name': u'__common__',
|
||||
'parent': u'Rename Tool',
|
||||
'parentfield': u'fields',
|
||||
'parenttype': u'DocType',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# These values are common for all DocPerm
|
||||
{
|
||||
'create': 1,
|
||||
u'doctype': u'DocPerm',
|
||||
u'name': u'__common__',
|
||||
'parent': u'Rename Tool',
|
||||
'parentfield': u'permissions',
|
||||
'parenttype': u'DocType',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': u'System Manager',
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocType, Rename Tool
|
||||
{
|
||||
u'doctype': u'DocType',
|
||||
u'name': u'Rename Tool'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'select_doctype',
|
||||
'fieldtype': u'Select',
|
||||
'label': u'Select DocType',
|
||||
'options': u'\nAccount\nCompany\nCustomer\nSupplier\nEmployee\nWarehouse\nItem\nProfile\nSerial No'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'document_to_rename',
|
||||
'fieldtype': u'Link',
|
||||
'label': u'Document to rename',
|
||||
'options': u'[Select]'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'new_name',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'New Name'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'rename',
|
||||
'fieldtype': u'Button',
|
||||
'label': u'Rename',
|
||||
'options': u'rename'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
u'doctype': u'DocPerm'
|
||||
}
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-11-30 18:14:18",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-12-03 09:48:37"
|
||||
},
|
||||
{
|
||||
"allow_email": 1,
|
||||
"hide_heading": 0,
|
||||
"issingle": 1,
|
||||
"name": "__common__",
|
||||
"allow_print": 1,
|
||||
"doctype": "DocType",
|
||||
"module": "Utilities",
|
||||
"hide_toolbar": 0
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"parent": "Rename Tool",
|
||||
"doctype": "DocField",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"parentfield": "fields"
|
||||
},
|
||||
{
|
||||
"parent": "Rename Tool",
|
||||
"read": 1,
|
||||
"name": "__common__",
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"write": 1,
|
||||
"parenttype": "DocType",
|
||||
"role": "System Manager",
|
||||
"permlevel": 0,
|
||||
"parentfield": "permissions"
|
||||
},
|
||||
{
|
||||
"name": "Rename Tool",
|
||||
"doctype": "DocType"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Select DocType",
|
||||
"fieldname": "select_doctype",
|
||||
"fieldtype": "Select",
|
||||
"options": "\nAccount\nCompany\nCustomer\nSupplier\nEmployee\nWarehouse\nItem\nProfile\nSerial No"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Document to rename",
|
||||
"fieldname": "document_to_rename",
|
||||
"fieldtype": "Link",
|
||||
"options": "[Select]"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "New Name",
|
||||
"fieldname": "new_name",
|
||||
"fieldtype": "Data"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Rename",
|
||||
"fieldname": "rename",
|
||||
"fieldtype": "Button",
|
||||
"options": "rename"
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm"
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user