Merge branch 'master' of github.com:webnotes/erpnext into 1209

Conflicts:
	accounts/doctype/account/account.py
	erpnext/accounts/doctype/journal_voucher/journal_voucher.py
	patches/patch_list.py
	startup/event_handlers.py
This commit is contained in:
Anand Doshi
2012-10-02 14:35:20 +05:30
20 changed files with 287 additions and 503 deletions

View File

@@ -19,29 +19,29 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.set_intro("Save this list to begin.");
return;
}
if(!doc.file_list) {
cur_frm.set_intro('<p>1. Click on "Download Template" \
to download the template of all Items.</p>'
+'<p>2. Update prices and Currency.</p>'
+'<p>3. Save it as a CSV (.csv) file.</p>'
+'<p>4. Upload the file.</p>');
if (wn.boot.profile.can_create.indexOf(cdt) !== -1) {
if(!doc.file_list) {
cur_frm.set_intro('<p>1. Click on "Download Template" \
to download the template of all Items.</p>'
+'<p>2. Update prices and Currency.</p>'
+'<p>3. Save it as a CSV (.csv) file.</p>'
+'<p>4. Upload the file.</p>');
cur_frm.add_custom_button('Download Template', function() {
$c_obj_csv(cur_frm.get_doclist(), 'download_template');
}, 'icon-download')
cur_frm.add_custom_button('Download Template', function() {
$c_obj_csv(cur_frm.get_doclist(), 'download_template');
}, 'icon-download')
cur_frm.add_custom_button('Upload Price List', function() {
cur_frm.attachments.add_attachment();
}, 'icon-upload')
cur_frm.add_custom_button('Upload Price List', function() {
cur_frm.attachments.add_attachment();
}, 'icon-upload');
} else {
cur_frm.set_intro('To update prices from the attachment, click on "Update Prices". \
To reset prices, delete the attachment (in the sidebar) and upload again.');
} else {
cur_frm.set_intro('To update prices from the attachment, click on "Update Prices". \
To reset prices, delete the attachment (in the sidebar) and upload again.');
// Update Prices
cur_frm.add_custom_button('Update Prices', function() {
cur_frm.call_server('update_prices');
}, 'icon-refresh')
// Update Prices
cur_frm.add_custom_button('Update Prices', function() {
cur_frm.call_server('update_prices');
}, 'icon-refresh');
}
}
}