Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename
This commit is contained in:
commit
44e954f509
@ -368,11 +368,9 @@ cur_frm.cscript.calc_amount = function(doc, n) {
|
||||
|
||||
tmp[rate_fld] = flt( flt(cl[i].purchase_ref_rate) - flt(flt(cl[i].purchase_ref_rate)*flt(cl[i].discount_rate)/100) )
|
||||
set_multiple(tname, cl[i].name, tmp, fname);
|
||||
msgprint(cl[i][rate_fld])
|
||||
set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
|
||||
set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname);
|
||||
set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
|
||||
msgprint(cl[i]['amount'])
|
||||
}else if( n==5){
|
||||
tmp[rate_fld] = flt( flt(cl[i].import_ref_rate) - flt(flt(cl[i].import_ref_rate)*flt(cl[i].discount_rate)/100) ) * flt(doc.conversion_rate);
|
||||
set_multiple(tname, cl[i].name, {'purchase_ref_rate': flt(flt(cl[i].import_ref_rate) * flt(doc.conversion_rate))}, fname);
|
||||
|
@ -37,18 +37,17 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
if(doc.__islocal){
|
||||
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
|
||||
}
|
||||
|
||||
// defined in purchase_common.js
|
||||
//cur_frm.cscript.update_item_details(doc, cdt, cdn);
|
||||
}
|
||||
|
||||
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
||||
var callback = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||
var callback = function(doc, dt, dn) {
|
||||
if(doc.__islocal){
|
||||
cur_frm.cscript.get_default_schedule_date(doc);
|
||||
}
|
||||
}
|
||||
cur_frm.cscript.dynamic_label(doc, cdt, cdn, callback);
|
||||
cur_frm.cscript.dynamic_label(doc, dt, dn, callback);
|
||||
}
|
||||
|
||||
// ================================== Refresh ==========================================
|
||||
|
@ -19,7 +19,6 @@ cur_frm.cscript.fname = "indent_details";
|
||||
|
||||
wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js');
|
||||
wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
|
||||
cur_frm.cscript.indent_doctype_label = get_doctype_label('Purchase Request');
|
||||
|
||||
//========================== On Load =================================================
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
@ -61,18 +60,13 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
}
|
||||
if(!is_closed) {
|
||||
cur_frm.add_custom_button('Make Purchase Order', cur_frm.cscript['Make Purchase Order'])
|
||||
cur_frm.add_custom_button('Stop ' + cur_frm.cscript.indent_doctype_label, cur_frm.cscript['Stop Purchase Requisition'])
|
||||
cur_frm.add_custom_button('Stop Purchase Request', cur_frm.cscript['Stop Purchase Requisition'])
|
||||
}
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
}
|
||||
|
||||
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
||||
cur_frm.add_custom_button('Unstop ' + cur_frm.cscript.indent_doctype_label, cur_frm.cscript['Unstop Purchase Requisition'])
|
||||
|
||||
if(doc.docstatus == 1)
|
||||
unhide_field(['repair_purchase_requisition']);
|
||||
else
|
||||
hide_field(['repair_purchase_requisition']);
|
||||
cur_frm.add_custom_button('Unstop Purchase Request', cur_frm.cscript['Unstop Purchase Requisition'])
|
||||
}
|
||||
|
||||
//======================= validation ===================================
|
||||
@ -90,7 +84,7 @@ cur_frm.cscript.transaction_date = function(doc,cdt,cdn){
|
||||
cur_frm.cscript.qty = function(doc, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
if (flt(d.qty) < flt(d.min_order_qty))
|
||||
alert("Warning: " + cur_frm.cscript.indent_doctype_label + " Qty is less than Minimum Order Qty");
|
||||
alert("Warning: Purchase Requested Qty is less than Minimum Order Qty");
|
||||
}
|
||||
|
||||
// On Button Click Functions
|
||||
@ -116,7 +110,7 @@ cur_frm.cscript['Make Purchase Order'] = function() {
|
||||
// ==================================================================================================
|
||||
cur_frm.cscript['Stop Purchase Requisition'] = function() {
|
||||
var doc = cur_frm.doc;
|
||||
var check = confirm("Do you really want to STOP this " + cur_frm.cscript.indent_doctype_label + "?");
|
||||
var check = confirm("Do you really want to STOP this Purchase Request?");
|
||||
|
||||
if (check) {
|
||||
$c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': compress_doclist(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
|
||||
@ -129,7 +123,7 @@ cur_frm.cscript['Stop Purchase Requisition'] = function() {
|
||||
//====================================================================================================
|
||||
cur_frm.cscript['Unstop Purchase Requisition'] = function(){
|
||||
var doc = cur_frm.doc
|
||||
var check = confirm("Do you really want to UNSTOP this " + cur_frm.cscript.indent_doctype_label + "?");
|
||||
var check = confirm("Do you really want to UNSTOP this Purchase Request?");
|
||||
|
||||
if (check) {
|
||||
$c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': compress_doclist(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
|
||||
|
@ -49,6 +49,10 @@ class DocType:
|
||||
|
||||
def get_default_schedule_date(self):
|
||||
get_obj(dt = 'Purchase Common').get_default_schedule_date(self)
|
||||
|
||||
# get available qty at warehouse
|
||||
def get_bin_details(self, arg = ''):
|
||||
return get_obj(dt='Purchase Common').get_bin_details(arg)
|
||||
|
||||
# Pull Sales Order Items
|
||||
# -------------------------
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-27 14:35:49',
|
||||
'creation': '2012-04-11 13:17:39',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-27 18:44:56',
|
||||
'modified': '2012-04-12 14:36:23',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -13,6 +13,7 @@
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': u'1326190064',
|
||||
'allow_attach': 1,
|
||||
'allow_print': 0,
|
||||
'colour': u'White:FFF',
|
||||
'default_print_format': u'Standard',
|
||||
@ -26,7 +27,7 @@
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'subject': u'%(per_ordered)s% ordered',
|
||||
'version': 198
|
||||
'version': 202
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -54,6 +55,78 @@
|
||||
'name': u'Purchase Request'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Purchase Manager',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Purchase Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Material Manager',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Material Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Material User',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Material User',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
@ -73,78 +146,6 @@
|
||||
'role': u'Purchase User'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Purchase Manager',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Purchase Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Material Manager',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Material Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Material User',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Material User',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
@ -183,27 +184,10 @@
|
||||
'oldfieldtype': u'Select',
|
||||
'options': u'IDT',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'status',
|
||||
'fieldtype': u'Select',
|
||||
'in_filter': 1,
|
||||
'label': u'Status',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'status',
|
||||
'oldfieldtype': u'Select',
|
||||
'options': u'\nDraft\nSubmitted\nStopped\nCancelled',
|
||||
'permlevel': 1,
|
||||
'reqd': 0,
|
||||
'search_index': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
@ -233,20 +217,6 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'% of materials ordered against this Purchase Requisition',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'per_ordered',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'% Ordered',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'per_ordered',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
@ -258,6 +228,14 @@
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'column_break4',
|
||||
'fieldtype': u'Column Break',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
@ -274,6 +252,14 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'column_break5',
|
||||
'fieldtype': u'Column Break',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
@ -284,6 +270,15 @@
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'section_break1',
|
||||
'fieldtype': u'Section Break',
|
||||
'options': u'Simple',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'allow_on_submit': 1,
|
||||
@ -374,6 +369,40 @@
|
||||
'width': u'50%'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'status',
|
||||
'fieldtype': u'Select',
|
||||
'in_filter': 1,
|
||||
'label': u'Status',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'status',
|
||||
'oldfieldtype': u'Select',
|
||||
'options': u'\nDraft\nSubmitted\nStopped\nCancelled',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'reqd': 0,
|
||||
'search_index': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'% of materials ordered against this Purchase Requisition',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'per_ordered',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'% Ordered',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'per_ordered',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
@ -517,15 +546,13 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'allow_on_submit': 1,
|
||||
'colour': u'White:FFF',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'repair_purchase_requisition',
|
||||
'fieldtype': u'Button',
|
||||
'label': u'Repair Purchase Requisition',
|
||||
'oldfieldtype': u'Button',
|
||||
'options': u'repair_indent',
|
||||
'fieldname': u'file_list',
|
||||
'fieldtype': u'Text',
|
||||
'hidden': 1,
|
||||
'label': u'File List',
|
||||
'no_copy': 1,
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
}
|
||||
]
|
||||
]
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-27 14:35:49',
|
||||
'creation': '2012-04-11 13:17:40',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-27 14:35:49',
|
||||
'modified': '2012-04-12 14:52:49',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 34
|
||||
'version': 37
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -72,21 +72,6 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'item_name',
|
||||
'fieldtype': u'Data',
|
||||
'in_filter': 1,
|
||||
'label': u'Item Name',
|
||||
'oldfieldname': u'item_name',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
@ -97,7 +82,7 @@
|
||||
'oldfieldtype': u'Text',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'width': u'300px'
|
||||
'width': u'250px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -118,15 +103,61 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'brand',
|
||||
'fieldname': u'qty',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Quantity',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'qty',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'trigger': u'Client',
|
||||
'width': u'80px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'uom',
|
||||
'fieldtype': u'Link',
|
||||
'label': u'Brand',
|
||||
'oldfieldname': u'brand',
|
||||
'label': u'Stock UOM',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'uom',
|
||||
'oldfieldtype': u'Link',
|
||||
'options': u'Brand',
|
||||
'options': u'UOM',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'width': u'70px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'lead_time_date',
|
||||
'fieldtype': u'Date',
|
||||
'label': u'Lead Time Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'lead_time_date',
|
||||
'oldfieldtype': u'Date',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'item_name',
|
||||
'fieldtype': u'Data',
|
||||
'in_filter': 1,
|
||||
'label': u'Item Name',
|
||||
'oldfieldname': u'item_name',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
@ -150,47 +181,16 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'qty',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Quantity',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'qty',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'trigger': u'Client',
|
||||
'width': u'50px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'lead_time_date',
|
||||
'fieldtype': u'Date',
|
||||
'label': u'Lead Time Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'lead_time_date',
|
||||
'oldfieldtype': u'Date',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'uom',
|
||||
'fieldname': u'brand',
|
||||
'fieldtype': u'Link',
|
||||
'label': u'Stock UOM',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'uom',
|
||||
'label': u'Brand',
|
||||
'oldfieldname': u'brand',
|
||||
'oldfieldtype': u'Link',
|
||||
'options': u'UOM',
|
||||
'options': u'Brand',
|
||||
'permlevel': 1,
|
||||
'reqd': 1,
|
||||
'width': u'50px'
|
||||
'print_hide': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
@ -166,7 +166,7 @@ var type=wn.assets.extn(src);if(wn.assets.handler[type]){wn.assets.handler[type]
|
||||
* lib/js/wn/require.js
|
||||
*/
|
||||
wn.require=function(items){if(typeof items==="string"){items=[items];}
|
||||
var l=items.length;for(var i=0;i<l;i++){var src=items[i];if(!(src in wn.assets.executed_)){wn.assets.execute(src);}}}
|
||||
var l=items.length;for(var i=0;i<l;i++){var src=items[i];wn.assets.execute(src);}}
|
||||
/*
|
||||
* lib/js/wn/dom.js
|
||||
*/
|
||||
@ -1162,8 +1162,7 @@ err_console.onshow=function(){err_console.rows['Error List'].innerHTML='<div sty
|
||||
function loadreport(dt,rep_name,onload){if(rep_name)
|
||||
wn.set_route('Report',dt,rep_name);else
|
||||
wn.set_route('Report',dt);}
|
||||
function loaddoc(doctype,name,onload){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){console.log(1)
|
||||
_f.edit_record(doctype,name);}else{wn.set_route('Form',doctype,name);}})}
|
||||
function loaddoc(doctype,name,onload){wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,name);}else{wn.set_route('Form',doctype,name);}})}
|
||||
var load_doc=loaddoc;function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,'New '+doctype);}else{wn.set_route('Form',doctype,'New '+doctype);}})}
|
||||
var newdoc=new_doc;var pscript={};function loadpage(page_name,call_back,no_history){wn.set_route(page_name);}
|
||||
function loaddocbrowser(dt){wn.set_route('List',dt);}
|
||||
@ -1664,7 +1663,7 @@ var sec;for(var i=0;i<fl.length;i++){var f=fl[i];if(f.fieldtype=='Section Break'
|
||||
continue;var fn=f.fieldname?f.fieldname:f.label;var fld=make_field(f,this.doctype,this.layout.cur_cell,this);this.fields[this.fields.length]=fld;this.fields_dict[fn]=fld;if(sec&&['Section Break','Column Break'].indexOf(f.fieldtype)==-1){fld.parent_section=sec;sec.fields.push(fld);}
|
||||
if(f.fieldtype=='Section Break'){sec=fld;this.sections.push(fld);}
|
||||
if((f.fieldtype=='Section Break')&&(fl[i+1])&&(fl[i+1].fieldtype!='Column Break')&&!f.hidden){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}}
|
||||
_f.Frm.prototype.add_custom_button=function(label,fn,icon){this.frm_head.add_button(label,fn,icon);}
|
||||
_f.Frm.prototype.add_custom_button=function(label,fn,icon){this.frm_head.appframe.add_button(label,fn,icon);}
|
||||
_f.Frm.prototype.clear_custom_buttons=function(){}
|
||||
_f.Frm.prototype.add_fetch=function(link_field,src_field,tar_field){if(!this.fetch_dict[link_field]){this.fetch_dict[link_field]={'columns':[],'fields':[]}}
|
||||
this.fetch_dict[link_field].columns.push(src_field);this.fetch_dict[link_field].fields.push(tar_field);}
|
||||
|
@ -53,7 +53,7 @@ var type=wn.assets.extn(src);if(wn.assets.handler[type]){wn.assets.handler[type]
|
||||
* lib/js/wn/require.js
|
||||
*/
|
||||
wn.require=function(items){if(typeof items==="string"){items=[items];}
|
||||
var l=items.length;for(var i=0;i<l;i++){var src=items[i];if(!(src in wn.assets.executed_)){wn.assets.execute(src);}}}
|
||||
var l=items.length;for(var i=0;i<l;i++){var src=items[i];wn.assets.execute(src);}}
|
||||
/*
|
||||
* lib/js/wn/dom.js
|
||||
*/
|
||||
@ -735,8 +735,7 @@ function unfreeze(){if(!fcount)return;fcount--;if(!fcount){$dh(dialog_back);}}
|
||||
function loadreport(dt,rep_name,onload){if(rep_name)
|
||||
wn.set_route('Report',dt,rep_name);else
|
||||
wn.set_route('Report',dt);}
|
||||
function loaddoc(doctype,name,onload){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){console.log(1)
|
||||
_f.edit_record(doctype,name);}else{wn.set_route('Form',doctype,name);}})}
|
||||
function loaddoc(doctype,name,onload){wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,name);}else{wn.set_route('Form',doctype,name);}})}
|
||||
var load_doc=loaddoc;function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,'New '+doctype);}else{wn.set_route('Form',doctype,'New '+doctype);}})}
|
||||
var newdoc=new_doc;var pscript={};function loadpage(page_name,call_back,no_history){wn.set_route(page_name);}
|
||||
function loaddocbrowser(dt){wn.set_route('List',dt);}
|
||||
|
@ -1 +1 @@
|
||||
1667
|
||||
1671
|
Loading…
Reference in New Issue
Block a user