Merge branch 'latest' of github.com:webnotes/erpnext into latest
Conflicts: version.num
This commit is contained in:
commit
09ef7dc416
@ -1092,14 +1092,14 @@ header .topbar .container {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.web-content input[type="text"], .web-content input[type="password"], .web-content select {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.web-main-section {
|
||||
width: 65%;
|
||||
float: left;
|
||||
|
@ -202,7 +202,6 @@ class DocType:
|
||||
self.update_nsm_model()
|
||||
# Add curret year balance
|
||||
self.set_year_balance()
|
||||
|
||||
|
||||
# Check user role for approval process
|
||||
# ==================================================================
|
||||
@ -232,7 +231,7 @@ class DocType:
|
||||
# ==================================================================
|
||||
def check_balance_before_trash(self):
|
||||
if self.check_gle_exists():
|
||||
msgprint("Account with existing transaction can not be trashed", raise_exception=1)
|
||||
msgprint("Account with existing transaction (Sales Invoice / Purchase Invoice / Journal Voucher) can not be trashed", raise_exception=1)
|
||||
if self.check_if_child_exists():
|
||||
msgprint("Child account exists for this account. You can not trash this account.", raise_exception=1)
|
||||
|
||||
@ -247,11 +246,15 @@ class DocType:
|
||||
# ==================================================================
|
||||
def on_trash(self):
|
||||
# Check balance before trash
|
||||
self.check_balance_before_trash()
|
||||
self.check_balance_before_trash()
|
||||
|
||||
# rebuild tree
|
||||
set(self.doc,'old_parent', '')
|
||||
self.update_nsm_model()
|
||||
|
||||
# delete all cancelled gl entry of this account
|
||||
sql("delete from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'Yes'", self.doc.name)
|
||||
|
||||
#delete Account Balance
|
||||
sql("delete from `tabAccount Balance` where account = %s", self.doc.name)
|
||||
|
||||
@ -260,6 +263,8 @@ class DocType:
|
||||
def on_restore(self):
|
||||
# rebuild tree
|
||||
self.update_nsm_model()
|
||||
# intiate balances
|
||||
self.set_year_balance()
|
||||
|
||||
# on rename
|
||||
# ---------
|
||||
|
@ -10,7 +10,7 @@
|
||||
<h3 style="background-color: #EEF; padding: 2px;">Step 1. Download Template</h3>
|
||||
<select id="import_template" style="margin: 10px;"> <option>Select Master...</option> </select>
|
||||
|
||||
<div style="margin: 10px; margin-top: 0px;"><input name="overwrite" type="checkbox"/> Over-write records with same name?</div>
|
||||
<div style="margin: 10px; margin-top: 0px;"><input name="overwrite" type="checkbox"/> Do you want to over-write records? <br><span style='color:orange'>Warning: Over-writing the data of child tables, will delete all old data. For more info see below</span></div>
|
||||
<div id="child_tab_lst"></div>
|
||||
<h3 style="background-color: #EEF; padding: 2px;">Step 2. Upload and Import</h3>
|
||||
<table style="width: 480px;" border="0" cellspacing="10px">
|
||||
@ -33,23 +33,31 @@
|
||||
</table>
|
||||
</form>
|
||||
<div style="background-color: #FFE; padding: 13px; margin: 17px;">
|
||||
<h3>Data Import Guide</h3>
|
||||
<ol>
|
||||
<li>Get the template of the DocType for which you want to import in CSV (Comma seperated values) format.</li>
|
||||
<li>Fill in the data in the template. You can remove columns that are not relevant</li>
|
||||
<li>Save the template in CSV format</li>
|
||||
<li>Select the saved CSV file, identify the date format if any</li>
|
||||
<li>Click on "Import"</li>
|
||||
</ol></div>
|
||||
<h3>Data Import Guide</h3>
|
||||
<ol>
|
||||
<li>Get the template of the DocType for which you want to import in CSV (Comma seperated values) format.</li>
|
||||
<li>Fill in the data in the template. You can remove columns that are not relevant</li>
|
||||
<li>Save the template in CSV format</li>
|
||||
<li>Select the saved CSV file, identify the date format if any</li>
|
||||
<li>Click on "Import"</li>
|
||||
</ol>
|
||||
<h4>Over-writing Guide</h4>
|
||||
<ol>
|
||||
<li>To over-write data, click on "Do you want to over-write records?" and then download template</li>
|
||||
<li>To over-write parent table data, mention existing ID in "Name" column</li>
|
||||
<li>Over-writing of child table data will delete all previous data of child table and re-import. so before over-writing child tables, export all data from system, modify them and then re-import</li>
|
||||
<li>Over-write checkbox will be checked while importing</li>
|
||||
</ol>
|
||||
</div>
|
||||
</td>
|
||||
<td style="border: 1px solid #AAA; padding: 4px;">
|
||||
<h3>Import Log:</h3>
|
||||
<div id="import_result_area">
|
||||
<iframe name="ImportIFrame" style="border: 0px; height: 500px; width: 100%"></iframe>
|
||||
<iframe name="ImportIFrame" style="border: 0px; height: 620px; width: 100%"></iframe>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,14 +39,14 @@ header .topbar .container {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.web-content input[type="text"], .web-content input[type="password"], .web-content select {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.web-main-section {
|
||||
width: 65%;
|
||||
float: left;
|
||||
|
28
erpnext/website/doctype/website_settings/website_settings.js
Normal file
28
erpnext/website/doctype/website_settings/website_settings.js
Normal file
@ -0,0 +1,28 @@
|
||||
// update parent select
|
||||
|
||||
$.extend(cur_frm.cscript, {
|
||||
|
||||
onload_post_render: function(doc) {
|
||||
// get labels of parent items
|
||||
var get_parent_options = function(table_field) {
|
||||
var items = getchildren('Top Bar Item', doc.name, table_field);
|
||||
var main_items = [''];
|
||||
for(var i in items) {
|
||||
var d = items[i];
|
||||
if(!d.parent_label) {
|
||||
main_items.push(d.label);
|
||||
}
|
||||
}
|
||||
return main_items.join('\n');
|
||||
}
|
||||
|
||||
// bind function to refresh fields
|
||||
// when "Parent Label" is select, it
|
||||
// should automatically update
|
||||
// options
|
||||
$(cur_frm.fields_dict['top_bar_items'].grid.get_field('parent_label').wrapper)
|
||||
.bind('refresh', function() {
|
||||
this.fieldobj.refresh_options(get_parent_options('top_bar_items'));
|
||||
});
|
||||
}
|
||||
});
|
@ -24,7 +24,7 @@ def init():
|
||||
webnotes.http_request = webnotes.auth.HTTPRequest()
|
||||
except webnotes.AuthenticationError, e:
|
||||
pass
|
||||
except webnotes.defs.IllegalDomainException, e:
|
||||
except webnotes.UnknownDomainError, e:
|
||||
print "Location: " + (webnotes.defs.redirect_404)
|
||||
|
||||
def respond():
|
||||
|
@ -216,13 +216,14 @@ throw new SyntaxError('JSON.parse');};}}());
|
||||
/*
|
||||
* lib/js/core.js
|
||||
*/
|
||||
if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
|
||||
/*
|
||||
* lib/js/legacy/globals.js
|
||||
*/
|
||||
wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
|
||||
wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var _c={};var widget_files={'_f.FrmContainer':'form.compressed.js','_c.CalendarPopup':'widgets/form/date_picker.js','_r.ReportContainer':'report.compressed.js','_p.PrintQuery':'widgets/print_query.js','Calendar':'widgets/calendar.js','Recommendation':'widgets/recommend.js','RatingWidget':'widgets/rating.js'}
|
||||
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
|
||||
/*
|
||||
* lib/js/legacy/utils/datatype.js
|
||||
*/
|
||||
@ -936,9 +937,9 @@ this.show=function(){$ds(me.ldiv);}}
|
||||
/*
|
||||
* lib/js/legacy/webpage/page_header.js
|
||||
*/
|
||||
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #444'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #777'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.t1=make_table($a(this.wrapper,'div','',def_ph_style.wrapper.backgroundColor),1,2,'100%',[null,'100px'],{padding:'2px'});$y(this.t1,{borderCollapse:'collapse'})
|
||||
this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
|
||||
this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
|
||||
PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
|
||||
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
|
||||
PageHeader.prototype.make_buttonset=function(){$(this.toolbar_area).buttonset();}
|
||||
@ -1984,7 +1985,7 @@ _f.FormGrid.prototype.make_columns=function(){var gl=fields_list[this.field.df.o
|
||||
gl.sort(function(a,b){return a.idx-b.idx});var p=this.field.perm;for(var i=0;i<gl.length;i++){if(p[this.field.df.permlevel]&&p[this.field.df.permlevel][READ]){this.insert_column(this.field.df.options,gl[i].fieldname,gl[i].fieldtype,gl[i].label,gl[i].width,gl[i].options,this.field.perm,gl[i].reqd);if(gl[i].hidden){this.set_column_disp(gl[i].fieldname,false);}}}}
|
||||
_f.FormGrid.prototype.set_column_label=function(fieldname,label){for(var i=0;i<this.head_row.cells.length;i++){var c=this.head_row.cells[i];if(c.fieldname==fieldname){c.innerHTML='<div class="grid_head_div">'+label+'</div>';c.cur_label=label;break;}}}
|
||||
_f.FormGrid.prototype.refresh=function(){var docset=getchildren(this.doctype,this.field.frm.docname,this.field.df.fieldname,this.field.frm.doctype);var data=[];for(var i=0;i<docset.length;i++){locals[this.doctype][docset[i].name].idx=i+1;data[data.length]=docset[i].name;}
|
||||
this.set_data(data);}
|
||||
this.set_data(data);if(_f.frm_dialog&&_f.frm_dialog.dialog.display&&_f.frm_dialog.cur_frm){_f.frm_dialog.cur_frm.refresh();}}
|
||||
_f.FormGrid.prototype.set_unsaved=function(){locals[cur_frm.doctype][cur_frm.docname].__unsaved=1;cur_frm.set_heading();}
|
||||
_f.FormGrid.prototype.insert_row=function(){var d=this.new_row_doc();var ci=_f.cur_grid_cell.cellIndex;var row_idx=_f.cur_grid_cell.row.rowIndex;d.idx=row_idx+1;for(var ri=row_idx;ri<this.tab.rows.length;ri++){var r=this.tab.rows[ri];if(r.docname)
|
||||
locals[this.doctype][r.docname].idx++;}
|
||||
|
@ -142,13 +142,14 @@ throw new SyntaxError('JSON.parse');};}}());
|
||||
/*
|
||||
* lib/js/core.js
|
||||
*/
|
||||
if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
|
||||
/*
|
||||
* lib/js/legacy/globals.js
|
||||
*/
|
||||
wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
|
||||
wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var _c={};var widget_files={'_f.FrmContainer':'form.compressed.js','_c.CalendarPopup':'widgets/form/date_picker.js','_r.ReportContainer':'report.compressed.js','_p.PrintQuery':'widgets/print_query.js','Calendar':'widgets/calendar.js','Recommendation':'widgets/recommend.js','RatingWidget':'widgets/rating.js'}
|
||||
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
|
||||
/*
|
||||
* lib/js/legacy/utils/datatype.js
|
||||
*/
|
||||
@ -721,9 +722,9 @@ LayoutCell.prototype.hide=function(){$dh(this.wrapper);}
|
||||
/*
|
||||
* lib/js/legacy/webpage/page_header.js
|
||||
*/
|
||||
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #444'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #777'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.t1=make_table($a(this.wrapper,'div','',def_ph_style.wrapper.backgroundColor),1,2,'100%',[null,'100px'],{padding:'2px'});$y(this.t1,{borderCollapse:'collapse'})
|
||||
this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
|
||||
this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
|
||||
PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
|
||||
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
|
||||
PageHeader.prototype.make_buttonset=function(){$(this.toolbar_area).buttonset();}
|
||||
|
@ -1 +1 @@
|
||||
571
|
||||
571
|
||||
|
Loading…
x
Reference in New Issue
Block a user