'\
- +(webnotes.conn.get_value('Control Panel', None, 'company_name') or '')):
- return False
-
- elif 'Banner Comes Here' in header:
- return False
-
- else:
- return True
-
- if not is_header_set():
- ret.append('
Upload your company banner')
- else:
- percent += 20
-
- def check_type(doctype, ret, percent):
- if not webnotes.conn.sql("select count(*) from tab%s" % doctype)[0][0]:
- ret.append('''
-
- Create a new %(dt)s
- or
-
- Import from a spreadsheet''' % {'dt':doctype})
- else:
- percent += 20
- return ret, percent
-
- ret, percent = check_type('Item', ret, percent)
- ret, percent = check_type('Customer', ret, percent)
- ret, percent = check_type('Supplier', ret, percent)
-
- if percent==100:
- webnotes.conn.set_global('setup_done', '1')
- return ''
-
- return {'ret': ret, 'percent': percent}
-
diff --git a/erpnext/home/page/event_updates/event_updates.txt b/erpnext/home/page/event_updates/event_updates.txt
deleted file mode 100644
index 21d93500339..00000000000
--- a/erpnext/home/page/event_updates/event_updates.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-# Page, Event Updates
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-12-14 10:23:23',
- 'docstatus': 0,
- 'modified': '2010-12-27 10:58:56',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Page
- {
- 'doctype': 'Page',
- 'module': 'Home',
- 'name': '__common__',
- 'page_name': 'Event Updates',
- 'standard': 'Yes'
- },
-
- # Page, Event Updates
- {
- 'doctype': 'Page',
- 'name': 'Event Updates'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/page/event_updates/event_updates_static.html b/erpnext/home/page/event_updates/event_updates_static.html
deleted file mode 100644
index 682f1b2c5e3..00000000000
--- a/erpnext/home/page/event_updates/event_updates_static.html
+++ /dev/null
@@ -1 +0,0 @@
-Event Updates
\ No newline at end of file
diff --git a/erpnext/home/page/my_company/__init__.py b/erpnext/home/page/my_company/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/page/my_company/my_company.css b/erpnext/home/page/my_company/my_company.css
deleted file mode 100644
index d2d9a668f42..00000000000
--- a/erpnext/home/page/my_company/my_company.css
+++ /dev/null
@@ -1,82 +0,0 @@
-/* item */
-
-div.my-company-member-item-selected {
- background-color: #BBC;
-}
-
-
-
-/* profile */
-.my-company-name-head {
- font-size: 14px;
- font-weight: bold;
- margin-bottom: 7px;
-}
-
-.my-company-email {
- margin-bottom: 7px;
- color: #888;
-}
-
-.my-company-online-status {
- font-weight: bold;
- margin-left: 7px;
-}
-
-.my-company-status {
- margin-bottom: 7px;
- color: #888;
- font-style: italics;
-}
-
-.my-company-bio {
- margin-bottom: 7px;
-}
-
-.my-company-toolbar {
- margin: 7px 0px;
-}
-
-/* conversation */
-
-.my-company-input-wrapper {
- color: #555;
- padding: 13px;
-}
-
-.my-company-input-wrapper td {
- vertical-align: bottom;
-}
-
-.my-company-input-wrapper textarea {
- height: 3em;
- font-size: 14px;
- width: 100%;
- margin: 7px 0px 3px 0px;
-}
-
-.my-company-input-wrapper button {
- margin: 0px;
-}
-
-.my-company-conversation {
- border-top: 1px solid #DDD;
-}
-.my-company-comment-wrapper {
- padding: 7px;
- border-bottom: 1px solid #DDD;
-}
-
-.my-company-timestamp {
- color: #888;
- font-size: 11px;
- margin: 3px;
-}
-
-.my-company-conversation-head {
- padding: 3px;
- background-color: #DEDEDE;
- color: #555;
- font-size: 14px;
- text-align: center;
-}
\ No newline at end of file
diff --git a/erpnext/home/page/my_company/my_company.html b/erpnext/home/page/my_company/my_company.html
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/page/my_company/my_company.js b/erpnext/home/page/my_company/my_company.js
deleted file mode 100644
index f6425630647..00000000000
--- a/erpnext/home/page/my_company/my_company.js
+++ /dev/null
@@ -1,760 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see
.
-
-pscript['onload_My Company'] = function() {
- var wrapper = wn.pages['My Company'];
-
- // body
- wrapper.className = 'layout_wrapper';
- wrapper.head = new PageHeader(wrapper, 'People');
- wrapper.body = $a(wrapper, 'div', '', {marginRight:'11px', marginTop:'11px'});
-
- wrapper.message = $a(wrapper.body, 'div');
- wrapper.tab = make_table(wrapper.body, 1, 2, '100%', ['25%','75%']);
-
- $y(wrapper.tab, {tableLayout:'fixed'})
-
- pscript.myc_make_toolbar(wrapper);
- pscript.myc_make_list(wrapper);
-
- if(pscript.is_erpnext_saas) {
- pscript.myc_show_erpnext_message();
- }
-}
-
-pscript.myc_make_toolbar = function(wrapper) {
- if(has_common(user_roles, ['System Manager', 'Administrator'])) {
- wrapper.head.add_button('Add User', pscript.myc_add_user)
- }
-}
-
-//
-// Only for erpnext product - show max users allowed
-//
-pscript.myc_show_erpnext_message = function() {
- var callback = function(r, rt) {
- if(r.exc) {msgprint(r.exc); return;}
- $a(wrapper.message, 'div', 'help_box', '', 'You have ' + r.message.enabled
- + ' users enabled out of ' + r.message.max_user
- + '. Go to
Account Settings to increase the number of users');
- }
- $c_page('home', 'my_company', 'get_max_users', '', callback)
-}
-
-//
-// Add user dialog and server call
-//
-pscript.myc_add_user = function() {
- var fields = [{
- fieldtype: 'Data',
- fieldname: 'user',
- reqd: 1,
- label: 'Email Id of the user to add'
- },
- {
- fieldtype: 'Data',
- fieldname: 'first_name',
- reqd: 1,
- label: 'First Name'
- },
- {
- fieldtype: 'Data',
- fieldname: 'last_name',
- label: 'Last Name'
- },
- {
- fieldtype: 'Data',
- fieldname: 'password',
- reqd: 1,
- label: 'Password'
- },
- {
- fieldtype: 'Button',
- label: 'Add',
- fieldname: 'add'
- }];
-
- fields.push();
-
- var d = new wn.widgets.Dialog({
- title: 'Add User',
- width: 400,
- fields: fields
- });
- d.make();
- d.fields_dict.add.input.onclick = function() {
- v = d.get_values();
- if(v) {
- d.fields_dict.add.input.set_working();
- $c_page('home', 'my_company', 'add_user', v, function(r,rt) {
- if(r.exc) { msgprint(r.exc); return; }
- else {
- d.hide();
- pscript.myc_refresh();
- }
- })
- }
- }
- d.show();
-}
-
-pscript.myc_refresh = function() {
- wn.pages['My Company'].member_list.lst.run();
-}
-
-pscript.myc_make_list= function(wrapper) {
- wrapper.member_list = new MemberList(wrapper)
-}
-
-pscript.get_fullname=function(uid) {
- if(uid=='Administrator') return uid;
- return wn.pages['My Company'].member_list.member_items[uid].fullname;
-}
-
-
-
-//=============================================
-
-MemberList = function(parent) {
- var me = this;
- this.profiles = {};
- this.member_items = {};
- this.role_objects = {};
- this.cur_profile = null;
-
- this.list_wrapper = $a($td(parent.tab,0,0), 'div', '', {marginLeft:'11px'});
- var cell = $td(parent.tab,0,1);
- $y(cell, { border: '1px solid #aaa' });
- cell.className = 'layout_wrapper';
- this.profile_wrapper = $a(cell, 'div');
-
- this.no_user_selected = $a(this.profile_wrapper, 'div', 'help_box', null, 'Please select a user to view profile');
-
- this.make_search();
- if(pscript.online_users) {
- this.make_list();
- } else {
- $c_page('home', 'event_updates', 'get_online_users', '', function(r,rt) {
- pscript.online_users = r.message;
- me.make_list();
- })
- }
-}
-
-// ----------------------
-
-MemberList.prototype.make_search = function() {
- var me = this;
- this.search_area = $a(this.list_wrapper, 'div', '', {textAlign:'center', padding:'8px'});
- this.search_inp = $a(this.search_area, 'input', '', {fontSize:'14px', width:'80%'});
- this.search_inp.set_empty = function() {
- this.value = 'Search'; $fg(this,'#888');
- }
- this.search_inp.onfocus = function() {
- $fg(this,'#000');
- if(this.value=='Search')this.value = '';
- }
- this.search_inp.onchange = function() {
- if(!this.value) this.set_empty();
- }
- this.search_inp.set_empty();
-}
-
-// ----------------------
-
-MemberList.prototype.make_list = function() {
- var me = this;
- this.lst_area = $a(this.list_wrapper, 'div');
-
- this.lst = new wn.ui.Listing({
- parent: this.lst_area,
- as_dict: 1,
- get_query: function() {
- var c1 = '';
- if(me.search_inp.value && me.search_inp.value != 'Search') {
- var c1 = repl(' AND (first_name LIKE "%(txt)s" OR last_name LIKE "%(txt)s" OR name LIKE "%(txt)s")', {txt:'%' + me.search_inp.value + '%'});
- }
-
- return repl("SELECT name, \
- ifnull(concat_ws(' ', first_name, last_name),'') as full_name, \
- gender, file_list, enabled \
- FROM tabProfile \
- WHERE docstatus != 2 \
- AND name not in ('Guest','Administrator') %(cond)s \
- ORDER BY name asc",{cond:c1});
- },
- render_row: function(parent, data) {
- me.member_items[data.name] = new MemberItem(parent, data, me);
- }
- });
- this.lst.run();
-}
-
-
-/*
-Create / show profile
-*/
-MemberList.prototype.show_profile = function(uid, member_item) {
- $dh(this.no_user_selected);
-
- // if not exists, create
- if(!this.profiles[uid]) {
- if(!member_item) member_item = this.member_items[uid];
- this.profiles[uid] = new MemberProfile(this.profile_wrapper, uid, member_item);
- }
-
- // hide current
- if(this.cur_profile)
- this.cur_profile.hide();
-
- // show this
- this.profiles[uid].show();
- this.cur_profile = this.profiles[uid];
-}
-
-
-// Member Item
-// List item of all profiles
-// on the left hand sidebar of the page
-
-MemberItem = function(parent, det, mlist) {
- var me = this;
- this.det = det;
- this.wrapper = $a(parent, 'div');
- this.enabled = det.enabled;
-
- this.tab = make_table(this.wrapper, 1,2,'100%', ['20%', '70%'], {padding:'4px', overflow:'hidden'});
- $y(this.tab, {tableLayout:'fixed', borderCollapse:'collapse'})
-
- this.is_online = function() {
- for(var i=0;i
Your Password',
- description: "Your password is required to update the concerned user's password",
- fieldtype: 'Password',
- fieldname: 'sys_admin_pwd',
- reqd: 1
- },
-
- {
- label: 'Continue',
- fieldtype: 'Button',
- fieldname: 'continue'
- }
- ]
- });
-
- pass_d.fields_dict.continue.input.onclick = function() {
- btn.pwd_dialog.hide();
- args.sys_admin_pwd = btn.pwd_dialog.get_values().sys_admin_pwd;
- btn.set_working();
- me.update_security(args);
- btn.done_working();
- }
-
- pass_d.show();
- btn.pwd_dialog = pass_d;
- btn.done_working();
- } else {
- btn.done_working();
- me.update_security(args);
- }
- };
- sd.show();
- }
-
- this.update_security = function(args) {
- $c_page('home', 'my_company', 'update_security', JSON.stringify(args), function(r,rt) {
- if(r.exc) {
- msgprint(r.exc);
- return;
- }
- me.sec_dialog.hide();
- $.extend(me.profile, me.sec_dialog.get_values());
- });
- }
-
- // delete user
- // create a confirm dialog and call server method
- this.delete_user = function() {
- var cp = wn.control_panel;
-
- var d = new Dialog(400,200,'Delete User');
- d.make_body([
- ['HTML','','Do you really want to remove '+this.uid+' from system?'],['Button','Delete']
- ]);
- d.onshow = function() {
- this.clear_inputs();
- }
-
- d.widgets['Delete'].onclick = function() {
- this.set_working();
-
- var callback = function(r,rt) {
- d.hide();
- if(r.exc) {
- msgprint(r.exc);
- return;
- }
- pscript.myc_refresh()
- msgprint("User Deleted Successfully");
- }
- $c_page('home', 'my_company', 'delete_user', {'user': me.uid}, callback);
- }
- d.show();
- }
-
- // set enabled
- this.set_enable_button = function() {
- var me = this;
- var act = this.profile.enabled ? 'Disable' : 'Enable';
-
- if(this.status_button) {
- this.status_button.innerHTML = act;
- } else {
- // make the button
- this.status_button = $btn(this.toolbar_area, act, function() {
- var callback = function(r,rt) {
- locals['Profile'][me.profile.name].enabled = cint(r.message);
- me.status_button.done_working();
- me.refresh_enable_disable();
- }
- this.set_working();
- $c_page('home','my_company', this.innerHTML.toLowerCase()+'_profile',me.profile.name, callback);
- }, null, null, 1);
- }
- if(this.uid==user) $dh(this.status_button); else $di(this.status_button);
- }
-
- // render the details of the user from Profile
- this.render = function() {
- this.profile = locals['Profile'][uid];
- scroll(0, 0);
-
- // name
- if(cstr(this.profile.first_name) || cstr(this.profile.last_name)) {
- this.fullname = cstr(this.profile.first_name) + ' ' + cstr(this.profile.last_name);
- } else {
- this.fullname = this.profile.name;
- }
- this.name_area.innerHTML = this.fullname;
-
- // email
- this.email_area.innerHTML = this.profile.name;
-
- // online / offline
- this.online_status_area.innerHTML = (this.member_item.is_online() ? '(Online)' : '(Offline)')
- if(this.member_item.is_online()) {
- $y(this.online_status_area, {color:'green'});
- }
-
- // refresh enable / disabled
- this.refresh_enable_disable();
-
- // designation
- this.bio_area.innerHTML = this.profile.designation ? ('Designation: ' + cstr(this.profile.designation) + '
') : '';
- this.bio_area.innerHTML += this.profile.bio ? this.profile.bio : 'No bio';
-
- new MemberConversation(this.wrapper, this.profile.name, this.fullname);
- }
-
- // refresh enable / disable
- this.refresh_enable_disable = function() {
- this.profile = locals['Profile'][this.uid]
-
- if(!this.profile.enabled) {
- $fg(this.name_area,'#999');
- } else {
- $fg(this.name_area,'#000');
- }
-
- this.member_item.enabled = this.profile.enabled;
- this.member_item.refresh_name_link();
-
- this.status_span.innerHTML = this.profile.enabled ? 'Enabled' : 'Disabled';
-
- // set styles and buttons
- if(has_common(['Administrator','System Manager'],user_roles)) {
- this.set_enable_button();
- }
- }
-
- // Load user profile (if not loaded)
- this.load = function() {
- if(locals['Profile'] && locals['Profile'][uid]) {
- this.render();
- return;
- }
- var callback = function(r,rt) {
- $dh(me.member_item.working_img);
- $ds(me.wrapper);
- me.loading = 0;
- me.render();
- }
- $ds(this.member_item.working_img);
- $dh(this.wrapper);
- this.loading = 1;
- $c('webnotes.widgets.form.load.getdoc', {'name':this.uid, 'doctype':'Profile', 'user':user}, callback); // onload
- }
-
- // show / hide
- this.show = function() {
- if(!this.loading)$ds(this.wrapper);
-
- // select profile
- this.member_item.select();
- }
- this.hide = function() {
- $dh(this.wrapper);
-
- // select profile
- this.member_item.deselect();
- }
-
- this.make_message_list = function() {
-
- }
-
- this.make();
- this.load();
-}
-
-
-
-
-// Member conversation
-// Between the current user and the displayed profile
-// or if same, then the conversation with all other
-// profiles
-MemberConversation = function(parent, uid, fullname) {
- var me = this;
- this.wrapper = $a(parent, 'div', 'my-company-conversation');
- this.fullname = fullname;
- this.make = function() {
- if(user!=uid) {
- this.make_input();
- }
- this.make_list();
-
- // set all messages
- // as "read" (docstatus = 0)
- if(user==uid) {
- $c_page('home', 'my_company', 'set_read_all_messages', '', function(r,rt) { });
- }
- }
-
- this.make_input = function() {
- this.input_wrapper = $a(this.wrapper, 'div', 'my-company-input-wrapper');
- var tab = make_table(this.input_wrapper, 1, 2, '100%', ['64%','36%'], {padding: '3px'})
- this.input = $a($td(tab,0,0), 'textarea');
-
- // button
- var div = $a(this.input_wrapper, 'div');
- this.post = $btn(div, 'Post'.bold(), function() { me.post_message(); }, {margin:'0px 13px 0px 3px'})
- this.post.disabled = true;
-
- this.input.onkeyup = this.input.onchange = function() {
- if(this.value) {
- me.post.disabled = false;
- } else {
- me.post.disabled = true;
- }
- }
-
- // notification check
- this.notify_check = $a_input(div, 'checkbox', null);
- $a(div, 'span', '', {marginLeft:'3px'}, 'Notify ' + fullname + ' by email')
- }
-
- this.post_message = function() {
- if(me.input.value==$(me.input).attr('default_text')) {
- msgprint('Please write a message first!'); return;
- }
- this.post.set_working();
- $c_page('home', 'my_company', 'post_comment', {
- uid: uid,
- comment: $(me.input).val(),
- notify: me.notify_check.checked ? 1 : 0
- }, function(r,rt) {
- $(me.input).val("").blur();
- me.post.done_working();
- if(r.exc) { msgprint(r.exc); return; }
- me.notify_check.checked = false;
- me.refresh();
- })
- }
-
- this.make_list = function() {
- this.lst_area = $a(this.wrapper, 'div', 'my-company-conversation', {padding:'7px 13px'});
-
- if(user==uid) {
- this.my_messages_box = $a(this.lst_area, 'div', 'my-company-conversation-head', {marginBottom:'7px'}, 'Messages by everyone to me
To send a message, click on the user on the left')
- }
-
- this.lst = new wn.ui.Listing({
- parent: this.lst_area,
- as_dict: 1,
- no_result_message: (user==uid
- ? 'No messages by anyone yet'
- : 'No messages yet. To start a conversation post a new message'),
-
- get_query: function() {
- if(uid==user) {
- return repl("SELECT comment, owner, comment_docname, creation, docstatus " +
- "FROM `tabComment` "+
- "WHERE comment_doctype='My Company' " +
- "AND comment_docname='%(user)s' " +
- "ORDER BY creation DESC ", {user:user});
-
- } else {
- return repl("SELECT comment, owner, comment_docname, creation, docstatus " +
- "FROM `tabComment` "+
- "WHERE comment_doctype='My Company' " +
- "AND ((owner='%(user)s' AND comment_docname='%(uid)s') " +
- "OR (owner='%(uid)s' AND comment_docname='%(user)s')) " +
- "ORDER BY creation DESC ", {uid:uid, user:user});
-
- }
- },
- render_row: function(parent, data) {
- new MemberCoversationComment(parent, data, me);
- },
-
- })
- this.refresh();
- }
-
- this.refresh = function() {
- me.lst.run()
- }
-
- this.make();
-}
-
-MemberCoversationComment = function(cell, det, conv) {
- var me = this;
- this.det = det;
- this.wrapper = $a(cell, 'div', 'my-company-comment-wrapper');
- this.comment = $a(this.wrapper, 'div', 'my-company-comment');
-
- this.user = $a(this.comment, 'span', 'link_type', {fontWeight:'bold'}, pscript.get_fullname(det.owner));
- this.user.onclick = function() {
- wn.pages['My Company'].member_list.show_profile(me.det.owner);
- }
-
- var st = (!det.docstatus ? {fontWeight: 'bold'} : null);
- this.msg = $a(this.comment, 'span', 'social', st, ': ' + det.comment);
-
- if(det.full_name==user) {
- $y(this.wrapper, {backgroundColor: '#D9D9F3'});
- }
- this.timestamp = $a(this.wrapper, 'div', 'my-company-timestamp', '', comment_when(det.creation));
-}
-
-
-
-
-
-
-
diff --git a/erpnext/home/page/my_company/my_company.py b/erpnext/home/page/my_company/my_company.py
deleted file mode 100644
index 5e3ba9484ce..00000000000
--- a/erpnext/home/page/my_company/my_company.py
+++ /dev/null
@@ -1,218 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-import webnotes
-
-from webnotes.utils import cint, load_json, cstr
-from webnotes.model.doc import Document
-
-try: import json
-except: import simplejson as json
-
-@webnotes.whitelist()
-def get_account_settings_url(arg=''):
- import server_tools.gateway_utils
- return server_tools.gateway_utils.get_account_settings_url()
-
-@webnotes.whitelist()
-def get_max_users(arg=''):
- from server_tools.gateway_utils import get_max_users_gateway
- return {
- 'max_users': get_max_users_gateway(),
- 'enabled': cint(webnotes.conn.sql("select count(*) from tabProfile where ifnull(enabled,0)=1 and name not in ('Administrator', 'Guest')")[0][0])
- }
-
-@webnotes.whitelist()
-def enable_profile(arg=''):
- webnotes.conn.sql("update tabProfile set enabled=1 where name=%s", arg)
- return 1
-
-@webnotes.whitelist()
-def disable_profile(arg=''):
- if arg=='Administrator':
- return 'Cannot disable Administrator'
-
- webnotes.conn.sql("update tabProfile set enabled=0 where name=%s", arg)
- webnotes.login_manager.logout(user=arg)
- return 0
-
-@webnotes.whitelist()
-def delete_user(args):
- args = json.loads(args)
- webnotes.conn.sql("update tabProfile set enabled=0, docstatus=2 where name=%s", args['user'])
- # erpnext-saas
- import webnotes.defs
- from webnotes.utils import cint
- if hasattr(webnotes.defs, 'sync_with_gateway') and \
- cint(webnotes.defs.sync_with_gateway) or 0:
- from server_tools.gateway_utils import remove_user_gateway
- remove_user_gateway(args['user'])
-
- webnotes.login_manager.logout(user=args['user'])
-
-
-@webnotes.whitelist()
-def add_user(args):
- args = json.loads(args)
- # erpnext-saas
- import webnotes.defs
- from webnotes.utils import cint
- if hasattr(webnotes.defs, 'sync_with_gateway') and \
- cint(webnotes.defs.sync_with_gateway) or 0:
- from server_tools.gateway_utils import add_user_gateway
- add_user_gateway(args)
-
- add_profile(args)
-
-@webnotes.whitelist()
-def add_profile(args):
- from webnotes.utils import validate_email_add, now
- email = args['user']
-
- sql = webnotes.conn.sql
-
- if not email:
- email = webnotes.form_dict.get('user')
- if not validate_email_add(email):
- raise Exception
- return 'Invalid Email Id'
-
- if sql("select name from tabProfile where name = %s", email):
- # exists, enable it
- sql("update tabProfile set enabled = 1, docstatus=0 where name = %s", email)
- webnotes.msgprint('Profile exists, enabled it with new password')
- else:
- # does not exist, create it!
- pr = Document('Profile')
- pr.name = email
- pr.email = email
- pr.first_name = args.get('first_name')
- pr.last_name = args.get('last_name')
- pr.enabled = 1
- pr.user_type = 'System User'
- pr.save(1)
-
- if args.get('password'):
- sql("""
- UPDATE tabProfile
- SET password = PASSWORD(%s), modified = %s
- WHERE name = %s""", (args.get('password'), now, email))
-
- send_welcome_mail(email, args)
-
-@webnotes.whitelist()
-def send_welcome_mail(email, args):
- """send welcome mail to user with password and login url"""
- pr = Document('Profile', email)
- from webnotes.utils.email_lib import sendmail_md
- args.update({
- 'company': webnotes.conn.get_default('company'),
- 'password': args.get('password'),
- 'account_url': webnotes.conn.get_default('account_url')
- })
- if not args.get('last_name'): args['last_name'] = ''
- sendmail_md(pr.email, subject="Welcome to ERPNext", msg=welcome_txt % args, from_defs=1)
-
-#
-# post comment
-#
-@webnotes.whitelist()
-def post_comment(arg):
- arg = load_json(arg)
-
- from webnotes.model.doc import Document
- d = Document('Comment')
- d.comment_doctype = 'My Company'
- d.comment_docname = arg['uid'] # to
- d.owner = webnotes.user.name
- d.comment = arg['comment']
- d.save(1)
-
- if cint(arg.get('notify')):
- fn = webnotes.conn.sql('select first_name, last_name from tabProfile where name=%s', webnotes.user.name)[0]
- if fn[0] or f[1]:
- fn = cstr(fn[0]) + (fn[0] and ' ' or '') + cstr(fn[1])
- else:
- fn = webnotes.user.name
-
- message = '''A new comment has been posted on your page by %s:
-
- Comment: %s
-
- To answer, please login to your erpnext account!
-
- https://signin.erpnext.com
- ''' % (fn, arg['comment'])
-
- from webnotes.model.code import get_obj
- note = get_obj('Notification Control')
- email_msg = note.prepare_message({
- 'type': 'New Comment',
- 'message': message
- })
-
- sender = webnotes.user.name!='Administrator' and webnotes.user.name or 'support+admin_post@erpnext.com'
-
- from webnotes.utils.email_lib import sendmail
- sendmail([arg['uid']], sender, email_msg, fn + ' has posted a new comment')
-
-#
-# update read messages
-#
-@webnotes.whitelist()
-def set_read_all_messages(arg=''):
- webnotes.conn.sql("""UPDATE `tabComment`
- SET docstatus = 1
- WHERE comment_doctype = 'My Company'
- AND comment_docname = %s
- """, webnotes.user.name)
-
-@webnotes.whitelist()
-def update_security(args=''):
- import json
- args = json.loads(args)
- webnotes.conn.set_value('Profile', args['user'], 'restrict_ip', args.get('restrict_ip'))
- webnotes.conn.set_value('Profile', args['user'], 'login_after', args.get('login_after'))
- webnotes.conn.set_value('Profile', args['user'], 'login_before', args.get('login_before'))
-
- if 'new_password' in args:
- import webnotes.defs
- from webnotes.utils import cint
- if hasattr(webnotes.defs, 'sync_with_gateway') and \
- cint(webnotes.defs.sync_with_gateway) or 0:
- import server_tools.gateway_utils
- res = server_tools.gateway_utils.change_password('', args['new_password'], args['user'], args['sys_admin_pwd'])
- if 'Traceback' not in res['message']:
- webnotes.msgprint(res['message'])
- webnotes.conn.sql("update tabProfile set password=password(%s) where name=%s", (args['new_password'], args['user']))
- else: webnotes.msgprint('Settings Updated')
-
-welcome_txt = """
-## %(company)s
-
-Dear %(first_name)s %(last_name)s
-
-Welcome!
-
-A new account has been created for you, here are your details:
-
-login-id: %(user)s
-password: %(password)s
-
-To login to your new ERPNext account, please go to:
-
-%(account_url)s
-"""
diff --git a/erpnext/home/page/my_company/my_company.txt b/erpnext/home/page/my_company/my_company.txt
deleted file mode 100644
index 31833155816..00000000000
--- a/erpnext/home/page/my_company/my_company.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-# Page, My Company
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-12-14 10:23:19',
- 'docstatus': 0,
- 'modified': '2010-12-27 17:44:15',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Page
- {
- 'doctype': 'Page',
- 'module': 'Home',
- 'name': '__common__',
- 'page_name': 'My Company',
- 'show_in_menu': 1,
- 'standard': 'Yes'
- },
-
- # These values are common for all Page Role
- {
- 'doctype': 'Page Role',
- 'name': '__common__',
- 'parent': 'My Company',
- 'parentfield': 'roles',
- 'parenttype': 'Page'
- },
-
- # Page, My Company
- {
- 'doctype': 'Page',
- 'name': 'My Company'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 1,
- 'role': 'Administrator'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 2,
- 'role': 'All'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/__init__.py b/erpnext/home/search_criteria/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/bills_to_be_paid/__init__.py b/erpnext/home/search_criteria/bills_to_be_paid/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/bills_to_be_paid/bills_to_be_paid.txt b/erpnext/home/search_criteria/bills_to_be_paid/bills_to_be_paid.txt
deleted file mode 100644
index 6fb5f7f179c..00000000000
--- a/erpnext/home/search_criteria/bills_to_be_paid/bills_to_be_paid.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, bills-to_be_paid
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:09:32',
- 'docstatus': 0,
- 'modified': '2010-05-13 17:26:48',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': '`tabPurchase Invoice`.outstanding_amount!=0\n`tabPurchase Invoice`.docstatus=1',
- 'columns': 'Purchase Invoice\x01ID,Purchase Invoice\x01Voucher Date,Purchase Invoice\x01Due Date,Purchase Invoice\x01Credit To,Purchase Invoice\x01Bill Date,Purchase Invoice\x01Outstanding Amount',
- 'criteria_name': 'Bills-To be paid',
- 'doc_type': 'Purchase Invoice',
- 'doctype': 'Search Criteria',
- 'filters': "{'Purchase Invoice\x01Submitted':1,'Purchase Invoice\x01Is Opening':'','Purchase Invoice\x01Fiscal Year':''}",
- 'module': 'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': '`tabPurchase Invoice`.`name`',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, bills-to_be_paid
- {
- 'doctype': 'Search Criteria',
- 'name': 'bills-to_be_paid'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/bills_to_be_submitted/__init__.py b/erpnext/home/search_criteria/bills_to_be_submitted/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/bills_to_be_submitted/bills_to_be_submitted.txt b/erpnext/home/search_criteria/bills_to_be_submitted/bills_to_be_submitted.txt
deleted file mode 100644
index 1b4f922c443..00000000000
--- a/erpnext/home/search_criteria/bills_to_be_submitted/bills_to_be_submitted.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, bills-to_be_submitted
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:09:32',
- 'docstatus': 0,
- 'modified': '2010-05-03 12:24:43',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': 'Purchase Invoice\x01ID,Purchase Invoice\x01Voucher Date,Purchase Invoice\x01Due Date,Purchase Invoice\x01Credit To,Purchase Invoice\x01Bill No,Purchase Invoice\x01Bill Date,Purchase Invoice\x01Outstanding Amount',
- 'criteria_name': 'Bills-To be submitted',
- 'doc_type': 'Purchase Invoice',
- 'doctype': 'Search Criteria',
- 'filters': "{'Purchase Invoice\x01Saved':1,'Purchase Invoice\x01Is Opening':'','Purchase Invoice\x01Fiscal Year':''}",
- 'module': 'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': '`tabPurchase Invoice`.`name`',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, bills-to_be_submitted
- {
- 'doctype': 'Search Criteria',
- 'name': 'bills-to_be_submitted'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/delivery_note_to_be_billed/__init__.py b/erpnext/home/search_criteria/delivery_note_to_be_billed/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/delivery_note_to_be_billed/delivery_note_to_be_billed.txt b/erpnext/home/search_criteria/delivery_note_to_be_billed/delivery_note_to_be_billed.txt
deleted file mode 100644
index d96981ca4c5..00000000000
--- a/erpnext/home/search_criteria/delivery_note_to_be_billed/delivery_note_to_be_billed.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, delivery_note-to_be_billed
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:09:32',
- 'docstatus': 0,
- 'modified': '2010-05-13 17:24:34',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': 'ifnull(`tabDelivery Note`.per_billed, 0) < 100',
- 'columns': 'Delivery Note\x01ID,Delivery Note\x01Owner,Delivery Note\x01Customer Name,Delivery Note\x01% Billed,Delivery Note\x01Company',
- 'criteria_name': 'Delivery Note-To be billed',
- 'doc_type': 'Delivery Note',
- 'doctype': 'Search Criteria',
- 'filters': "{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'Submitted','Delivery Note\x01Fiscal Year':''}",
- 'module': 'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': '`tabDelivery Note`.`name`',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, delivery_note-to_be_billed
- {
- 'doctype': 'Search Criteria',
- 'name': 'delivery_note-to_be_billed'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/delivery_note_to_be_submitted/__init__.py b/erpnext/home/search_criteria/delivery_note_to_be_submitted/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/delivery_note_to_be_submitted/delivery_note_to_be_submitted.txt b/erpnext/home/search_criteria/delivery_note_to_be_submitted/delivery_note_to_be_submitted.txt
deleted file mode 100644
index 85fd7482950..00000000000
--- a/erpnext/home/search_criteria/delivery_note_to_be_submitted/delivery_note_to_be_submitted.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, delivery_note-to_be_submitted
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:09:32',
- 'docstatus': 0,
- 'modified': '2010-05-13 17:17:58',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': 'Delivery Note\x01ID,Delivery Note\x01Owner,Delivery Note\x01Customer Name,Delivery Note\x01Posting Date,Delivery Note\x01Company',
- 'criteria_name': 'Delivery Note-To be submitted',
- 'doc_type': 'Delivery Note',
- 'doctype': 'Search Criteria',
- 'filters': "{'Delivery Note\x01Saved':1,'Delivery Note\x01Status':'Draft','Delivery Note\x01Fiscal Year':''}",
- 'module': 'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': '`tabDelivery Note`.`name`',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, delivery_note-to_be_submitted
- {
- 'doctype': 'Search Criteria',
- 'name': 'delivery_note-to_be_submitted'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/invoices_overdue/__init__.py b/erpnext/home/search_criteria/invoices_overdue/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/invoices_to_be_submitted/__init__.py b/erpnext/home/search_criteria/invoices_to_be_submitted/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/invoices_to_be_submitted/invoices_to_be_submitted.txt b/erpnext/home/search_criteria/invoices_to_be_submitted/invoices_to_be_submitted.txt
deleted file mode 100644
index 7029d85b815..00000000000
--- a/erpnext/home/search_criteria/invoices_to_be_submitted/invoices_to_be_submitted.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, invoices-to_be_submitted
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:43',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': u'Sales Invoice\x01ID,Sales Invoice\x01Debit To,Sales Invoice\x01Voucher Date,Sales Invoice\x01Due Date',
- 'criteria_name': u'Invoices-To be submitted',
- 'doc_type': u'Sales Invoice',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Invoice\x01Saved':1,'Sales Invoice\x01Is Opening':'','Sales Invoice\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabSales Invoice`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, invoices-to_be_submitted
- {
- 'doctype': 'Search Criteria',
- 'name': u'invoices-to_be_submitted'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/invoices_to_receive_payment/__init__.py b/erpnext/home/search_criteria/invoices_to_receive_payment/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/invoices_to_receive_payment/invoices_to_receive_payment.txt b/erpnext/home/search_criteria/invoices_to_receive_payment/invoices_to_receive_payment.txt
deleted file mode 100644
index 245e1e87fc9..00000000000
--- a/erpnext/home/search_criteria/invoices_to_receive_payment/invoices_to_receive_payment.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, invoices-to_receive_payment
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:43',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u'`tabSales Invoice`.due_date>now() \n`tabSales Invoice`.outstanding_amount!=0\n`tabSales Invoice`.docstatus=1',
- 'columns': u'Sales Invoice\x01ID,Sales Invoice\x01Owner,Sales Invoice\x01Debit To,Sales Invoice\x01Voucher Date,Sales Invoice\x01Due Date,Sales Invoice\x01Outstanding Amount',
- 'criteria_name': u'Invoices-To receive payment',
- 'doc_type': u'Sales Invoice',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Invoice\x01Submitted':1,'Sales Invoice\x01Is Opening':'','Sales Invoice\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabSales Invoice`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, invoices-to_receive_payment
- {
- 'doctype': 'Search Criteria',
- 'name': u'invoices-to_receive_payment'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/__init__.py b/erpnext/home/search_criteria/lead_to_follow_up/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/opportunity_quotations_to_be_sent/__init__.py b/erpnext/home/search_criteria/opportunity_quotations_to_be_sent/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/opportunity_quotations_to_be_sent/opportunity_quotations_to_be_sent.txt b/erpnext/home/search_criteria/opportunity_quotations_to_be_sent/opportunity_quotations_to_be_sent.txt
deleted file mode 100644
index 891bafda7f0..00000000000
--- a/erpnext/home/search_criteria/opportunity_quotations_to_be_sent/opportunity_quotations_to_be_sent.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Search Criteria, opportunity-quotations_to_be_sent
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:44',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u'`tabQuotation`.enq_no!=`tabOpportunity`.name\n',
- 'add_tab': u'tabQuotation',
- 'columns': u'Opportunity\x01ID,Opportunity\x01Owner',
- 'criteria_name': u'Opportunity-Quotations to be sent',
- 'doc_type': u'Opportunity',
- 'doctype': 'Search Criteria',
- 'filters': u'{}',
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabOpportunity`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, opportunity-quotations_to_be_sent
- {
- 'doctype': 'Search Criteria',
- 'name': u'opportunity-quotations_to_be_sent'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/opportunity_to_follow_up/__init__.py b/erpnext/home/search_criteria/opportunity_to_follow_up/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/purchase_order_to_be_billed/__init__.py b/erpnext/home/search_criteria/purchase_order_to_be_billed/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/purchase_order_to_be_billed/purchase_order_to_be_billed.txt b/erpnext/home/search_criteria/purchase_order_to_be_billed/purchase_order_to_be_billed.txt
deleted file mode 100644
index a7b0a2eb69c..00000000000
--- a/erpnext/home/search_criteria/purchase_order_to_be_billed/purchase_order_to_be_billed.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, purchase_order-to_be_billed
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:32',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"ifnull(`tabPurchase Order`.per_billed,0)<100\n`tabPurchase Order`.status='Submitted'",
- 'columns': u'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01PO Date,Purchase Order\x01Company,Purchase Order\x01Grand Total',
- 'criteria_name': u'Purchase Order-To be billed',
- 'doc_type': u'Purchase Order',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'Submitted','Purchase Order\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabPurchase Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, purchase_order-to_be_billed
- {
- 'doctype': 'Search Criteria',
- 'name': u'purchase_order-to_be_billed'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/purchase_order_to_be_submitted/__init__.py b/erpnext/home/search_criteria/purchase_order_to_be_submitted/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/purchase_order_to_be_submitted/purchase_order_to_be_submitted.txt b/erpnext/home/search_criteria/purchase_order_to_be_submitted/purchase_order_to_be_submitted.txt
deleted file mode 100644
index 0b79093e185..00000000000
--- a/erpnext/home/search_criteria/purchase_order_to_be_submitted/purchase_order_to_be_submitted.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, purchase_order-to_be_submitted
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:32',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': u'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01PO Date,Purchase Order\x01Company,Purchase Order\x01Grand Total',
- 'criteria_name': u'Purchase Order-To be submitted',
- 'doc_type': u'Purchase Order',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Purchase Order\x01Saved':1,'Purchase Order\x01Submitted':0,'Purchase Order\x01Status':'Draft','Purchase Order\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabPurchase Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, purchase_order-to_be_submitted
- {
- 'doctype': 'Search Criteria',
- 'name': u'purchase_order-to_be_submitted'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/purchase_order_to_receive_items/__init__.py b/erpnext/home/search_criteria/purchase_order_to_receive_items/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/purchase_order_to_receive_items/purchase_order_to_receive_items.txt b/erpnext/home/search_criteria/purchase_order_to_receive_items/purchase_order_to_receive_items.txt
deleted file mode 100644
index 7ee6c0db25e..00000000000
--- a/erpnext/home/search_criteria/purchase_order_to_receive_items/purchase_order_to_receive_items.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, purchase_order-to_receive_items
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:32',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"ifnull(`tabPurchase Order`.per_received,0)<100\n`tabPurchase Order`.status='Submitted'",
- 'columns': u'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01PO Date,Purchase Order\x01Company,Purchase Order\x01% Received,Purchase Order\x01Grand Total',
- 'criteria_name': u'Purchase Order-To receive items',
- 'doc_type': u'Purchase Order',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'Submitted','Purchase Order\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabPurchase Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, purchase_order-to_receive_items
- {
- 'doctype': 'Search Criteria',
- 'name': u'purchase_order-to_receive_items'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/purchase_request_purchase_order_to_be_made/__init__.py b/erpnext/home/search_criteria/purchase_request_purchase_order_to_be_made/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/purchase_request_purchase_order_to_be_made/purchase_request_purchase_order_to_be_made.txt b/erpnext/home/search_criteria/purchase_request_purchase_order_to_be_made/purchase_request_purchase_order_to_be_made.txt
deleted file mode 100644
index e40868ba03d..00000000000
--- a/erpnext/home/search_criteria/purchase_request_purchase_order_to_be_made/purchase_request_purchase_order_to_be_made.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, purchase_request-purchase_order_to_be_made
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:32',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"`tabPurchase Request`.status='Submitted'\nifnull(`tabPurchase Request`.per_ordered,0)<100",
- 'columns': u'Purchase Request\x01ID,Purchase Request\x01Purchase Request Date,Purchase Request\x01Requested By,Purchase Request\x01Owner,Purchase Request\x01% Ordered',
- 'criteria_name': u'Purchase Request-Purchase Order to be made',
- 'doc_type': u'Purchase Request',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Purchase Request\x01Submitted':1,'Purchase Request\x01Status':'Submitted','Purchase Request\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabPurchase Request`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, purchase_request-purchase_order_to_be_made
- {
- 'doctype': 'Search Criteria',
- 'name': u'purchase_request-purchase_order_to_be_made'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/purchase_request_to_be_submitted/__init__.py b/erpnext/home/search_criteria/purchase_request_to_be_submitted/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/purchase_request_to_be_submitted/purchase_request_to_be_submitted.txt b/erpnext/home/search_criteria/purchase_request_to_be_submitted/purchase_request_to_be_submitted.txt
deleted file mode 100644
index 1fc78d1f340..00000000000
--- a/erpnext/home/search_criteria/purchase_request_to_be_submitted/purchase_request_to_be_submitted.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, purchase_request-to_be_submitted
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:32',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"`tabPurchase Request`.status='Draft'",
- 'columns': u'Purchase Request\x01ID,Purchase Request\x01Owner,Purchase Request\x01Purchase Request Date,Purchase Request\x01Remarks',
- 'criteria_name': u'Purchase Request-To be submitted',
- 'doc_type': u'Purchase Request',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Purchase Request\x01Saved':1,'Purchase Request\x01Status':'Draft','Purchase Request\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabPurchase Request`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, purchase_request-to_be_submitted
- {
- 'doctype': 'Search Criteria',
- 'name': u'purchase_request-to_be_submitted'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/sales_order_overdue/__init__.py b/erpnext/home/search_criteria/sales_order_overdue/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/sales_order_overdue/sales_order_overdue.txt b/erpnext/home/search_criteria/sales_order_overdue/sales_order_overdue.txt
deleted file mode 100644
index 9122cdfbfea..00000000000
--- a/erpnext/home/search_criteria/sales_order_overdue/sales_order_overdue.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, sales_order-overdue
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:32',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u'`tabSales Order`.delivery_date now()",
- 'columns': u'Sales Order\x01ID,Sales Order\x01Owner,Sales Order\x01Status,Sales Order\x01Customer,Sales Order\x01Sales Order Date,Sales Order\x01Expected Delivery Date,Sales Order\x01Quotation No',
- 'criteria_name': u'Sales Order-To be delivered',
- 'doc_type': u'Sales Order',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 100,
- 'sort_by': u'`tabSales Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, sales_order-to_be_delivered
- {
- 'doctype': 'Search Criteria',
- 'name': u'sales_order-to_be_delivered'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/sales_order_to_be_submitted/__init__.py b/erpnext/home/search_criteria/sales_order_to_be_submitted/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/sales_order_to_be_submitted/sales_order_to_be_submitted.txt b/erpnext/home/search_criteria/sales_order_to_be_submitted/sales_order_to_be_submitted.txt
deleted file mode 100644
index 80f25ae4455..00000000000
--- a/erpnext/home/search_criteria/sales_order_to_be_submitted/sales_order_to_be_submitted.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, sales_order-to_be_submitted
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:44',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"`tabSales Order`.status='Draft'",
- 'columns': u'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Sales Order Date,Sales Order\x01Quotation No',
- 'criteria_name': u'Sales Order-To be submitted',
- 'doc_type': u'Sales Order',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 100,
- 'sort_by': u'`tabSales Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, sales_order-to_be_submitted
- {
- 'doctype': 'Search Criteria',
- 'name': u'sales_order-to_be_submitted'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/__init__.py b/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/__init__.py b/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/task_open/__init__.py b/erpnext/home/search_criteria/task_open/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/task_open/task_open.txt b/erpnext/home/search_criteria/task_open/task_open.txt
deleted file mode 100644
index 01a76b65d26..00000000000
--- a/erpnext/home/search_criteria/task_open/task_open.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, task-open
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:44',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"`tabTask`.status='Open'",
- 'columns': u'Task\x01ID,Task\x01Subject,Task\x01Priority,Task\x01Raised By,Task\x01Allocated To',
- 'criteria_name': u'Task-Open',
- 'doc_type': u'Task',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Task\x01Priority':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabTask`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, task-open
- {
- 'doctype': 'Search Criteria',
- 'name': u'task-open'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/DocType Mapper/Appraisal Template-Appraisal/Appraisal Template-Appraisal.txt b/erpnext/hr/DocType Mapper/Appraisal Template-Appraisal/Appraisal Template-Appraisal.txt
index 11fd209742c..ec2bd0696db 100644
--- a/erpnext/hr/DocType Mapper/Appraisal Template-Appraisal/Appraisal Template-Appraisal.txt
+++ b/erpnext/hr/DocType Mapper/Appraisal Template-Appraisal/Appraisal Template-Appraisal.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-09-20 12:33:34',
+ 'creation': '2010-09-01 15:47:59',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:50',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/hr/Module Def/HR/HR.txt b/erpnext/hr/Module Def/HR/HR.txt
deleted file mode 100644
index 623bdc5233a..00000000000
--- a/erpnext/hr/Module Def/HR/HR.txt
+++ /dev/null
@@ -1,318 +0,0 @@
-# Module Def, HR
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2011-07-01 17:41:43',
- 'docstatus': 0,
- 'modified': '2011-08-25 13:54:43',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'HR',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'HR',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'is_hidden': 'No',
- 'module_desc': 'Human Resource Management - Employee Database, Salaries etc.',
- 'module_icon': 'HR.gif',
- 'module_label': 'HR',
- 'module_name': 'HR',
- 'module_seq': 9,
- 'name': '__common__'
- },
-
- # Module Def, HR
- {
- 'doctype': u'Module Def',
- 'name': 'HR'
- },
-
- # Module Def Item
- {
- 'description': 'Your Employee Database',
- 'display_name': 'Employee',
- 'doc_name': 'Employee',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee_name\nemployment_type\nstatus\nbranch\ndesignation\ndepartment\ngrade\nreports_to',
- 'idx': 1
- },
-
- # Module Def Item
- {
- 'description': 'Employees Daily Attendance Tracking Form',
- 'display_name': 'Attendance',
- 'doc_name': 'Attendance',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nemployee_name\nstatus\natt_date\nfiscal_year\ncompany',
- 'idx': 2
- },
-
- # Module Def Item
- {
- 'description': 'Upload Attendance data',
- 'display_name': 'Attendance Control Panel',
- 'doc_name': 'Attendance Control Panel',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item',
- 'idx': 3
- },
-
- # Module Def Item
- {
- 'description': 'Leave allocation for selected employees at a time',
- 'display_name': 'Leave Control Panel',
- 'doc_name': 'Leave Control Panel',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item',
- 'idx': 4
- },
-
- # Module Def Item
- {
- 'description': 'Allocate leave for fiscal year',
- 'display_name': 'Leave Allocation',
- 'doc_name': 'Leave Allocation',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nleave_type\nfiscal_year\ntotal_leaves_allocated\nposting_date',
- 'idx': 5
- },
-
- # Module Def Item
- {
- 'description': 'Apply Leave',
- 'display_name': 'Leave Application',
- 'doc_name': 'Leave Application',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nleave_type\nfiscal_year\nfrom_date\nto_date\ntotal_leave_days',
- 'idx': 6
- },
-
- # Module Def Item
- {
- 'description': 'Submit Employees Expenses',
- 'display_name': 'Expense Claim',
- 'doc_name': 'Expense Claim',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nemployee\nemployee_name\nposting_date\ntotal_claimed_amount\ntotal_sanctioned_amount\nexp_approver',
- 'idx': 7
- },
-
- # Module Def Item
- {
- 'description': 'Assign Responsibilities to employee and evaluate',
- 'display_name': 'Appraisal',
- 'doc_name': 'Appraisal',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nemployee\nemployee_name\nstart_date\nend_date\ntotal_score\nkra_approver',
- 'idx': 8
- },
-
- # Module Def Item
- {
- 'description': 'Generate Salary Structure heads for an employee',
- 'display_name': 'Salary Structure',
- 'doc_name': 'Salary Structure',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nis_active\nfiscal_year\nfrom_date\nctc\ntotal_earning\ntotal_deduction\ntotal',
- 'idx': 9
- },
-
- # Module Def Item
- {
- 'description': 'Generate Salary Slip for an employee',
- 'display_name': 'Salary Slip',
- 'doc_name': 'Salary Slip',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'month\nyear\nemployee\nemployee_name\npayment_days\narrear_amount\nencashment_amount\ngross_pay\ntotal_deduction\nnet_pay',
- 'idx': 10
- },
-
- # Module Def Item
- {
- 'description': 'Generate Salary Slip for multiple employee at a time based on selected criteria',
- 'display_name': 'Salary Manager',
- 'doc_name': 'Salary Manager',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item',
- 'idx': 11
- },
-
- # Module Def Item
- {
- 'description': 'Job Applications received for various positions',
- 'display_name': 'Job Application',
- 'doc_name': 'Job Application',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'applicant_name\nemail\nposition',
- 'idx': 12
- },
-
- # Module Def Item
- {
- 'display_name': 'Employee Information',
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 13
- },
-
- # Module Def Item
- {
- 'display_name': "Employee's Birthday",
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 14
- },
-
- # Module Def Item
- {
- 'display_name': 'New or left employees for a month',
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 15
- },
-
- # Module Def Item
- {
- 'display_name': 'Monthly Attendance Details',
- 'doc_name': 'Attendance',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 16
- },
-
- # Module Def Item
- {
- 'display_name': 'Leave Application Details',
- 'doc_name': 'Leave Application',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 17
- },
-
- # Module Def Item
- {
- 'display_name': 'Leave Allocation Details',
- 'doc_name': 'Leave Allocation',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 18
- },
-
- # Module Def Item
- {
- 'display_name': 'Employee Leave Balance Report',
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 19
- },
-
- # Module Def Item
- {
- 'display_name': 'Salary Structure Details',
- 'doc_name': 'Salary Structure',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 20
- },
-
- # Module Def Item
- {
- 'display_name': 'Salary Register',
- 'doc_name': 'Salary Slip',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 21
- },
-
- # Module Def Item
- {
- 'display_name': 'Salary Slips',
- 'doc_name': 'Salary Slip',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 22
- },
-
- # Module Def Item
- {
- 'display_name': 'Pending Appraisals',
- 'doc_name': 'Appraisal',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 23
- },
-
- # Module Def Item
- {
- 'display_name': 'Employee Appraisals',
- 'doc_name': 'Appraisal',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 24
- },
-
- # Module Def Item
- {
- 'display_name': 'Pending Expense Claims',
- 'doc_name': 'Expense Claim',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 25
- },
-
- # Module Def Item
- {
- 'display_name': 'Expense Claims',
- 'doc_name': 'Expense Claim',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 26
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'role': 'HR Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'idx': 2,
- 'role': 'HR User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/Role/Employee/Employee.txt b/erpnext/hr/Role/Employee/Employee.txt
deleted file mode 100644
index 4b73c1a0df9..00000000000
--- a/erpnext/hr/Role/Employee/Employee.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-[
- {
- 'creation': '2011-02-12 15:07:26',
- 'docstatus': 0,
- 'doctype': 'Role',
- 'idx': None,
- 'modified': '2011-02-14 14:05:55',
- 'modified_by': 'Administrator',
- 'module': 'Roles',
- 'name': 'Employee',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'role_name': 'Employee'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/Role/HR Manager/HR Manager.txt b/erpnext/hr/Role/HR Manager/HR Manager.txt
deleted file mode 100644
index d07db8652f7..00000000000
--- a/erpnext/hr/Role/HR Manager/HR Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, HR Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-01 10:19:09',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'HR',
- 'name': '__common__',
- 'role_name': 'HR Manager'
- },
-
- # Role, HR Manager
- {
- 'doctype': 'Role',
- 'name': 'HR Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/Role/HR User/HR User.txt b/erpnext/hr/Role/HR User/HR User.txt
deleted file mode 100644
index b0c5b76c43f..00000000000
--- a/erpnext/hr/Role/HR User/HR User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, HR User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-01 10:18:55',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'HR',
- 'name': '__common__',
- 'role_name': 'HR User'
- },
-
- # Role, HR User
- {
- 'doctype': 'Role',
- 'name': 'HR User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/__init__.py b/erpnext/hr/__init__.py
index e69de29bb2d..ab2d1976b11 100644
--- a/erpnext/hr/__init__.py
+++ b/erpnext/hr/__init__.py
@@ -0,0 +1,5 @@
+install_docs = [
+ {"doctype":"Role", "name":"Employee"},
+ {"doctype":"Role", "name":"HR Manager"},
+ {"doctype":"Role", "name":"HR User"},
+]
diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js
index 70b00a250b5..de9db7ffa22 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.js
+++ b/erpnext/hr/doctype/appraisal/appraisal.js
@@ -60,7 +60,7 @@ cur_frm.cscript.employee = function(doc,cdt,cdn){
}
}
-cur_frm.cscript['Calculate Total Score'] = function(doc,cdt,cdn){
+cur_frm.cscript.calculate_total_score = function(doc,cdt,cdn){
//get_server_fields('calculate_total','','',doc,cdt,cdn,1);
var val = getchildren('Appraisal Goal', doc.name, 'appraisal_details', doc.doctype);
var total =0;
@@ -71,7 +71,7 @@ cur_frm.cscript['Calculate Total Score'] = function(doc,cdt,cdn){
refresh_field('total_score')
}
-/*cur_frm.cscript['Declare Completed'] = function(doc,cdt,cdn){
+/*cur_frm.cscript.declare_completed = function(doc,cdt,cdn){
$c_obj(make_doclist(doc.doctype, doc.name),'declare_completed','', function(r,rt){
if(r.message){
refresh_field('Status');
@@ -80,7 +80,7 @@ cur_frm.cscript['Calculate Total Score'] = function(doc,cdt,cdn){
});
}*/
-cur_frm.cscript['Declare Completed'] = function(doc,cdt,cdn){
+cur_frm.cscript.declare_completed = function(doc,cdt,cdn){
var declare_completed_dialog;
set_declare_completed_dialog = function() {
diff --git a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
index 6c141cc92e5..4c17982d724 100644
--- a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
+++ b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
@@ -26,7 +26,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
}
//download attendance template - csv file
-cur_frm.cscript['Get Template'] = function(doc,cdt,cdn){
+cur_frm.cscript.get_template = function(doc,cdt,cdn){
if(doc.att_to_date && !doc.att_fr_date)
alert("Please enter 'Attendance To Date'");
@@ -37,7 +37,7 @@ cur_frm.cscript['Get Template'] = function(doc,cdt,cdn){
}
//---------------------------------------------------------
-cur_frm.cscript['Import'] = function(doc,cdt,cdn){
+cur_frm.cscript.import = function(doc,cdt,cdn){
if(!doc.file_list){
alert("Please upload attendance data CSV file");
}
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index f9ce8bdfdb3..de83647981c 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -90,7 +90,7 @@ cur_frm.cscript.calculate_total = function(doc,cdt,cdn){
}
}
-cur_frm.cscript['Calculate Total Amount'] = function(doc,cdt,cdn){
+cur_frm.cscript.calculate_total_amount = function(doc,cdt,cdn){
cur_frm.cscript.calculate_total(doc,cdt,cdn);
}
cur_frm.cscript.claim_amount = function(doc,cdt,cdn){
@@ -102,7 +102,7 @@ cur_frm.cscript.sanctioned_amount = function(doc,cdt,cdn){
wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
-cur_frm.cscript['Approve'] = function(doc,cdt,cdn){
+cur_frm.cscript.approve = function(doc,cdt,cdn){
if(user == doc.exp_approver){
var approve_voucher_dialog;
@@ -171,7 +171,7 @@ cur_frm.cscript['Approve'] = function(doc,cdt,cdn){
}
}
-cur_frm.cscript['Reject'] = function(doc,cdt,cdn){
+cur_frm.cscript.reject = function(doc,cdt,cdn){
if(user == doc.exp_approver){
var reject_voucher_dialog;
@@ -235,7 +235,7 @@ cur_frm.cscript['Reject'] = function(doc,cdt,cdn){
//update follow up
//=================================================================================
-cur_frm.cscript['Update Voucher'] = function(doc){
+cur_frm.cscript.update_voucher = function(doc){
$c_obj(make_doclist(doc.doctype, doc.name),'update_voucher','',function(r, rt){
refresh_field('expense_voucher_details');
diff --git a/erpnext/hr/doctype/it_checklist/it_checklist.js b/erpnext/hr/doctype/it_checklist/it_checklist.js
index a97ae65e5d9..62993035f72 100644
--- a/erpnext/hr/doctype/it_checklist/it_checklist.js
+++ b/erpnext/hr/doctype/it_checklist/it_checklist.js
@@ -57,7 +57,7 @@ cur_frm.cscript.rent_acc = function(doc,cdt,cdn){
//---------------------------------------------------------
//On done button click check for all values filled or not, and accordingly add records in child tables
-cur_frm.cscript['Done']=function(doc,cdt,cdn){
+cur_frm.cscript.done=function(doc,cdt,cdn){
var mydoc=doc;
if(doc.employee && doc.fiscal_year && doc.metro && doc.sr_citizen && doc.part_sr_citizen && doc.basic && doc.gross_income){
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.js b/erpnext/hr/doctype/salary_manager/salary_manager.js
index 91eac1a8767..d486110f1fc 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.js
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.js
@@ -23,7 +23,7 @@ var display_activity_log = function(msg) {
//Create salary slip
//-----------------------
-cur_frm.cscript['Create Salary Slip'] = function(doc, cdt, cdn) {
+cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) {
var callback = function(r, rt){
if (r.message)
display_activity_log(r.message);
@@ -35,7 +35,7 @@ cur_frm.cscript['Create Salary Slip'] = function(doc, cdt, cdn) {
//Submit salary slip
//-----------------------
-cur_frm.cscript['Submit Salary Slip'] = function(doc, cdt, cdn) {
+cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
var check = confirm("Do you really want to Submit all Salary Slip for month : " + doc.month+" and fiscal year : "+doc.fiscal_year);
if(check){
var callback = function(r, rt){
@@ -48,7 +48,7 @@ cur_frm.cscript['Submit Salary Slip'] = function(doc, cdt, cdn) {
// Make Bank Voucher
//-----------------------
-cur_frm.cscript['Make Bank Voucher'] = function(doc,cdt,cdn){
+cur_frm.cscript.make_bank_voucher = function(doc,cdt,cdn){
if(doc.month && doc.fiscal_year){
cur_frm.cscript.make_jv(doc, cdt, cdn);
}
diff --git a/erpnext/hr/search_criteria/employee_appraisals/employee_appraisals.txt b/erpnext/hr/search_criteria/employee_appraisals/employee_appraisals.txt
index 5bc5289ec70..c3387704eb8 100644
--- a/erpnext/hr/search_criteria/employee_appraisals/employee_appraisals.txt
+++ b/erpnext/hr/search_criteria/employee_appraisals/employee_appraisals.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/hr/search_criteria/employee_details/__init__.py b/erpnext/hr/search_criteria/employee_details/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/employee_details/employee_details.txt b/erpnext/hr/search_criteria/employee_details/employee_details.txt
deleted file mode 100644
index 08d785b5231..00000000000
--- a/erpnext/hr/search_criteria/employee_details/employee_details.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- 'add_col': None,
- 'add_cond': None,
- 'add_tab': None,
- 'columns': 'Employee\x01ID,Employee\x01Employee Name,Employee\x01Employee Code,Employee\x01Employee Number,Employee\x01Gender,Employee\x01Employment Type,Employee\x01Date of Joining,Employee\x01Scheduled Confirmation Date,Employee\x01Contract End Date,Employee\x01Status,Employee\x01Branch,Employee\x01Department,Employee\x01Designation,Employee\x01Grade,Employee\x01Company Email,Employee\x01Relieving Date',
- 'creation': '2010-12-14 10:33:09',
- 'criteria_name': 'Employee Details',
- 'custom_query': '',
- 'description': None,
- 'dis_filters': None,
- 'disabled': None,
- 'doc_type': 'Employee',
- 'docstatus': 0,
- 'doctype': 'Search Criteria',
- 'filters': "{'Employee\x01Gender':'','Employee\x01Month of Birth':'','Employee\x01Status':''}",
- 'graph_series': None,
- 'graph_values': None,
- 'group_by': None,
- 'idx': None,
- 'modified': '2010-04-01 14:27:15',
- 'modified_by': 'Administrator',
- 'module': 'Payroll',
- 'name': 'employee_details',
- 'owner': 'Administrator',
- 'page_len': 50,
- 'parent': None,
- 'parent_doc_type': None,
- 'parentfield': None,
- 'parenttype': None,
- 'report_script': '',
- 'server_script': None,
- 'sort_by': 'ID',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/employee_in_company_experience/__init__.py b/erpnext/hr/search_criteria/employee_in_company_experience/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt b/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt
deleted file mode 100644
index 62b9aa60bd3..00000000000
--- a/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- 'add_col': None,
- 'add_cond': None,
- 'add_tab': None,
- 'columns': 'Employee Profile\x01Employee,Employee Internal Work History\x01Branch,Employee Internal Work History\x01Department,Employee Internal Work History\x01Designation,Employee Internal Work History\x01Grade,Employee Internal Work History\x01From Date,Employee Internal Work History\x01To Date',
- 'creation': '2010-12-14 10:33:09',
- 'criteria_name': 'Employee In Company Experience',
- 'custom_query': '',
- 'description': None,
- 'dis_filters': None,
- 'disabled': 1,
- 'doc_type': 'Employee Internal Work History',
- 'docstatus': 0,
- 'doctype': 'Search Criteria',
- 'filters': '{}',
- 'graph_series': None,
- 'graph_values': None,
- 'group_by': None,
- 'idx': None,
- 'modified': '2010-04-01 14:27:15',
- 'modified_by': 'Administrator',
- 'module': 'Payroll',
- 'name': 'employee_in_company_experience',
- 'owner': 'Administrator',
- 'page_len': 50,
- 'parent': None,
- 'parent_doc_type': 'Employee Profile',
- 'parentfield': None,
- 'parenttype': None,
- 'report_script': '',
- 'server_script': '',
- 'sort_by': 'ID',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/employee_information/employee_information.txt b/erpnext/hr/search_criteria/employee_information/employee_information.txt
index 9934f771d9e..84cb448f67e 100644
--- a/erpnext/hr/search_criteria/employee_information/employee_information.txt
+++ b/erpnext/hr/search_criteria/employee_information/employee_information.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/hr/search_criteria/employees_birthday/employees_birthday.txt b/erpnext/hr/search_criteria/employees_birthday/employees_birthday.txt
index 965d05afda9..42cfff2bd29 100644
--- a/erpnext/hr/search_criteria/employees_birthday/employees_birthday.txt
+++ b/erpnext/hr/search_criteria/employees_birthday/employees_birthday.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/hr/search_criteria/employeewise_leave_transaction_details/__init__.py b/erpnext/hr/search_criteria/employeewise_leave_transaction_details/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/employeewise_leave_transaction_details/employeewise_leave_transaction_details.txt b/erpnext/hr/search_criteria/employeewise_leave_transaction_details/employeewise_leave_transaction_details.txt
deleted file mode 100644
index 5a0447956a5..00000000000
--- a/erpnext/hr/search_criteria/employeewise_leave_transaction_details/employeewise_leave_transaction_details.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, employeewise_leave_transaction_details
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:31',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': u'Leave Transaction\x01ID,Leave Transaction\x01Fiscal Year,Leave Transaction\x01Employee,Leave Transaction\x01Leave Type,Leave Transaction\x01Previous Balance,Leave Transaction\x01Leave Transaction Type,Leave Transaction\x01Allocation Type,Leave Transaction\x01Deduction Type,Leave Transaction\x01Half Day,Leave Transaction\x01From Date,Leave Transaction\x01To Date,Leave Transaction\x01Encashment Date,Leave Transaction\x01Total Leave Days,Leave Transaction\x01Status',
- 'criteria_name': u'Employeewise Leave Transaction Details',
- 'doc_type': u'Leave Transaction',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Leave Transaction\x01Saved':1,'Leave Transaction\x01Submitted':1}",
- 'module': u'HR',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabLeave Transaction`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, employeewise_leave_transaction_details
- {
- 'doctype': 'Search Criteria',
- 'name': u'employeewise_leave_transaction_details'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.txt b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.txt
index 9ad2e9943dc..64a0eb2a38e 100644
--- a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.txt
+++ b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
new file mode 100644
index 00000000000..998b9270c3c
--- /dev/null
+++ b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
@@ -0,0 +1,98 @@
+colwidths[col_idx['Employee Name']]="120px"
+colwidths[col_idx['Leave Without Pay']] = '120px'
+
+sum_net = total_earning = total_deduction = total_lwp = total_arr = 0
+total = ['Total Net Pay','','']
+
+
+earn_type_lst = sql("select name from `tabEarning Type`")
+
+ded_type_lst = sql("select name from `tabDeduction Type`")
+li=[]
+for lst in earn_type_lst:
+
+ li.append(lst[0])
+
+
+
+li.append('Total Earning')
+for lst in ded_type_lst:
+
+ li.append(lst[0])
+
+
+li.append('Total Deduction')
+li.append('Net Pay')
+
+
+
+for d in li:
+ colnames.append(d)
+ colwidths.append("150px")
+ coltypes.append("Currency")
+ coloptions.append("")
+ col_idx[d] = len(colnames)-1
+ for r in res:
+ r.append("0")
+
+for r in res:
+
+ total_lwp += r[col_idx['Leave Without Pay']]
+ total_arr += r[col_idx['Arrear Amount']]
+
+ for d1 in li:
+ d2 = '%s'%d1
+
+ earn_ret=convert_to_lists(sql("select e_type,e_amount from `tabSS Earning Detail` where parent = '%s'"%r[col_idx['ID']]))
+ ded_ret=convert_to_lists(sql("select d_type,d_amount from `tabSS Deduction Detail` where parent = '%s'"%r[col_idx['ID']]))
+
+
+ for e in earn_ret:
+ e0 = '%s'%e[0]
+ r[col_idx[e0]]=flt(e[1]) or 0.00
+
+
+ for d in ded_ret:
+ d0 = '%s'%d[0]
+ r[col_idx[d0]]=flt(d[1]) or 0.00
+
+
+ tot_earn_ded_net_ret = sql("select gross_pay, total_deduction,net_pay from `tabSalary Slip` where name = '%s'"%r[col_idx['ID']])
+ if d2 == 'Total Earning':
+ r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][0]) or 0
+ total_earning += flt(tot_earn_ded_net_ret[0][0]) or 0
+ elif d2 == 'Total Deduction':
+ r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][1]) or 0
+ total_deduction += flt(tot_earn_ded_net_ret[0][1]) or 0
+ elif d2 == 'Net Pay':
+ r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][2]) or 0
+ sum_net += flt(tot_earn_ded_net_ret[0][2]) or 0
+
+
+total.append(total_lwp)
+total.append(total_arr)
+
+for lst in earn_type_lst:
+
+ total_ear = 0
+ for r in res:
+
+ lst0 = '%s'%lst[0]
+ total_ear += r[col_idx[lst0]]
+
+ total.append(total_ear)
+
+total.append(total_earning)
+for lst in ded_type_lst:
+ total_ded = 0
+ for r in res:
+ lst0 = '%s'%lst[0]
+ total_ded += r[col_idx[lst0]]
+
+ total.append(total_ded)
+
+
+total.append(total_deduction)
+total.append(sum_net)
+
+res.append(total)
diff --git a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
index e829f647378..b24bfb1b930 100644
--- a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
+++ b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
@@ -5,7 +5,7 @@
{
'creation': '2012-03-30 14:50:44',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-05 17:23:13',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -16,11 +16,11 @@
'criteria_name': u'Monthly Salary Register',
'doc_type': u'Salary Slip',
'doctype': 'Search Criteria',
- 'filters': u"{'Salary Slip\x01Month':'','Salary Slip\x01Year':''}",
+ 'filters': u'{"Salary Slip\\u0001Submitted":1,"Salary Slip\\u0001Company":[""],"Salary Slip\\u0001Month":[""]}',
'module': u'HR',
'name': '__common__',
'page_len': 50,
- 'sort_by': u'ID',
+ 'sort_by': u'`tabSalary Slip`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
diff --git a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.txt b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.txt
index b8d0171da9e..eee5bfa8d47 100644
--- a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.txt
+++ b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/hr/search_criteria/pending_appraisals/__init__.py b/erpnext/hr/search_criteria/pending_appraisals/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
deleted file mode 100644
index 810fe16fc33..00000000000
--- a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- this.add_filter({fieldname:'approver', label:'Approver', fieldtype:'Link', options:'Profile', ignore : 1, parent:'Appraisal'});
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Approver'].df.in_first_page = 1;
-
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Employee'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Employee Name'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'From Start Date'].df.filter_hide = 0;
- //this.filter_fields_dict['Appraisal'+FILTER_SEP +'To Start Date'].df.filter_hide = 0;
- //this.filter_fields_dict['Appraisal'+FILTER_SEP +'From End Date'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'To End Date'].df.filter_hide = 0;
-}
-this.mytabs.items['Select Columns'].hide();
-
-report.get_query = function(){
- //get filter values
- emp = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Employee'].get_value();
- emp_nm = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Employee Name'].get_value();
- frm_start_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'From Start Date'].get_value();
- //to_start_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'To Start Date'].get_value();
- //frm_end_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'From End Date'].get_value();
- to_end_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'To End Date'].get_value();
- fiscal_year = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Fiscal Year'].get_value();
- approver = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Approver'].get_value();
-
- var cond = '';
- if(emp) cond += ' AND `tabAppraisal`.employee = "'+emp+'"';
- if(emp_nm) cond += ' AND `tabAppraisal`.employee_name = "'+emp_nm+'"';
- if(frm_start_date) cond += ' AND `tabAppraisal`.start_date >= "'+frm_start_date+'"';
- //if(to_start_date) cond += ' AND `tabAppraisal`.start_date <= "'+to_start_date+'"';
- //if(frm_end_date) cond += ' AND `tabAppraisal`.end_date >= "'+frm_end_date+'"';
- if(to_end_date) cond += ' AND `tabAppraisal`.end_date <= "'+to_end_date+'"';
- if(fiscal_year !='') cond += ' AND `tabAppraisal`.fiscal_year = "'+fiscal_year+'"';
- if(approver) cond += ' AND `tabAppraisal`.kra_approver = "'+approver+'"';
-
- //var q = 'SELECT DISTINCT `tabAppraisal`.name, `tabAppraisal`.status, `tabAppraisal`.employee, `tabAppraisal`.employee_name, `tabAppraisal`.start_date,`tabAppraisal`.end_date,`tabAppraisal`.kra_approver, `tabAppraisal`.total_score FROM `tabAppraisal` WHERE `tabAppraisal`.status= "Submitted" AND `tabAppraisal`.kra_approver = "'+ user+'"'+cond;
- var q = 'SELECT DISTINCT `tabAppraisal`.name, `tabAppraisal`.employee, `tabAppraisal`.employee_name, `tabAppraisal`.start_date,`tabAppraisal`.end_date,`tabAppraisal`.kra_approver, `tabAppraisal`.total_score FROM `tabAppraisal` WHERE `tabAppraisal`.status= "Submitted"'+cond;
- return q;
-}
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.txt b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.txt
deleted file mode 100644
index cf22c7a216a..00000000000
--- a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, pending_appraisals
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:44',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
- 'modified_by': u'Administrator',
- 'owner': u'ashwini@webnotestech.com'
- },
-
- # These values are common for all Search Criteria
- {
- 'criteria_name': u'Pending Appraisals',
- 'disabled': 0,
- 'doc_type': u'Appraisal',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Appraisal\x01Submitted':1,'Appraisal\x01Status':'Submitted','Appraisal\x01Fiscal Year':'','Appraisal\x01Approver':''}",
- 'module': u'HR',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabAppraisal`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, pending_appraisals
- {
- 'doctype': 'Search Criteria',
- 'name': u'pending_appraisals'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/pending_expense_claims/__init__.py b/erpnext/hr/search_criteria/pending_expense_claims/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/pending_expense_claims/pending_expense_claims.txt b/erpnext/hr/search_criteria/pending_expense_claims/pending_expense_claims.txt
deleted file mode 100644
index 0bff5ad1421..00000000000
--- a/erpnext/hr/search_criteria/pending_expense_claims/pending_expense_claims.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-# Search Criteria, pending_expense_claims
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:44',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
- 'modified_by': u'Administrator',
- 'owner': u'ashwini@webnotestech.com'
- },
-
- # These values are common for all Search Criteria
- {
- 'criteria_name': u'Pending Expense Claims',
- 'doc_type': u'Expense Claim',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Expense Claim\x01Approval Status':'','Expense Claim\x01Fiscal Year':''}",
- 'module': u'HR',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, pending_expense_claims
- {
- 'doctype': 'Search Criteria',
- 'name': u'pending_expense_claims'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/salary_register/salary_register.txt b/erpnext/hr/search_criteria/salary_register/salary_register.txt
index e7f33f03abc..700423b68f7 100644
--- a/erpnext/hr/search_criteria/salary_register/salary_register.txt
+++ b/erpnext/hr/search_criteria/salary_register/salary_register.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/hr/search_criteria/salary_slips/salary_slips.txt b/erpnext/hr/search_criteria/salary_slips/salary_slips.txt
index 960b226bdc9..9951896d585 100644
--- a/erpnext/hr/search_criteria/salary_slips/salary_slips.txt
+++ b/erpnext/hr/search_criteria/salary_slips/salary_slips.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/hr/search_criteria/salary_structure_details/salary_structure_details.txt b/erpnext/hr/search_criteria/salary_structure_details/salary_structure_details.txt
index 1b726568d42..a0e343899dd 100644
--- a/erpnext/hr/search_criteria/salary_structure_details/salary_structure_details.txt
+++ b/erpnext/hr/search_criteria/salary_structure_details/salary_structure_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/knowledge_base/Module Def/Knowledge Base/Knowledge Base.txt b/erpnext/knowledge_base/Module Def/Knowledge Base/Knowledge Base.txt
deleted file mode 100644
index 8aee002f2bd..00000000000
--- a/erpnext/knowledge_base/Module Def/Knowledge Base/Knowledge Base.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-[
- {
- 'creation': '2010-08-08 17:35:42',
- 'disabled': 'Yes',
- 'docstatus': 0,
- 'doctype': u'Module Def',
- 'doctype_list': None,
- 'file_list': None,
- 'idx': None,
- 'is_hidden': None,
- 'last_updated_date': None,
- 'modified': '2011-05-02 12:40:40',
- 'modified_by': 'Administrator',
- 'module_desc': 'Maintain your knowledge base of Questions & Answers
',
- 'module_icon': 'help.png',
- 'module_label': 'Knowledge Base',
- 'module_name': 'Knowledge Base',
- 'module_page': 'questions',
- 'module_seq': 13,
- 'name': 'Knowledge Base',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'trash_reason': None,
- 'widget_code': None
- },
- {
- 'creation': '2010-08-08 17:35:42',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'modified': '2010-08-08 17:35:42',
- 'modified_by': 'Administrator',
- 'name': 'MDR00106',
- 'owner': 'Administrator',
- 'parent': 'Knowledge Base',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'All'
- }
-]
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/questions/questions.py b/erpnext/knowledge_base/page/questions/questions.py
index 1b90fc701df..52b80fe2803 100644
--- a/erpnext/knowledge_base/page/questions/questions.py
+++ b/erpnext/knowledge_base/page/questions/questions.py
@@ -17,6 +17,7 @@
import webnotes
from webnotes.utils import load_json, cint, cstr
+import json
# add a new question
@webnotes.whitelist()
@@ -30,14 +31,14 @@ def add_question(arg):
d.save(1)
if args['suggest']:
- from home.page.my_company.my_company import post_comment
+ from utilities.page.messages import messages
for s in args['suggest']:
if s:
- post_comment({
- 'uid': s,
- 'comment': 'Please help me and answer the question "%s" in the Knowledge Base' % d.question,
+ messages.post(json.dumps({
+ 'contact': s,
+ 'txt': 'Please help me and answer the question "%s" in the Knowledge Base' % d.question,
'notify': 1
- })
+ }))
@webnotes.whitelist()
def vote(arg):
@@ -60,4 +61,4 @@ def delete(arg):
"""
args = load_json(arg)
from webnotes.model import delete_doc
- delete_doc(args['dt'], args['dn'])
\ No newline at end of file
+ delete_doc(args['dt'], args['dn'])
diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py
index 298459941d1..a258f73ec5b 100644
--- a/erpnext/patches/jan_mar_2012/rename_dt.py
+++ b/erpnext/patches/jan_mar_2012/rename_dt.py
@@ -8,14 +8,13 @@ from webnotes.utils import make_esc
import os
def execute1():
- rendt = get_dt_to_be_renamed()
- rename_dt_files(rendt)
+ #rendt = get_dt_to_be_renamed()
+ #rename_dt_files(rendt)
#update_local_file_system()
+ replace_labels_with_fieldnames()
def execute():
- # delete dt, mapper
- delete_dt_and_mapper()
-
+
#---------------------------------------------------
# doctype renaming
rendt = get_dt_to_be_renamed()
@@ -44,31 +43,25 @@ def execute():
#---------------------------------------------------
# Reload mapper from file
for d in ren_mapper:
- mod = '_'.join(webnotes.conn.sql("select module from `tabDocType Mapper` where name = %s", ren_mapper[d])[0][0].lower().split())
+ mod = '_'.join(webnotes.conn.sql("select module from `tabDocType Mapper` where name = %s",
+ ren_mapper[d])[0][0].lower().split())
reload_doc(mod, 'DocType Mapper', ren_mapper[d])
-
- webnotes.conn.sql("DELETE FROM `tabSearch Criteria` WHERE name=''")
- webnotes.conn.sql("""UPDATE `tabSearch Criteria` SET standard='No'
- WHERE name IN ('appraisal_custom', 'bills-to_be_paid',
- 'bills-to_be_submitted', 'cenvat_credit_-_input_or_capital_goods',
- 'custom_test', 'custom_test1', 'delivery_note-to_be_billed',
- 'delivery_note-to_be_submitted', 'delivery_notes',
- 'employee_leave_balance_report', 'flat_bom_report',
- 'general_ledger1', 'lead_interested',
- 'payables_-_as_on_outstanding', 'periodical_budget_report',
- 'projectwise_delivered_qty_and_costs_as_per_purchase_cost',
- 'projectwise_pending_qty_and_costs_as_per_purchase_cost', 'sales',
- 'sales_order1', 'sales_order_pending_items',
- 'territory_wise_sales_-_target_vs_actual_', 'test_report')""")
+
+ delete_search_criteria()
# reload custom search criteria
- for d in webnotes.conn.sql("""select name, module from
- `tabSearch Criteria` where ifnull(standard, 'No') = 'Yes' and ifnull(disabled, 0) = 0"""):
- try:
- reload_doc(d[1], 'search_criteria', d[0].replace('-', '_'))
- print d
- except Exception, e:
- print "did not reload: " + str(d)
+ #for d in webnotes.conn.sql("""select name, module from
+ # `tabSearch Criteria` where ifnull(standard, 'No') = 'Yes' and ifnull(disabled, 0) = 0"""):
+ #
+ for path, folders, files in os.walk(webnotes.defs.modules_path):
+ if not path.endswith('search_criteria'): continue
+ module = path.split(os.sep)[-2]
+ for sc in folders:
+ try:
+ reload_doc(module, 'search_criteria', sc)
+ print module, sc
+ except Exception, e:
+ print "did not reload: " + str(d)
webnotes.conn.sql("""DELETE FROM `tabPrint Format`
WHERE name IN ('Delivery Note Format', 'Purchase Order Format',
@@ -95,19 +88,54 @@ def execute():
# T0-do-list
# gl mapper name
+def delete_search_criteria():
+ webnotes.conn.sql("""DELETE FROM `tabSearch Criteria`
+ WHERE name IN ('', 'bills-to_be_paid',
+ 'bills-to_be_submitted', 'cenvat_credit_-_input_or_capital_goods',
+ 'appraisal_custom', 'custom_test', 'custom_test1', 'delivery_note-to_be_billed',
+ 'delivery_note-to_be_submitted', 'delivery_notes',
+ 'employee_leave_balance_report', 'flat_bom_report',
+ 'general_ledger1', 'lead_interested',
+ 'payables_-_as_on_outstanding', 'periodical_budget_report',
+ 'projectwise_delivered_qty_and_costs_as_per_purchase_cost',
+ 'projectwise_pending_qty_and_costs_as_per_purchase_cost', 'sales',
+ 'sales_order1', 'sales_order_pending_items',
+ 'territory_wise_sales_-_target_vs_actual_', 'test_report',
+ 'lease_agreement_list', 'lease_monthly_future_installment_inflows',
+ 'lease_over_due_list', 'lease_overdue_age_wise',
+ 'lease_receipt_summary_month_wise', 'lease_receipts_client_wise',
+ 'lease_yearly_future_installment_inflows',
+ 'monthly_ledger_summary_report', 'payables_-_as_on_outstanding',
+ 'payment_report', 'progressive_total_excise_duty',
+ 'service_tax_credit_account_-_inputs',
+ 'total_amout_collection_for_a_period_-_customerwise',
+ 'invoices-to_be_submitted', 'invoices-to_receive_payment',
+ 'opportunity-quotations_to_be_sent', 'purchase_order-to_be_billed',
+ 'purchase_order-to_be_submitted',
+ 'purchase_order-to_receive_items',
+ 'purchase_request-purchase_order_to_be_made',
+ 'purchase_request-to_be_submitted',
+ 'sales-order_to_be_submitted', 'sales_order-overdue',
+ 'sales_order-to_be_billed', 'sales_order-to_be_delivered',
+ 'sales_order-to_be_submitted', 'task-open', 'appraisal_custom',
+ 'employee_details', 'employee_in_company_experience',
+ 'employee_leave_balance_report', 'employeewise_leave_transaction_details',
+ 'pending_appraisals', 'pending_expense_claims', 'delivery_plan', 'flat_bom_report',
+ 'dispatch_report', 'projectwise_delivered_qty_and_costs_as_per_purchase_cost',
+ 'projectwise_pending_qty_and_costs_as_per_purchase_cost', 'custom_test', 'custom_test1',
+ 'delivery_notes', 'delivery_note_disabled', 'lead', 'lead_interested', 'lead_report',
+ 'periodic_sales_summary', 'monthly_despatched_trend', 'sales', 'sales_order',
+ 'sales_order1', 'sales_agentwise_commission', 'test_report',
+ 'territory_wise_sales_-_target_vs_actual_')""")
-
-def delete_dt_and_mapper():
- del_mapper = ['Production Forecast-Production Planning Tool', 'Production Forecast-Production Plan', 'Sales Order-Production Plan']
- for d in del_mapper:
- delete_doc('DocType Mapper', d)
-
- del_dt = ['Widget Control', 'Update Delivery Date Detail', 'Update Delivery Date', 'Tag Detail', 'Supplier rating', 'Stylesheet', 'Question Tag', 'PRO PP Detail', 'PRO Detail', 'PPW Detail', 'PF Detail', 'Personalize', 'Patch Util', 'Page Template', 'Module Def Role', 'Module Def Item', 'File Group', 'File Browser Control', 'File', 'Educational Qualifications', 'Earn Deduction Detail', 'DocType Property Setter', 'Contact Detail', 'BOM Report Detail', 'BOM Replace Utility Detail', 'BOM Replace Utility', 'Absent Days Detail', 'Activity Dashboard Control', 'Raw Materials Supplied', 'Setup Wizard Control', 'Company Group'] # docformat
-
- for d in del_dt:
- delete_doc('DocType', d)
-
-
+ webnotes.conn.sql("""
+ DELETE FROM `tabSearch Criteria`
+ WHERE name IN ('monthly_transaction_summary', 'trend_analyzer',
+ 'yearly_transaction_summary', 'invoices-overdue', 'lead-to_follow_up',
+ 'opportunity-to_follow_up', 'serial_no-amc_expiring_this_month',
+ 'serial_no-warranty_expiring_this_month')
+ AND IFNULL(standard, 'No') = 'Yes'
+ """)
def rename_in_db(ren_data, data_type, is_doctype):
for d in ren_data:
@@ -123,7 +151,7 @@ def rename_in_db(ren_data, data_type, is_doctype):
def update_dt_in_records(rendt):
for d in rendt:
# Feed, property setter, search criteria, gl mapper, form 16A, naming series options, doclayer - dodtype is not mentioed in options
- dt_list = webnotes.conn.sql("select t1.parent, t1.fieldname from tabDocField t1, tabDocType t2 where t1.parent = t2.name and t1.fieldname in ('dt', 'doctype', 'doc_type', 'dt_type') and ifnull(t1.options, '') = '' and ifnull(t2.issingle, 0) = 0")
+ dt_list = webnotes.conn.sql("select t1.parent, t1.fieldname from tabDocField t1, tabDocType t2 where t1.parent = t2.name and t1.fieldname in ('dt', 'doctype', 'doc_type', 'dt_type') and ifnull(t1.options, '') = '' and ifnull(t2.issingle, 0) = 0 and t1.parent in ('Custom Field', 'Custom Script')")
for dt in dt_list:
webnotes.conn.sql("update `tab%s` set %s = replace(%s, '%s', '%s') where %s = '%s'" % (dt[0], dt[1], dt[1], d, rendt[d], dt[1], d))
@@ -347,3 +375,47 @@ def rename_mapper_files(ren_mapper):
+ ' ' + esc(path + ren_mapper[d] + '/' + ren_mapper[d] + '.txt'))
print 'git mv ' + esc(path + ren_mapper[d] + '/'+ d + '.txt') + ' ' + esc(path + ren_mapper[d] + '/' + ren_mapper[d] + '.txt')
+
+def replace_labels_with_fieldnames():
+ """
+ This is used for replacing instances like cur_frm.cscript['LABEL'] with
+ cur_frm.cscript.FIELDNAME in js files
+ """
+ doctype = {}
+ doctype.update(prepare_dict_of_label_fieldname('/var/www/erpnext/erpnext/'))
+ doctype.update(prepare_dict_of_label_fieldname('/var/www/erpnext/lib/py'))
+ #print doctype
+
+ for doc in doctype:
+ label_fieldname = doctype[doc]
+ for d in label_fieldname:
+ #label = "cur_frm.cscript['%s']" % d
+ #fieldname = "cur_frm.cscript.%s" % label_fieldname[d]
+ label = d
+ fieldname = label_fieldname[d]
+ print colored('Changing... ' + doc + ': ' + label + ' --> '+ fieldname, 'yellow')
+ #res = replace_code('/var/www/erpnext/', label, fieldname, 'js')
+ res = replace_code('/var/www/erpnext/', label, fieldname, 'js',
+ 'hide_field\(.*%s' % label)
+ if res == 'skip':
+ break
+
+def prepare_dict_of_label_fieldname(module_path):
+ from webnotes.model.utils import peval_doclist
+ from webnotes.model.sync import get_file_path
+ doctype = {}
+ for path, folders, files in os.walk(module_path):
+ if path == module_path:
+ modules_list = folders
+ for f in files:
+ if f.endswith(".txt"):
+ rel_path = os.path.relpath(path, webnotes.defs.modules_path)
+ path_tuple = rel_path.split(os.sep)
+ if (len(path_tuple)==3 and path_tuple[0] in modules_list and
+ path_tuple[1] == 'doctype'):
+ file_name = f[:-4]
+ with open(get_file_path(path_tuple[0], file_name), 'r') as fn:
+ doclist = peval_doclist(fn.read())
+ doctype[file_name] = dict(([d.get('label'),d.get('fieldname')] \
+ for d in doclist if d.get('doctype')=='DocField'))
+ return doctype
diff --git a/erpnext/patches/jan_mar_2012/sync_ref_db.py b/erpnext/patches/jan_mar_2012/sync_ref_db.py
index efc831db9e5..2997d9ccb60 100644
--- a/erpnext/patches/jan_mar_2012/sync_ref_db.py
+++ b/erpnext/patches/jan_mar_2012/sync_ref_db.py
@@ -1,15 +1,49 @@
-def execute():
- import webnotes
- sql = webnotes.conn.sql
- from webnotes.model import delete_doc
+import webnotes
+sql = webnotes.conn.sql
+from webnotes.model import delete_doc
+def execute():
del_rec = {
- 'DocType' : ['Update Series', 'File', 'File Browser Control', 'File Group', 'Tag Detail', 'DocType Property Setter', 'Company Group'],
- 'Page' : ['File Browser']
+ 'DocType' : ['Update Series', 'File', 'File Browser Control', 'File Group',
+ 'Tag Detail', 'DocType Property Setter', 'Company Group', 'Widget Control',
+ 'Update Delivery Date Detail', 'Update Delivery Date',
+ 'Tag Detail', 'Supplier rating', 'Stylesheet', 'Question Tag',
+ 'PRO PP Detail', 'PRO Detail', 'PPW Detail', 'PF Detail',
+ 'Personalize', 'Patch Util', 'Page Template', 'Module Def Role',
+ 'Module Def Item', 'File Group', 'File Browser Control', 'File',
+ 'Educational Qualifications', 'Earn Deduction Detail',
+ 'DocType Property Setter', 'Contact Detail', 'BOM Report Detail',
+ 'BOM Replace Utility Detail', 'BOM Replace Utility',
+ 'Absent Days Detail', 'Activity Dashboard Control', 'Raw Materials Supplied',
+ 'Setup Wizard Control', 'Company Group', 'Lease Agreement', 'Lease Installment',
+ 'Terms and Conditions', 'Time Sheet', 'Time Sheet Detail', 'Naming Series Options'],
+ 'Page' : ['File Browser'],
+ 'DocType Mapper': ['Production Forecast-Production Planning Tool', 'Production Forecast-Production Plan', 'Sales Order-Production Plan']
}
for d in del_rec:
for r in del_rec[d]:
+ if d=='DocType':
+ sql("delete from tabFeed where doc_type=%s", r)
delete_doc(d, r)
sql("delete from tabDocField where label='Repair Purchase Request' and parent = 'Purchase Request'")
+
+ drop_tables()
+
+
+def drop_tables():
+ webnotes.conn.commit()
+ from webnotes.model.db_schema import remove_all_foreign_keys
+ remove_all_foreign_keys()
+ count = 0
+ tab_list = sql("SHOW TABLES")
+ for tab in tab_list:
+ if tab[0].startswith('_') or tab[0] in ('tabSingles', 'tabSessions', 'tabSeries'): continue
+ res = sql("SELECT COUNT(*) FROM `tabDocType` WHERE name = %s", tab[0][3:])
+ if not res[0][0]:
+ count += 1
+ print tab[0]
+ sql("DROP TABLE `%s`" % tab[0])
+ print count
+ webnotes.conn.begin()
diff --git a/erpnext/production/Module Def/Production/Production.txt b/erpnext/production/Module Def/Production/Production.txt
deleted file mode 100644
index 50e9adce95f..00000000000
--- a/erpnext/production/Module Def/Production/Production.txt
+++ /dev/null
@@ -1,519 +0,0 @@
-[
- {
- '_last_update': '1300959287',
- 'creation': '2010-11-30 22:42:49',
- 'disabled': 'No',
- 'docstatus': 0,
- 'doctype': u'Module Def',
- 'doctype_list': None,
- 'file_list': 'support.gif,FileData/00214',
- 'idx': None,
- 'is_hidden': 'No',
- 'last_updated_date': '2010-11-29 12:02:02',
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'module_desc': 'Production Documents
',
- 'module_icon': 'process.png',
- 'module_label': 'Production',
- 'module_name': 'Production',
- 'module_page': None,
- 'module_seq': 7,
- 'name': 'Production',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'trash_reason': None,
- 'widget_code': None
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Bill of material master containing raw materials, operation and costs',
- 'display_name': 'BOM',
- 'doc_name': 'BOM',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nitem\ndescription\noperating_cost\nmaintained_by',
- 'hide': None,
- 'icon': None,
- 'idx': 1,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00209',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Machinery in warehouse where operations are performed on raw materials',
- 'display_name': 'Workstation',
- 'doc_name': 'Workstation',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nworkstation_name\nwarehouse\ndescription',
- 'hide': None,
- 'icon': None,
- 'idx': 2,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00210',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Explode Bill of Materials in a tree and calculate the cost',
- 'display_name': 'Bill of Materials (Tree)',
- 'doc_name': 'Bill of Materials',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 3,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00211',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Update confirmed delivery dates in Sales Orders included in Production Plan',
- 'display_name': 'Update Delivery Dates',
- 'doc_name': 'Update Delivery Date',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 4,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00212',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Plan your production by including relevant Sales Orders in your plan',
- 'display_name': 'Production Planning Tool',
- 'doc_name': 'Production Planning Tool',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 5,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00213',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Change raw materials used in a Bill of Material through BOM replace utility',
- 'display_name': 'BOM Replace Utility',
- 'doc_name': 'BOM Replace Utility',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 6,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00214',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Raise your Production Orders Manually',
- 'display_name': 'Production Order',
- 'doc_name': 'Production Order',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 7,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00215',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': None,
- 'doc_name': 'Reports',
- 'doc_type': 'Separator',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 8,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003093',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Delivery Plan',
- 'doc_name': 'Sales Order Item',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 9,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003094',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Itemwise Production Report',
- 'doc_name': 'Stock Entry Detail',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 10,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003095',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Production Orders In Process',
- 'doc_name': 'Production Order',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 11,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003096',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Bill of material master containing raw materials, operation and costs',
- 'display_name': 'BOM',
- 'doc_name': 'BOM',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nitem\ndescription\noperating_cost\nmaintained_by',
- 'hide': None,
- 'icon': None,
- 'idx': 1,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00209',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Machinery in warehouse where operations are performed on raw materials',
- 'display_name': 'Workstation',
- 'doc_name': 'Workstation',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nworkstation_name\nwarehouse\ndescription',
- 'hide': None,
- 'icon': None,
- 'idx': 2,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00210',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Explode Bill of Materials in a tree and calculate the cost',
- 'display_name': 'Bill of Materials (Tree)',
- 'doc_name': 'Bill of Materials',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 3,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00211',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Update confirmed delivery dates in Sales Orders included in Production Plan',
- 'display_name': 'Update Delivery Dates',
- 'doc_name': 'Update Delivery Date',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 4,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00212',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Plan your production by including relevant Sales Orders in your plan',
- 'display_name': 'Production Planning Tool',
- 'doc_name': 'Production Planning Tool',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 5,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00213',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Change raw materials used in a Bill of Material through BOM replace utility',
- 'display_name': 'BOM Replace Utility',
- 'doc_name': 'BOM Replace Utility',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 6,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00214',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Raise your Production Orders Manually',
- 'display_name': 'Production Order',
- 'doc_name': 'Production Order',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 7,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00215',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': None,
- 'doc_name': 'Reports',
- 'doc_type': 'Separator',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 8,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003093',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Delivery Plan',
- 'doc_name': 'Sales Order Item',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 9,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003094',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Itemwise Production Report',
- 'doc_name': 'Stock Entry Detail',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 10,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003095',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Production Orders In Process',
- 'doc_name': 'Production Order',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 11,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003096',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'creation': '2010-11-30 22:42:49',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDR00040',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Production User'
- },
- {
- 'creation': '2010-11-30 22:42:49',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 2,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDR00041',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Production Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/production/Role/Production Manager/Production Manager.txt b/erpnext/production/Role/Production Manager/Production Manager.txt
deleted file mode 100644
index b87fc745223..00000000000
--- a/erpnext/production/Role/Production Manager/Production Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Production Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-09-23 16:35:35',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Production',
- 'name': '__common__',
- 'role_name': 'Production Manager'
- },
-
- # Role, Production Manager
- {
- 'doctype': 'Role',
- 'name': 'Production Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/production/Role/Production User/Production User.txt b/erpnext/production/Role/Production User/Production User.txt
deleted file mode 100644
index ed6d6d69a2b..00000000000
--- a/erpnext/production/Role/Production User/Production User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Production User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-09-23 16:36:08',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Production',
- 'name': '__common__',
- 'role_name': 'Production User'
- },
-
- # Role, Production User
- {
- 'doctype': 'Role',
- 'name': 'Production User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/production/__init__.py b/erpnext/production/__init__.py
index e69de29bb2d..4da0c58ae93 100644
--- a/erpnext/production/__init__.py
+++ b/erpnext/production/__init__.py
@@ -0,0 +1,4 @@
+install_docs = [
+ {"doctype":"Role", "name":"Production Manager"},
+ {"doctype":"Role", "name":"Production User"},
+]
diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
index 847f00a9096..11d6e44c10f 100644
--- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
+++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
@@ -29,7 +29,7 @@ cur_frm.cscript.sales_order = function(doc,cdt,cdn) {
}
-cur_frm.cscript['Download Raw Material'] = function(doc, cdt, cdn) {
+cur_frm.cscript.download_raw_material = function(doc, cdt, cdn) {
var callback = function(r, rt){
if (r.message)
$c_obj_csv(make_doclist(cdt, cdn), 'download_raw_materials', '', '');
diff --git a/erpnext/production/search_criteria/consumption_against_production/consumption_against_production.txt b/erpnext/production/search_criteria/consumption_against_production/consumption_against_production.txt
index d4db609a806..54d6a193221 100644
--- a/erpnext/production/search_criteria/consumption_against_production/consumption_against_production.txt
+++ b/erpnext/production/search_criteria/consumption_against_production/consumption_against_production.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:50',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:50',
'modified_by': u'Administrator',
'owner': u'jai@webnotestech.com'
},
diff --git a/erpnext/production/search_criteria/delivery_plan/__init__.py b/erpnext/production/search_criteria/delivery_plan/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
deleted file mode 100644
index 03f910550f2..00000000000
--- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
-
- //to hide all filters
- //this.hide_all_filters();
-
- // to disable a filter from query set
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Status'].df.ignore = 1;
-
- // to unhide required filters
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer Name'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'From Confirmed Delivery Date'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'To Confirmed Delivery Date'].df.filter_hide = 0;
-
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
\ No newline at end of file
diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt b/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt
deleted file mode 100644
index 6f3d30fa3fe..00000000000
--- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Search Criteria, delivery_plan
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:43',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_col': u"SUM(`tabSales Order Item`.`pending_qty` * `tabSales Order Item`.`basic_rate` ) AS 'Amount'",
- 'add_cond': u"`tabSales Order Item`.pending_qty > 0 and (`tabSales Order Item`.confirmation_date is not null or `tabSales Order Item`.confirmation_date!='' or `tabSales Order Item`.confirmation_date != '00-00-0000')",
- 'columns': u'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Customer Name',
- 'criteria_name': u'Delivery Plan',
- 'doc_type': u'Sales Order Item',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}",
- 'group_by': u'`tabSales Order Item`.`confirmation_date`, `tabSales Order`.`name`',
- 'module': u'Production',
- 'name': '__common__',
- 'page_len': 50,
- 'parent_doc_type': u'Sales Order',
- 'sort_by': u'`tabSales Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, delivery_plan
- {
- 'doctype': 'Search Criteria',
- 'name': u'delivery_plan'
- }
-]
\ No newline at end of file
diff --git a/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.txt b/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.txt
index c5c726e6f95..6f0c3eb7813 100644
--- a/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.txt
+++ b/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'jai@webnotestech.com'
},
diff --git a/erpnext/production/search_criteria/production_orders_in_process/production_orders_in_process.txt b/erpnext/production/search_criteria/production_orders_in_process/production_orders_in_process.txt
index e831d004309..51eb1f47e69 100644
--- a/erpnext/production/search_criteria/production_orders_in_process/production_orders_in_process.txt
+++ b/erpnext/production/search_criteria/production_orders_in_process/production_orders_in_process.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'jai@webnotestech.com'
},
diff --git a/erpnext/projects/Role/Projects User/Projects User.txt b/erpnext/projects/Role/Projects User/Projects User.txt
deleted file mode 100644
index 61a5a3b1177..00000000000
--- a/erpnext/projects/Role/Projects User/Projects User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Projects User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-05-08 09:40:07',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Projects',
- 'name': '__common__',
- 'role_name': 'Projects User'
- },
-
- # Role, Projects User
- {
- 'doctype': 'Role',
- 'name': 'Projects User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/projects/__init__.py b/erpnext/projects/__init__.py
index e69de29bb2d..636248f51f9 100644
--- a/erpnext/projects/__init__.py
+++ b/erpnext/projects/__init__.py
@@ -0,0 +1,3 @@
+install_docs = [
+ {"doctype":"Role", "name":"Projects User"},
+]
diff --git a/erpnext/projects/doctype/project_activity/project_activity.js b/erpnext/projects/doctype/project_activity/project_activity.js
index 02a6dbf8696..7da3976fe45 100644
--- a/erpnext/projects/doctype/project_activity/project_activity.js
+++ b/erpnext/projects/doctype/project_activity/project_activity.js
@@ -88,7 +88,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
unhide_field(fl); }
}
-cur_frm.cscript['Add'] = function(doc, dt, dn) {
+cur_frm.cscript.add = function(doc, dt, dn) {
var callback = function(r,rt) {
// refresh listing
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index 322b8a19c9b..c88382bf08f 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -44,7 +44,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
cur_frm.cscript.refresh = function(doc,cdt,cdn) {
cur_frm.clear_custom_buttons();
if(doc.status == 'Pending Review' && (doc.senders_name == user_fullname || doc.senders_email == user)) {
- cur_frm.add_custom_button('Declare Completed', cur_frm.cscript['Declare Completed']);
+ cur_frm.add_custom_button('Declare Completed', cur_frm.cscript.declare_completed);
cur_frm.add_custom_button('Reopen Task', cur_frm.cscript['Reopen Task']);
}
if(doc.status == 'Open' && !doc.__islocal) {
@@ -111,7 +111,7 @@ cur_frm.cscript['Cancel Task'] = function(){
});
}
-cur_frm.cscript['Declare Completed'] = function(){
+cur_frm.cscript.declare_completed = function(){
$c_obj(make_doclist(cur_frm.doc.doctype, cur_frm.doc.name),'declare_completed', '',function(r, rt) {
if(r.message == 'true'){
doc.status = 'Closed'; //for refresh
diff --git a/erpnext/projects/search_criteria/dispatch_report/__init__.py b/erpnext/projects/search_criteria/dispatch_report/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
deleted file mode 100644
index a31d6e4ea6a..00000000000
--- a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.mytabs.items['Select Columns'].hide()
- //this.mytabs.items['More Filters'].hide()
- //this.hide_all_filters();
-}
\ No newline at end of file
diff --git a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt
deleted file mode 100644
index 0d52fab76c0..00000000000
--- a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, dispatch_report
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 13:33:31',
- 'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
- 'modified_by': u'Administrator',
- 'owner': u'ashwini@webnotestech.com'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': u'Delivery Note\x01ID,Delivery Note\x01Project Name,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note\x01Posting Date,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Amount*',
- 'criteria_name': u'Dispatch Report',
- 'doc_type': u'Delivery Note Item',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Delivery Note\x01Saved':1,'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'Submitted','Delivery Note\x01Fiscal Year':''}",
- 'module': u'Projects',
- 'name': '__common__',
- 'page_len': 50,
- 'parent_doc_type': u'Delivery Note',
- 'sort_by': u'`tabDelivery Note`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, dispatch_report
- {
- 'doctype': 'Search Criteria',
- 'name': u'dispatch_report'
- }
-]
\ No newline at end of file
diff --git a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt
index d45bd1010f0..e4143ba9bb1 100644
--- a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt
+++ b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt
index 05807a36d95..e79520279c5 100644
--- a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt
+++ b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.txt b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.txt
index c09a9e97c9e..4a11bac76f8 100644
--- a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.txt
+++ b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.txt b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.txt
index c884739b24a..0ecb1be2853 100644
--- a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.txt
+++ b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/projects/search_criteria/projectwise_sales_orders/projectwise_sales_orders.txt b/erpnext/projects/search_criteria/projectwise_sales_orders/projectwise_sales_orders.txt
index c009cdd1e0b..c36a3261862 100644
--- a/erpnext/projects/search_criteria/projectwise_sales_orders/projectwise_sales_orders.txt
+++ b/erpnext/projects/search_criteria/projectwise_sales_orders/projectwise_sales_orders.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/projects/search_criteria/timesheet_report/timesheet_report.txt b/erpnext/projects/search_criteria/timesheet_report/timesheet_report.txt
index b7580eb7cc2..64586eba7db 100644
--- a/erpnext/projects/search_criteria/timesheet_report/timesheet_report.txt
+++ b/erpnext/projects/search_criteria/timesheet_report/timesheet_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/selling/DocType Mapper/Lead-Opportunity/Lead-Opportunity.txt b/erpnext/selling/DocType Mapper/Lead-Opportunity/Lead-Opportunity.txt
index dbedbf7bdbb..ff4a9254aaf 100644
--- a/erpnext/selling/DocType Mapper/Lead-Opportunity/Lead-Opportunity.txt
+++ b/erpnext/selling/DocType Mapper/Lead-Opportunity/Lead-Opportunity.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-09-20 12:33:34',
+ 'creation': '2010-08-08 17:09:34',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:50',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/DocType Mapper/Opportunity-Quotation/Opportunity-Quotation.txt b/erpnext/selling/DocType Mapper/Opportunity-Quotation/Opportunity-Quotation.txt
index 726b1a18af7..18543e874e2 100644
--- a/erpnext/selling/DocType Mapper/Opportunity-Quotation/Opportunity-Quotation.txt
+++ b/erpnext/selling/DocType Mapper/Opportunity-Quotation/Opportunity-Quotation.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-09-20 12:33:34',
+ 'creation': '2010-08-08 17:09:34',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:50',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/Role/Customer/Customer.txt b/erpnext/selling/Role/Customer/Customer.txt
deleted file mode 100644
index 3f7e9d21825..00000000000
--- a/erpnext/selling/Role/Customer/Customer.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Customer
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-06-26 14:42:33',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Customer'
- },
-
- # Role, Customer
- {
- 'doctype': 'Role',
- 'name': 'Customer'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Partner/Partner.txt b/erpnext/selling/Role/Partner/Partner.txt
deleted file mode 100644
index 339929cbbae..00000000000
--- a/erpnext/selling/Role/Partner/Partner.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Partner
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-07-13 11:29:39',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Partner'
- },
-
- # Role, Partner
- {
- 'doctype': 'Role',
- 'name': 'Partner'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Sales Manager/Sales Manager.txt b/erpnext/selling/Role/Sales Manager/Sales Manager.txt
deleted file mode 100644
index 5d975fc51f8..00000000000
--- a/erpnext/selling/Role/Sales Manager/Sales Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Sales Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:07:36',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Sales Manager'
- },
-
- # Role, Sales Manager
- {
- 'doctype': 'Role',
- 'name': 'Sales Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Sales Master Manager/Sales Master Manager.txt b/erpnext/selling/Role/Sales Master Manager/Sales Master Manager.txt
deleted file mode 100644
index 1140f99fc97..00000000000
--- a/erpnext/selling/Role/Sales Master Manager/Sales Master Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Sales Master Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 13:50:11',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Sales Master Manager'
- },
-
- # Role, Sales Master Manager
- {
- 'doctype': 'Role',
- 'name': 'Sales Master Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Sales User/Sales User.txt b/erpnext/selling/Role/Sales User/Sales User.txt
deleted file mode 100644
index 97229b853b1..00000000000
--- a/erpnext/selling/Role/Sales User/Sales User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Sales User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:07:44',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Sales User'
- },
-
- # Role, Sales User
- {
- 'doctype': 'Role',
- 'name': 'Sales User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/__init__.py b/erpnext/selling/__init__.py
index e69de29bb2d..c61f23cc043 100644
--- a/erpnext/selling/__init__.py
+++ b/erpnext/selling/__init__.py
@@ -0,0 +1,7 @@
+install_docs = [
+ {"doctype":"Role", "name":"Customer"},
+ {"doctype":"Role", "name":"Partner"},
+ {"doctype":"Role", "name":"Sales Manager"},
+ {"doctype":"Role", "name":"Sales Master Manager"},
+ {"doctype":"Role", "name":"Sales User"},
+]
diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js
index 36c2fa9e9ec..44f6ac8bf90 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.js
+++ b/erpnext/selling/doctype/installation_note/installation_note.js
@@ -42,7 +42,7 @@ cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
}
-cur_frm.cscript['Get Items'] = function(doc, dt, dn) {
+cur_frm.cscript.get_items = function(doc, dt, dn) {
var callback = function(r,rt) {
unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
cur_frm.refresh();
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index 73f5af87f29..bd2c88fcfba 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -41,7 +41,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(!doc.__islocal && !in_list(['Converted', 'Lead Lost'], doc.status)) {
cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']);
cur_frm.add_custom_button('Create Opportunity', cur_frm.cscript['Create Opportunity']);
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
}
}
@@ -122,7 +122,7 @@ cur_frm.cscript['Create Customer'] = function(){
// send email
// ===============================================================
-cur_frm.cscript['Send Email'] = function(doc,cdt,cdn){
+cur_frm.cscript.send_email = function(doc,cdt,cdn){
if(doc.__islocal != 1){
$c_obj(make_doclist(doc.doctype, doc.name),'send_mail','',function(r,rt){});
}else{
diff --git a/erpnext/selling/doctype/opportunity/opportunity.js b/erpnext/selling/doctype/opportunity/opportunity.js
index 545dcd25927..6e6fbd333af 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.js
+++ b/erpnext/selling/doctype/opportunity/opportunity.js
@@ -34,7 +34,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){
if(doc.docstatus == 1) {
cur_frm.add_custom_button('Create Quotation', cur_frm.cscript['Create Quotation']);
cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']);
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
}
//cur_frm.cscript.clear_values(doc,cdt,cdn);
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index c1942484f8e..563052f77b3 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -22,7 +22,7 @@ cur_frm.cscript.sales_team_fname = "sales_team";
// =====================================================================================
wn.require('erpnext/selling/doctype/sales_common/sales_common.js');
-wn.require('erpnext/setup/doctype/other_charges/other_charges.js');
+wn.require('erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
@@ -88,7 +88,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.docstatus == 1 && doc.status!='Order Lost') {
cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
}
if (!doc.docstatus) hide_field(['Update Communication Log']);
@@ -178,7 +178,7 @@ cur_frm.cscript['Make Sales Order'] = function() {
}
//pull enquiry details
-cur_frm.cscript['Pull Opportunity Detail'] = function(doc,cdt,cdn){
+cur_frm.cscript.pull_enquiry_detail = function(doc,cdt,cdn){
var callback = function(r,rt){
if(r.message){
@@ -292,7 +292,7 @@ cur_frm.cscript.quot_to_validate = function(doc,cdt,cdn){
//===================validation function =================================
cur_frm.cscript.validate = function(doc,cdt,cdn){
- cur_frm.cscript['Re-Calculate Values'](doc, cdt, cdn);
+ cur_frm.cscript.recalculate_values(doc, cdt, cdn);
cur_frm.cscript.quot_to_validate(doc,cdt,cdn);
}
diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js
index 4cd5d511ff5..2a6e5a3d121 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.js
+++ b/erpnext/selling/doctype/sales_common/sales_common.js
@@ -18,7 +18,7 @@
// ------
// cur_frm.cscript.tname - Details table name
// cur_frm.cscript.fname - Details fieldname
-// cur_frm.cscript.other_fname - wn.require('erpnext/setup/doctype/other_charges/other_charges.js'); fieldname
+// cur_frm.cscript.other_fname - wn.require('erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js'); fieldname
// cur_frm.cscript.sales_team_fname - Sales Team fieldname
// ============== Load Default Taxes ===================
@@ -363,8 +363,8 @@ cur_frm.fields_dict.charge.get_query = function(doc) {
}
// ********************* Get Charges ****************************
-cur_frm.cscript['Get Taxes and Charges'] = function(doc, cdt, cdn) {
- $c_obj(make_doclist(doc.doctype,doc.name),'get_other_charges','', function(r, rt) { cur_frm.cscript['Calculate Taxes and Charges'](doc, cdt, cdn);});
+cur_frm.cscript.get_charges = function(doc, cdt, cdn) {
+ $c_obj(make_doclist(doc.doctype,doc.name),'get_other_charges','', function(r, rt) { cur_frm.cscript.calculate_charges(doc, cdt, cdn);});
}
@@ -739,11 +739,11 @@ cur_frm.cscript.get_item_wise_tax_detail = function( doc, rate, cl, i, tax, t) {
// **************** RE-CALCULATE VALUES ***************************
-cur_frm.cscript['Re-Calculate Values'] = function(doc, cdt, cdn) {
- cur_frm.cscript['Calculate Taxes and Charges'](doc,cdt,cdn);
+cur_frm.cscript.recalculate_values = function(doc, cdt, cdn) {
+ cur_frm.cscript.calculate_charges(doc,cdt,cdn);
}
-cur_frm.cscript['Calculate Taxes and Charges'] = function(doc, cdt, cdn) {
+cur_frm.cscript.calculate_charges = function(doc, cdt, cdn) {
var other_fname = cur_frm.cscript.other_fname;
var cl = getchildren('Sales Taxes and Charges', doc.name, other_fname, doc.doctype);
@@ -828,7 +828,7 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
validated = false;
}
}
- cur_frm.cscript['Calculate Taxes and Charges'] (doc, cdt, cdn);
+ cur_frm.cscript.calculate_charges (doc, cdt, cdn);
if (cur_frm.cscript.calc_adjustment_amount) cur_frm.cscript.calc_adjustment_amount(doc);
}
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index d3d89d32535..24e69a2ee03 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -23,7 +23,7 @@ cur_frm.cscript.sales_team_fname = "sales_team";
wn.require('erpnext/selling/doctype/sales_common/sales_common.js');
-wn.require('erpnext/setup/doctype/other_charges/other_charges.js');
+wn.require('erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
@@ -64,14 +64,14 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.docstatus==1) {
if(doc.status != 'Stopped') {
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
// delivery note
if(doc.per_delivered < 100 && doc.order_type!='Maintenance')
cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
// maintenance
if(doc.per_delivered < 100 && doc.order_type=='Maintenance') {
- cur_frm.add_custom_button('Make Maint. Visit', cur_frm.cscript['Make Maintenance Visit']);
+ cur_frm.add_custom_button('Make Maint. Visit', cur_frm.cscript.make_maintenance_visit);
cur_frm.add_custom_button('Make Maint. Schedule', cur_frm.cscript['Make Maintenance Schedule']);
}
@@ -135,7 +135,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
}
-cur_frm.cscript['Pull Quotation Items'] = function(doc,dt,dn) {
+cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) {
var callback = function(r,rt){
var doc = locals[cur_frm.doctype][cur_frm.docname];
if(r.message){
@@ -233,7 +233,7 @@ cur_frm.cscript['Make Maintenance Schedule'] = function() {
}
//------------ make maintenance visit ------------
-cur_frm.cscript['Make Maintenance Visit'] = function() {
+cur_frm.cscript.make_maintenance_visit = function() {
var doc = cur_frm.doc;
if (doc.docstatus == 1) {
diff --git a/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt b/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
index ecba9f2c0b0..52d6d63f3c5 100644
--- a/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
+++ b/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt
index 21426179c62..b3d2359beee 100644
--- a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt
+++ b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt b/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt
index 72973ad46a7..762aa9ec304 100644
--- a/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt
+++ b/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'jai@webnotestech.com'
},
diff --git a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt
index d4ab9bf9766..56b547ff11b 100644
--- a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt
+++ b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.txt b/erpnext/selling/search_criteria/gross_profit/gross_profit.txt
index 7e6b71f243b..b98ced61981 100644
--- a/erpnext/selling/search_criteria/gross_profit/gross_profit.txt
+++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt
index 8c636096df0..894aeee1308 100644
--- a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt
+++ b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt
index 42ef2a7fc70..3566ea99a61 100644
--- a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt
+++ b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/__init__.py b/erpnext/selling/search_criteria/lead_to_follow_up/__init__.py
similarity index 100%
rename from erpnext/accounts/search_criteria/monthly_ledger_summary_report/__init__.py
rename to erpnext/selling/search_criteria/lead_to_follow_up/__init__.py
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js b/erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.js
similarity index 100%
rename from erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
rename to erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.js
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.txt b/erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
similarity index 90%
rename from erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
rename to erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
index a0a46bef6ac..3a5c98311d1 100644
--- a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
+++ b/erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -18,7 +18,7 @@
'doc_type': u'Lead',
'doctype': 'Search Criteria',
'filters': u"{'Lead\x01Status':'','Lead\x01Source':'','Lead\x01Expected Month':'','Lead\x01Industry':'','Lead\x01Market Segment':'','Lead\x01Rating':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabLead`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'lead-to_follow_up'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js b/erpnext/selling/search_criteria/lead_to_follow_up/sales_order_overdue.js
similarity index 100%
rename from erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
rename to erpnext/selling/search_criteria/lead_to_follow_up/sales_order_overdue.js
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/__init__.py b/erpnext/selling/search_criteria/monthly_despatched_trend/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
deleted file mode 100644
index ac04e287fea..00000000000
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-this.mytabs.items['Select Columns'].hide();
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
deleted file mode 100644
index f18ee153be1..00000000000
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-total = 0.0
-monthlist = ['','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
-for r in res:
- r[0] = monthlist[r[0]]
- total += r[1]
-
-colwidths[col_idx['Total Despatched']] = '200px'
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.txt b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.txt
deleted file mode 100644
index 5fb0a532dc7..00000000000
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Search Criteria, monthly_despatched_trend
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:43',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_col': u"month(`tabDelivery Note`.posting_date) AS 'Sales Month'\nsum(`tabDelivery Note`.net_total) AS 'Total Despatched'",
- 'add_cond': u'`tabDelivery Note`.net_total > 10',
- 'criteria_name': u'Monthly Despatched Trend',
- 'description': u'Monthly Despatched Trend',
- 'doc_type': u'Delivery Note',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01Chargeable':'Yes','Delivery Note\x01Department':'','Delivery Note\x01Type':'','Delivery Note\x01Company Name':'Janak Healthcare Pvt Ltd','Delivery Note\x01Fiscal Year':'2009-2010'}",
- 'graph_series': u'Despatched Month',
- 'graph_values': u'Total Despatched',
- 'group_by': u'month(`tabDelivery Note`.Posting_date)',
- 'module': u'Selling',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`Sales Month`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, monthly_despatched_trend
- {
- 'doctype': 'Search Criteria',
- 'name': u'monthly_despatched_trend'
- }
-]
\ No newline at end of file
diff --git a/erpnext/accounts/search_criteria/payment_report/__init__.py b/erpnext/selling/search_criteria/opportunity_to_follow_up/__init__.py
similarity index 100%
rename from erpnext/accounts/search_criteria/payment_report/__init__.py
rename to erpnext/selling/search_criteria/opportunity_to_follow_up/__init__.py
diff --git a/erpnext/home/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt b/erpnext/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
similarity index 97%
rename from erpnext/home/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
rename to erpnext/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
index ee57967db83..3ca813b5c1d 100644
--- a/erpnext/home/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
+++ b/erpnext/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
@@ -18,7 +18,7 @@
'doc_type': u'Opportunity',
'doctype': 'Search Criteria',
'filters': u"{'Opportunity\x01Fiscal Year':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabOpportunity`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'opportunity-to_follow_up'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/__init__.py b/erpnext/selling/search_criteria/periodic_sales_summary/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
deleted file mode 100644
index 2fa8a0fae0d..00000000000
--- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.add_filter({fieldname:'transaction_date', label:'Sales Order Date', fieldtype:'Date', parent:'Sales Order', in_first_page : 1,default:''});
-
- //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Territory'].df.filter_hide = 0;
- //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order Date'].df.filter_hide = 0;
- //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order Date'].df.in_first_page = 1;
-
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1;
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.in_first_page = 1;
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-
- //this.mytabs.items['Select Columns'].hide();
- //this.mytabs.items['More Filters'].hide();
-}
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt
deleted file mode 100644
index b4d370fde92..00000000000
--- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Search Criteria, periodic_sales_summary
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:09:31',
- 'docstatus': 0,
- 'modified': '2010-06-03 13:09:00',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': 'Sales Order Item\x01Item Code,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty',
- 'criteria_name': 'Periodic Sales Summary',
- 'dis_filters': 'fiscal_year',
- 'disabled': 1,
- 'doc_type': 'Sales Order Item',
- 'doctype': 'Search Criteria',
- 'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Company Name':'','Sales Order\x01Fiscal Year':''}",
- 'group_by': '`tabSales Order Item`.`item_code`',
- 'module': 'Selling',
- 'name': '__common__',
- 'page_len': 50,
- 'parent_doc_type': 'Sales Order',
- 'sort_by': '`tabSales Order Item`.`item_code`',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, periodic_sales_summary
- {
- 'doctype': 'Search Criteria',
- 'name': 'periodic_sales_summary'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/__init__.py b/erpnext/selling/search_criteria/sales_agentwise_commission/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
deleted file mode 100644
index 049c5979748..00000000000
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Partner'].df.in_first_page = 1;
-}
-
-
-this.mytabs.items['Select Columns'].hide();
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
deleted file mode 100644
index 4958674d141..00000000000
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-coltypes[col_idx['Average Commission Rate']] = 'Currency'
-colwidths[col_idx['Average Commission Rate']] = '200px'
-
-coltypes[col_idx['Net Total']] = 'Currency'
-colwidths[col_idx['Net Total']] = '150px'
-
-coltypes[col_idx['Total Commission']] = 'Currency'
-colwidths[col_idx['Total Commission']] = '150px'
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.txt b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.txt
deleted file mode 100644
index 047a175d213..00000000000
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Search Criteria, sales_agentwise_commission
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-26 11:52:28',
- 'docstatus': 0,
- 'modified': '2010-08-26 11:48:17',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_col': "SUM(`tabSales Order`.`total_commission`) AS 'Total Commission'\nSUM(`tabSales Order`.`net_total`) AS 'Net Total'\n((SUM(`tabSales Order`.`total_commission`) / SUM(`tabSales Order`.`net_total`)) * 100) AS 'Average Commission Rate'",
- 'add_cond': '`tabSales Order`.`net_total` > 0',
- 'columns': 'Sales Order\x01Business Associate',
- 'criteria_name': 'Sales Agentwise Commission',
- 'description': 'Sales Agentwise Commission',
- 'disabled': 1,
- 'doc_type': 'Sales Order',
- 'doctype': 'Search Criteria',
- 'filters': "{'Sales Order\x01Submitted':1}",
- 'group_by': '`tabSales Order`.`sales_partner`',
- 'module': 'Selling',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, sales_agentwise_commission
- {
- 'doctype': 'Search Criteria',
- 'name': 'sales_agentwise_commission'
- }
-]
\ No newline at end of file
diff --git a/erpnext/accounts/search_criteria/progressive_total_excise_duty/__init__.py b/erpnext/selling/search_criteria/sales_order_pending_items/__init__.py
similarity index 100%
rename from erpnext/accounts/search_criteria/progressive_total_excise_duty/__init__.py
rename to erpnext/selling/search_criteria/sales_order_pending_items/__init__.py
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js b/erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.js
similarity index 100%
rename from erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
rename to erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.js
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt b/erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.txt
similarity index 95%
rename from erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt
rename to erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.txt
index a13b00b3fb0..036d689ad68 100644
--- a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt
+++ b/erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.txt
@@ -5,7 +5,7 @@
'add_tab': None,
'columns': 'Sales Order\x01ID,Sales Order\x01Sales Order Date,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Description,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty',
'creation': '2011-05-09 11:04:19',
- 'criteria_name': 'Sales Order Pending Items1',
+ 'criteria_name': 'Sales Order Pending Items',
'custom_query': '',
'description': 'Sales Order Pending Items',
'dis_filters': None,
@@ -21,7 +21,7 @@
'modified': '2011-05-09 11:08:05',
'modified_by': 'Administrator',
'module': 'CRM',
- 'name': 'sales_order_pending_items1',
+ 'name': 'sales_order_pending_items',
'owner': 'Administrator',
'page_len': 50,
'parent': None,
@@ -34,4 +34,4 @@
'sort_order': 'DESC',
'standard': 'Yes'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/__init__.py b/erpnext/selling/search_criteria/sales_order_pending_items1/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/sales_orderwise_booking_ b/erpnext/selling/search_criteria/sales_orderwise_booking_
deleted file mode 100644
index 46a478cd762..00000000000
--- a/erpnext/selling/search_criteria/sales_orderwise_booking_
+++ /dev/null
@@ -1,4 +0,0 @@
-report.customize_filters = function() {
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
diff --git a/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt b/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt
index 669bb63725f..fa03e9fe263 100644
--- a/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt
+++ b/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt
index 936309a6d03..6b61745d46a 100644
--- a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt
+++ b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'dhanalekshmi@webnotestech.com'
},
diff --git a/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt b/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt
index ad37ce6d1e0..7a73d4af9f5 100644
--- a/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt
+++ b/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'dhanalekshmi@webnotestech.com'
},
diff --git a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.txt b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.txt
index a98260a93ba..f001b70d55b 100644
--- a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.txt
+++ b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.txt b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.txt
index 815adc4b01a..2ca30f7852f 100755
--- a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.txt
+++ b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/__init__.py b/erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/__init__.py
similarity index 100%
rename from erpnext/accounts/search_criteria/service_tax_credit_account___inputs/__init__.py
rename to erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/__init__.py
diff --git a/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt b/erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
similarity index 90%
rename from erpnext/home/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
rename to erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
index 14aaea0174e..1f303229e55 100644
--- a/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
+++ b/erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -18,7 +18,7 @@
'doc_type': u'Serial No',
'doctype': 'Search Criteria',
'filters': u"{'Serial No\x01Saved':1,'Serial No\x01Submitted':1,'Serial No\x01Status':'','Serial No\x01Warranty Status':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabSerial No`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'serial_no-amc_expiring_this_month'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/__init__.py b/erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
similarity index 100%
rename from erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/__init__.py
rename to erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
diff --git a/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt b/erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
similarity index 92%
rename from erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
rename to erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
index d0ba642b355..63c3e747dca 100644
--- a/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
+++ b/erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:52',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -18,7 +18,7 @@
'doc_type': u'Serial No',
'doctype': 'Search Criteria',
'filters': u"{'Serial No\x01Saved':1,'Serial No\x01Submitted':1,'Serial No\x01Status':'Issued','Serial No\x01Maintenance Status':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabSerial No`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'serial_no-warranty_expiring_this_month'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.txt b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.txt
index 84ea8eb8bd5..06ed049624f 100644
--- a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.txt
+++ b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.txt b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.txt
index f98b78062c1..69bb3100f78 100644
--- a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.txt
+++ b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/__init__.py b/erpnext/selling/search_criteria/territory_item_group_wise_gp/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
deleted file mode 100644
index 560596e8d25..00000000000
--- a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-# Add Columns
-# ------------
-based_on = filter_values.get('based_on')
-
-columns = [[based_on,'Data','150px',''],
- ['Total Qty','Currency','150px',''],
- ['Revenue','Currency','150px',''],
- ['Valuation Amount','Currency','150px',''],
- ['Gross Profit (%)','Currrency','150px',''],
- ['Gross Profit','Currency','150px','']]
-
-for c in columns:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
-
-
-
-def make_child_lst(based_on,name):
- rg = sql("select lft, rgt from `tab%s` where name = '%s'"%(based_on,name))
- ch_name = sql("select name from `tab%s` where lft between %d and %d"%(based_on,int(rg[0][0]),int(rg[0][1])))
- chl ='('
- flag = 1
- for c in ch_name:
- if flag == 1:
- chl += "'%s'"%c[0]
- flag = 2
- else:
- chl +=",'%s'"%c[0]
-
- chl +=")"
- return chl
-
-
-
-for r in res:
-
- qty, rate, amt, tot_val_rate, val_amount = 0, 0, 0, 0,0
- cn = make_child_lst(based_on,r[0].strip())
-
-
-
- if based_on == 'Item Group':
-
- dn = sql("select name from `tabItem` where item_group in %s"%(cn))
- for n in dn:
-
- dt = sql("select sum(qty),sum(amount) from `tabDelivery Note Item` where item_code ='%s' and docstatus = 1"%n[0])
-
- qty += dt[0][0] and dt[0][0] or 0
- amt += dt[0][1] and dt[0][1] or 0
- prt = sql("select distinct t1.name from `tabDelivery Note` t1, `tabDelivery Note Item` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t2.docstatus =1 order by t1.name"%n[0])
- for p in prt:
- d1 = sql("select qty from `tabDelivery Note Item` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1 and item_code = '%s'"%(p[0],n[0]))
- for t in d1:
- tot_val_rate = 0
- packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Item` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse, qty"%(p[0],n[0]))
-
- for d in packing_list_items:
- if d[1]:
- val_rate = sql("select valuation_rate from `tabStock Ledger Entry` where item_code = '%s' and warehouse = '%s' and voucher_type = 'Delivery Note' and voucher_no = '%s' and is_cancelled = 'No'"%(d[0], d[1], p[0]))
-
- val_rate = val_rate and val_rate[0][0] or 0
-
- tot_val_rate += t[0] and (flt(val_rate) * flt(d[2]) / flt(t[0])) or 0
- val_amount += flt(tot_val_rate) * flt(t[0])
- elif based_on == 'Territory':
-
-
- dn = sql("select name from `tabDelivery Note` where territory in %s and docstatus =1 order by name"%(cn))
-
- for n in dn:
-
- dt = sql("select sum(qty), sum(amount) from `tabDelivery Note Item` where parent = '%s' and docstatus = 1"%n[0])
- qty += dt[0][0] and dt[0][0] or 0
- amt += dt[0][1] and dt[0][1] or 0
-
- d1 = sql("select item_code,qty from `tabDelivery Note Item` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1"%n[0])
-
- for t in d1:
- tot_val_rate = 0
- packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Item` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse,qty"%(n[0],t[0]))
-
- for d in packing_list_items:
- if d[1]:
-
- val_rate = sql("select valuation_rate from `tabStock Ledger Entry` where item_code = '%s' and warehouse = '%s' and voucher_type = 'Delivery Note' and voucher_no = '%s' and is_cancelled = 'No'"%(d[0], d[1], n[0]))
- val_rate = val_rate and val_rate[0][0] or 0
-
- tot_val_rate += t[1] and (flt(val_rate) * flt(d[2]) / flt(t[1])) or 0
- val_amount += flt(tot_val_rate) * flt(t[1])
- r.append(fmt_money(qty))
-
- r.append(fmt_money(amt))
- gp = flt(r[col_idx['Revenue']]) - flt(val_amount)
-
- if val_amount: gp_percent = gp * 100 / flt(val_amount)
- else: gp_percent = gp
- gp_percent = '%0.2f'%gp_percent
-
-
-
- r.append(fmt_money(val_amount))
- r.append(fmt_money(gp_percent))
- r.append(fmt_money(gp))
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.txt b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.txt
deleted file mode 100644
index ff29d1d1c29..00000000000
--- a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- 'add_col': None,
- 'add_cond': None,
- 'add_tab': None,
- 'columns': None,
- 'creation': '2010-12-14 17:52:48',
- 'criteria_name': 'Territory, Item Group wise GP',
- 'custom_query': '',
- 'description': None,
- 'dis_filters': None,
- 'disabled': None,
- 'doc_type': 'Delivery Note',
- 'docstatus': 0,
- 'doctype': 'Search Criteria',
- 'filters': "{'Delivery Note\x01Status':'','Delivery Note\x01Fiscal Year':''}",
- 'graph_series': None,
- 'graph_values': None,
- 'group_by': None,
- 'idx': None,
- 'modified': '2011-05-09 14:40:26',
- 'modified_by': 'Administrator',
- 'module': 'CRM',
- 'name': 'territory_item_group_wise_gp',
- 'owner': 'harshada@webnotestech.com',
- 'page_len': 50,
- 'parent': None,
- 'parent_doc_type': None,
- 'parentfield': None,
- 'parenttype': None,
- 'report_script': '',
- 'server_script': None,
- 'sort_by': None,
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.txt b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.txt
index 22727956fe2..b8958948350 100644
--- a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.txt
+++ b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.txt b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.txt
index 8783e1f7010..510d81bd59e 100644
--- a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.txt
+++ b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.txt b/erpnext/selling/search_criteria/variance_report/variance_report.txt
index fc044c03816..f45df2ffb47 100644
--- a/erpnext/selling/search_criteria/variance_report/variance_report.txt
+++ b/erpnext/selling/search_criteria/variance_report/variance_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:45',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:45',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js
index 67de256a079..1380e779ab5 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.js
+++ b/erpnext/setup/doctype/email_digest/email_digest.js
@@ -60,7 +60,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}, 1);
}
-cur_frm.cscript['Add/Remove Recipients'] = function(doc, dt, dn) {
+cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
// Get profile list
$c_obj(make_doclist(dt, dn), 'get_profiles', '', function(r, rt) {
if(r.exc) {
diff --git a/erpnext/setup/doctype/permission_control/permission_control.py b/erpnext/setup/doctype/permission_control/permission_control.py
index fef322e0d7d..41f3a48ccf1 100644
--- a/erpnext/setup/doctype/permission_control/permission_control.py
+++ b/erpnext/setup/doctype/permission_control/permission_control.py
@@ -74,8 +74,9 @@ class DocType:
d.fields.get('role')]) if perm.doctype=='DocPerm']
fl = ['', 'owner'] + [d.fieldname for d in doclist \
- if d.doctype=='DocField' and d.fieldtype=='Link' \
- and cstr(d.options)!='']
+ if d.doctype=='DocField' and ((d.fieldtype=='Link' \
+ and cstr(d.options)!='') or (d.fieldtype=='Select' and
+ 'link:' in cstr(d.options).lower()))]
return {
'perms':ptype,
diff --git a/erpnext/setup/doctype/price_list/price_list.js b/erpnext/setup/doctype/price_list/price_list.js
index 173e42f2b79..67caaf1211c 100644
--- a/erpnext/setup/doctype/price_list/price_list.js
+++ b/erpnext/setup/doctype/price_list/price_list.js
@@ -30,7 +30,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
}
}
-cur_frm.cscript['Clear Prices'] = function(doc, cdt, cdn) {
+cur_frm.cscript.clear_prices = function(doc, cdt, cdn) {
if(confirm("This action will clear all rates for '"+ doc.name +"' from the Item Master and cannot be un-done. Are you sure you want to continue?")) {
$c_obj([doc], 'clear_prices', '', function(r, rt) { });
}
diff --git a/erpnext/setup/doctype/sales_taxes_and_charges_master/__init__.py b/erpnext/setup/doctype/sales_taxes_and_charges_master/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/setup_masters/Module Def/Setup Masters/Setup Masters.txt b/erpnext/setup_masters/Module Def/Setup Masters/Setup Masters.txt
deleted file mode 100644
index fe1a04840c3..00000000000
--- a/erpnext/setup_masters/Module Def/Setup Masters/Setup Masters.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Module Def, Setup Masters
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:35:42',
- 'docstatus': 0,
- 'modified': '2012-01-23 17:04:53',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'is_hidden': 'No',
- 'last_updated_date': '2010-11-29 12:02:02',
- 'module_label': 'Setup Masters',
- 'module_name': 'Setup Masters',
- 'name': '__common__'
- },
-
- # Module Def, Setup Masters
- {
- 'doctype': u'Module Def',
- 'name': 'Setup Masters'
- }
-]
\ No newline at end of file
diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css
index 5c050763384..f59c082141a 100644
--- a/erpnext/startup/startup.css
+++ b/erpnext/startup/startup.css
@@ -1,7 +1,7 @@
h1, h2, h3, h4, h5 {
font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
font-weight: normal;
- color: #66ad78;
+ margin-top: 0.2em;
}
body {
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index 27befaf7218..5d7e663d422 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -114,34 +114,38 @@ var update_messages = function(reset) {
if(inList(['Guest'], user) || !wn.session_alive) { return; }
if(!reset) {
- $c_page('home', 'event_updates', 'get_global_status_messages', null,
- function(r,rt) {
- if(!r.exc) {
- // This function is defined in toolbar.js
- wn.container.wntoolbar.set_new_comments(r.message.unread_messages);
-
- var show_in_circle = function(parent_id, msg) {
- var parent = $('#'+parent_id);
- if(parent) {
- if(msg) {
- parent.find('span:first').text(msg);
- parent.toggle(true);
- } else {
- parent.toggle(false);
- }
+ var set_messages = function(r) {
+ if(!r.exc) {
+ // This function is defined in toolbar.js
+ wn.container.wntoolbar.set_new_comments(r.message.unread_messages);
+
+ var show_in_circle = function(parent_id, msg) {
+ var parent = $('#'+parent_id);
+ if(parent) {
+ if(msg) {
+ parent.find('span:first').text(msg);
+ parent.toggle(true);
+ } else {
+ parent.toggle(false);
}
}
-
- show_in_circle('unread_messages', r.message.unread_messages.length);
- show_in_circle('open_support_tickets', r.message.open_support_tickets);
- show_in_circle('things_todo', r.message.things_todo);
- show_in_circle('todays_events', r.message.todays_events);
-
- } else {
- clearInterval(wn.updates.id);
}
+
+ show_in_circle('unread_messages', r.message.unread_messages.length);
+ show_in_circle('open_support_tickets', r.message.open_support_tickets);
+ show_in_circle('things_todo', r.message.things_todo);
+ show_in_circle('todays_events', r.message.todays_events);
+
+ } else {
+ clearInterval(wn.updates.id);
}
- );
+ }
+
+ wn.call({
+ method: 'startup.startup.get_global_status_messages',
+ callback: set_messages
+ });
+
} else {
wn.container.wntoolbar.set_new_comments(0);
$('#unread_messages').toggle(false);
diff --git a/erpnext/startup/startup.py b/erpnext/startup/startup.py
new file mode 100644
index 00000000000..8bc13f8678d
--- /dev/null
+++ b/erpnext/startup/startup.py
@@ -0,0 +1,54 @@
+import webnotes
+
+def get_unread_messages():
+ "returns unread (docstatus-0 messages for a user)"
+ return webnotes.conn.sql("""\
+ SELECT name, comment
+ FROM `tabComment`
+ WHERE comment_doctype IN ('My Company', 'Message')
+ AND comment_docname = %s
+ AND ifnull(docstatus,0)=0
+ """, webnotes.user.name, as_list=1)
+
+def get_open_support_tickets():
+ """
+ Returns a count of open support tickets
+ """
+ from webnotes.utils import cint
+ open_support_tickets = webnotes.conn.sql("""\
+ SELECT COUNT(*) FROM `tabSupport Ticket`
+ WHERE status = 'Open'""")
+ return open_support_tickets and cint(open_support_tickets[0][0]) or 0
+
+def get_things_todo():
+ """
+ Returns a count of incomplete todos
+ """
+ from webnotes.utils import cint
+ incomplete_todos = webnotes.conn.sql("""\
+ SELECT COUNT(*) FROM `tabToDo`
+ WHERE IFNULL(checked, 0) = 0
+ AND owner = %s""", webnotes.session.get('user'))
+ return incomplete_todos and cint(incomplete_todos[0][0]) or 0
+
+def get_todays_events():
+ """
+ Returns a count of todays events in calendar
+ """
+ from webnotes.utils import nowdate, cint
+ todays_events = webnotes.conn.sql("""\
+ SELECT COUNT(*) FROM `tabEvent`
+ WHERE owner = %s
+ AND event_type != 'Cancel'
+ AND event_date = %s""", (
+ webnotes.session.get('user'), nowdate()))
+ return todays_events and cint(todays_events[0][0]) or 0
+
+@webnotes.whitelist()
+def get_global_status_messages(arg=None):
+ return {
+ 'unread_messages': get_unread_messages(),
+ 'open_support_tickets': get_open_support_tickets(),
+ 'things_todo': get_things_todo(),
+ 'todays_events': get_todays_events(),
+ }
diff --git a/erpnext/stock/DocType Mapper/Sales Invoice-Delivery Note/Sales Invoice-Delivery Note.txt b/erpnext/stock/DocType Mapper/Sales Invoice-Delivery Note/Sales Invoice-Delivery Note.txt
index a09e0cfcd08..608a1d71000 100755
--- a/erpnext/stock/DocType Mapper/Sales Invoice-Delivery Note/Sales Invoice-Delivery Note.txt
+++ b/erpnext/stock/DocType Mapper/Sales Invoice-Delivery Note/Sales Invoice-Delivery Note.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-12-15 08:40:46',
+ 'creation': '2010-12-14 17:56:41',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:50',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/stock/Role/Material Manager/Material Manager.txt b/erpnext/stock/Role/Material Manager/Material Manager.txt
deleted file mode 100644
index 1d6369b53fe..00000000000
--- a/erpnext/stock/Role/Material Manager/Material Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Material Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-03-19 14:56:51',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Material Manager'
- },
-
- # Role, Material Manager
- {
- 'doctype': 'Role',
- 'name': 'Material Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/Role/Material Master Manager/Material Master Manager.txt b/erpnext/stock/Role/Material Master Manager/Material Master Manager.txt
deleted file mode 100644
index 10fac2c5ae3..00000000000
--- a/erpnext/stock/Role/Material Master Manager/Material Master Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Material Master Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 13:49:58',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Material Master Manager'
- },
-
- # Role, Material Master Manager
- {
- 'doctype': 'Role',
- 'name': 'Material Master Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/Role/Material User/Material User.txt b/erpnext/stock/Role/Material User/Material User.txt
deleted file mode 100644
index 1436ccb89cd..00000000000
--- a/erpnext/stock/Role/Material User/Material User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Material User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:08:13',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Material User'
- },
-
- # Role, Material User
- {
- 'doctype': 'Role',
- 'name': 'Material User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/Role/Quality Manager/Quality Manager.txt b/erpnext/stock/Role/Quality Manager/Quality Manager.txt
deleted file mode 100644
index 226e9aadc84..00000000000
--- a/erpnext/stock/Role/Quality Manager/Quality Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Quality Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-05-04 13:12:27',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Quality Manager'
- },
-
- # Role, Quality Manager
- {
- 'doctype': 'Role',
- 'name': 'Quality Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/__init__.py b/erpnext/stock/__init__.py
index e69de29bb2d..ee2b061cdcc 100644
--- a/erpnext/stock/__init__.py
+++ b/erpnext/stock/__init__.py
@@ -0,0 +1,6 @@
+install_docs = [
+ {"doctype":"Role", "name":"Material Manager"},
+ {"doctype":"Role", "name":"Material Master Manager"},
+ {"doctype":"Role", "name":"Material User"},
+ {"doctype":"Role", "name":"Quality Manager"},
+]
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 810c385f543..8e158979e62 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -21,7 +21,7 @@ cur_frm.cscript.other_fname = "other_charges";
cur_frm.cscript.sales_team_fname = "sales_team";
wn.require('erpnext/selling/doctype/sales_common/sales_common.js');
-wn.require('erpnext/setup/doctype/other_charges/other_charges.js');
+wn.require('erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
@@ -66,7 +66,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if (doc.docstatus!=1) {
hide_field(['SMS', 'Send SMS', 'message', 'customer_mobile_no', 'Repair Delivery Note']);
} else {
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
unhide_field(['SMS','Send SMS', 'message', 'customer_mobile_no', 'Repair Delivery Note']);
}
@@ -111,7 +111,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
}
-cur_frm.cscript['Get Items'] = function(doc,dt,dn) {
+cur_frm.cscript.get_items = function(doc,dt,dn) {
var callback = function(r,rt){
var doc = locals[cur_frm.doctype][cur_frm.docname];
if(r.message){
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index b15c0c528a6..97be19a4ec6 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -93,7 +93,7 @@ cur_frm.cscript.IGHelp = function(doc,dt,dn){
// takes the first attachment and creates
// a table with both image and attachment in HTML
// in the "alternate_description" field
-cur_frm.cscript['Add Image'] = function(doc, dt, dn) {
+cur_frm.cscript.add_image = function(doc, dt, dn) {
if(!doc.file_list) {
msgprint('Please attach a file first!');
}
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index eefd706ae4b..7e81b888389 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -18,7 +18,7 @@ cur_frm.cscript.tname = "Purchase Receipt Item";
cur_frm.cscript.fname = "purchase_receipt_details";
cur_frm.cscript.other_fname = "purchase_tax_details";
-wn.require('erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js');
+wn.require('erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js');
wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
@@ -69,7 +69,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(ch[i].qty > ch[i].billed_qty) allow_billing = 1;
}
cur_frm.add_custom_button('Make Purchase Invoice', cur_frm.cscript['Make Purchase Invoice']);
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
}
else{
hide_field(['Repair Purchase Receipt']);
@@ -109,7 +109,7 @@ cur_frm.fields_dict.contact_person.on_new = function(dn) {
// Get Purchase Order Button
// -----------------
-cur_frm.cscript['Pull Purchase Order Details'] = function(doc, dt, dn) {
+cur_frm.cscript.pull_purchase_order_details = function(doc, dt, dn) {
var callback = function(r,rt) {
unhide_field(['supplier_address','contact_person','supplier_name','address_display', 'contact_display', 'contact_mobile','contact_email']);
refresh_many(['supplier','supplier_address','contact_person', 'supplier_name', 'address_display', 'contact_display','contact_mobile', 'contact_email', 'purchase_receipt_details', 'purchase_tax_details']);
diff --git a/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js
index 131e0126100..771cb8272c4 100644
--- a/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js
+++ b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js
@@ -65,7 +65,7 @@ cur_frm.cscript.return_type = function(doc, cdt, cdn) {
// Create item table
//-------------------------------
-cur_frm.cscript['Get Items'] = function(doc, cdt, cdn) {
+cur_frm.cscript.get_items = function(doc, cdt, cdn) {
flag = 0
if(doc.return_type == 'Sales Return') {
if (doc.delivery_note_no && doc.sales_invoice_no) {
@@ -96,7 +96,7 @@ cur_frm.cscript.clear_fields = function(doc) {
// Make Stock Entry
//-------------------------------
-cur_frm.cscript['Make Stock Entry'] = function(doc, cdt, cdn) {
+cur_frm.cscript.make_stock_entry = function(doc, cdt, cdn) {
var cl = getchildren('Sales and Purchase Return Item', doc.name, 'return_details');
if (!cl.length)
msgprint("Item table can not be blank. Please click on 'Get Items'.");
@@ -170,7 +170,7 @@ cur_frm.cscript.map_child_fields = function(cl, se) {
// Make excise voucher
//-------------------------------
-cur_frm.cscript['Make Excise Invoice'] = function(doc) {
+cur_frm.cscript.make_excise_invoice = function(doc) {
var excise = LocalDB.create('Journal Voucher');
excise = locals['Journal Voucher'][excise];
excise.voucher_type = 'Excise Voucher';
@@ -178,7 +178,7 @@ cur_frm.cscript['Make Excise Invoice'] = function(doc) {
}
// Make debit note
//------------------------------
-cur_frm.cscript['Make Debit Note'] = function(doc) {
+cur_frm.cscript.make_debit_note = function(doc) {
var doclist = make_doclist(doc.doctype, doc.name);
$c('accounts.get_new_jv_details', {
doclist: JSON.stringify(doclist),
@@ -191,7 +191,7 @@ cur_frm.cscript['Make Debit Note'] = function(doc) {
}
// Make credit note
//------------------------------
-cur_frm.cscript['Make Credit Note'] = function(doc) {
+cur_frm.cscript.make_credit_note = function(doc) {
var doclist = make_doclist(doc.doctype, doc.name);
$c('accounts.get_new_jv_details', {
doclist: JSON.stringify(doclist),
diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.js b/erpnext/stock/doctype/sales_bom/sales_bom.js
index be159e72909..f7f6e4d3a49 100644
--- a/erpnext/stock/doctype/sales_bom/sales_bom.js
+++ b/erpnext/stock/doctype/sales_bom/sales_bom.js
@@ -41,6 +41,6 @@ cur_frm.cscript.currency = function(doc, cdt, cdn) {
$c_obj(make_doclist(cdt,cdn), 'get_rates', '', function(r,rt){refresh_field('sales_bom_items');});
}
-cur_frm.cscript['Find Sales BOM'] = function(doc, dt, dn) {
+cur_frm.cscript.find_sales_bom = function(doc, dt, dn) {
$c_obj(make_doclist(dt,dn), 'check_duplicate', 1, '');
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 613c23026f2..a297e0badbf 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -18,6 +18,6 @@ cur_frm.cscript.refresh = function(doc) {
if (doc.docstatus) hide_field('Steps');
}
-cur_frm.cscript['Download Template'] = function(doc, cdt, cdn) {
+cur_frm.cscript.download_template = function(doc, cdt, cdn) {
$c_obj_csv(make_doclist(cdt, cdn), 'get_template', '');
}
diff --git a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt
index 1fa4441dbac..d9e99738423 100644
--- a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt
+++ b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
diff --git a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.txt b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.txt
index 5a1ef1d011f..f2b030657bf 100644
--- a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.txt
+++ b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt
index c28f59292a0..d7ede00a9d3 100644
--- a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt
+++ b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/stock/search_criteria/stock_level/stock_level.txt b/erpnext/stock/search_criteria/stock_level/stock_level.txt
index 1783ba43b88..f19016e1e59 100644
--- a/erpnext/stock/search_criteria/stock_level/stock_level.txt
+++ b/erpnext/stock/search_criteria/stock_level/stock_level.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/stock/search_criteria/stock_report/stock_report.txt b/erpnext/stock/search_criteria/stock_report/stock_report.txt
index d6858fe40c3..8a922016566 100644
--- a/erpnext/stock/search_criteria/stock_report/stock_report.txt
+++ b/erpnext/stock/search_criteria/stock_report/stock_report.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:44',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/customer_issue/customer_issue.js
index 72d592e1377..cb909ac4ac3 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.js
+++ b/erpnext/support/doctype/customer_issue/customer_issue.js
@@ -63,7 +63,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
-cur_frm.cscript['Make Maintenance Visit'] = function(doc, cdt, cdn) {
+cur_frm.cscript.make_maintenance_visit = function(doc, cdt, cdn) {
if (doc.docstatus == 1) {
$c_obj(make_doclist(doc.doctype, doc.name),'check_maintenance_visit','',
function(r,rt){
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
index 0113d1fab8c..efa3eac0379 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -63,7 +63,7 @@ cur_frm.fields_dict['item_maintenance_detail'].grid.get_field('item_code').get_q
}
// Get Items based on SO Selected
-cur_frm.cscript['Get Items'] = function(doc, dt, dn) {
+cur_frm.cscript.get_items = function(doc, dt, dn) {
var callback = function(r,rt) {
unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
cur_frm.refresh();
@@ -114,7 +114,7 @@ cur_frm.cscript.periodicity = function(doc, cdt, cdn){
}
}
-cur_frm.cscript['Generate Schedule'] = function(doc, cdt, cdn) {
+cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) {
if (!doc.__islocal) {
$c('runserverobj', args={'method':'generate_schedule', 'docs':compress_doclist(make_doclist(cdt,cdn))},
function(r,rt){
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index d9d47c6d084..a2c0772c94c 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -60,7 +60,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
}
-cur_frm.cscript['Get Items'] = function(doc, dt, dn) {
+cur_frm.cscript.get_items = function(doc, dt, dn) {
var callback = function(r,rt) {
unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
cur_frm.refresh();
diff --git a/erpnext/support/search_criteria/amc_summary/amc_summary.txt b/erpnext/support/search_criteria/amc_summary/amc_summary.txt
index 9a0743b9907..e6500959825 100644
--- a/erpnext/support/search_criteria/amc_summary/amc_summary.txt
+++ b/erpnext/support/search_criteria/amc_summary/amc_summary.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:50',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:50',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/support/search_criteria/customer_issues/customer_issues.txt b/erpnext/support/search_criteria/customer_issues/customer_issues.txt
index 25d5cec92f4..c313235b1cd 100644
--- a/erpnext/support/search_criteria/customer_issues/customer_issues.txt
+++ b/erpnext/support/search_criteria/customer_issues/customer_issues.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:31',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt
index 8f748454979..2e6e11d0484 100644
--- a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt
+++ b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
diff --git a/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.txt b/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.txt
index d0030a7c0e7..a81b187b818 100644
--- a/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.txt
+++ b/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:43',
+ 'creation': '2012-04-03 12:49:51',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'nabin@webnotestech.com'
},
diff --git a/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.txt b/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.txt
index 442a7bdfe31..a80ee64b1b2 100644
--- a/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.txt
+++ b/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 14:50:45',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:45',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.txt b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.txt
index 52e69dfab0a..cdc76d24d46 100644
--- a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.txt
+++ b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-30 13:33:32',
+ 'creation': '2012-04-03 12:49:53',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:32',
+ 'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/utilities/doctype/reposting_tool/reposting_tool.js b/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
index 006ef9a2767..d44a2cd1740 100644
--- a/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
+++ b/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
@@ -18,7 +18,7 @@ var bin_list = [];
var msg = [];
var binidx = 0;
-cur_frm.cscript['Repost Bin'] = function(doc,cdt,cdn) {
+cur_frm.cscript.repost_bin = function(doc,cdt,cdn) {
args = {'check': 'Bin'};
$c_obj('Reposting Tool','get_count_for_reposting', docstring(args), function(r,rt) {
bin_list = r.message;
@@ -50,7 +50,7 @@ function repair_bin(){
//======================================================
var acc_list = [];
var accidx = 0;
-cur_frm.cscript['Repost Account Balances'] = function(doc,cdt,cdn) {
+cur_frm.cscript.repost_account_balances = function(doc,cdt,cdn) {
args = {'check': 'Account Balance'};
$c_obj('Reposting Tool','get_count_for_reposting', docstring(args), function(r,rt) {
acc_list = r.message;
diff --git a/erpnext/utilities/doctype/sms_control/sms_control.js b/erpnext/utilities/doctype/sms_control/sms_control.js
index e28e9b28914..cd3db12626e 100644
--- a/erpnext/utilities/doctype/sms_control/sms_control.js
+++ b/erpnext/utilities/doctype/sms_control/sms_control.js
@@ -77,7 +77,7 @@ function SMSManager() {
}
}
-cur_frm.cscript['Send SMS'] = function(doc,dt,dn) {
+cur_frm.cscript.send_sms = function(doc,dt,dn) {
var doc = cur_frm.doc;
var sms_man = new SMSManager();
var default_msg = {
diff --git a/erpnext/utilities/page/messages/messages.py b/erpnext/utilities/page/messages/messages.py
index 3a27bca2575..212a2686b09 100644
--- a/erpnext/utilities/page/messages/messages.py
+++ b/erpnext/utilities/page/messages/messages.py
@@ -68,9 +68,41 @@ def post(arg=None):
d.comment_docname = arg['contact']
d.comment_doctype = 'Message'
d.save()
+
+ import webnotes.utils
+ if webnotes.utils.cint(arg.get('notify')):
+ notify(arg)
@webnotes.whitelist()
def delete(arg=None):
webnotes.conn.sql("""delete from `tabComment` where name=%s""",
webnotes.form_dict['name']);
+
+def notify(arg=None):
+ from webnotes.utils import cstr
+ fn = webnotes.conn.sql('select first_name, last_name from tabProfile where name=%s', webnotes.user.name)[0]
+ if fn[0] or f[1]:
+ fn = cstr(fn[0]) + (fn[0] and ' ' or '') + cstr(fn[1])
+ else:
+ fn = webnotes.user.name
+
+ message = '''A new comment has been posted on your page by %s:
+ Comment: %s
+
+ To answer, please login to your erpnext account!
+
+ https://signin.erpnext.com
+ ''' % (fn, arg['txt'])
+
+ from webnotes.model.code import get_obj
+ note = get_obj('Notification Control')
+ email_msg = note.prepare_message({
+ 'type': 'New Comment',
+ 'message': message
+ })
+
+ sender = webnotes.user.name!='Administrator' and webnotes.user.name or 'support+admin_post@erpnext.com'
+
+ from webnotes.utils.email_lib import sendmail
+ sendmail([arg['contact']], sender, email_msg, fn + ' has posted a new comment')
diff --git a/erpnext/website/css/website.css b/erpnext/website/css/website.css
index 7f082865277..1fd0bb055c6 100644
--- a/erpnext/website/css/website.css
+++ b/erpnext/website/css/website.css
@@ -1,3 +1,7 @@
+div#body_div, header .container, .content, #opened-page-selector, footer {
+ width: 900px;
+}
+
.layout_wrapper {
padding: 27px;
}
@@ -102,4 +106,43 @@ footer a:hover {
.web-footer-menu ul li:last-child {
border-right: 0px solid #777 !important;
-}
\ No newline at end of file
+}
+
+/* slide view */
+
+.next-slide {
+ margin: 0px -27px 100px -27px;
+ background: #ffffff; /* Old browsers */
+ background: -moz-linear-gradient(top, #eeeeee 0%, #fff 100%); /* FF3.6+ */
+ background: -webkit-linear-gradient(top, #eeeeee 0%, #fff 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #eeeeee 0%, #fff 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #eeeeee 0%, #fff 100%); /* IE10+ */
+ background: linear-gradient(top, #eeeeee 0%, #fff 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#fff',GradientType=0 ); /* IE6-9 */
+ height: 36px;
+}
+
+.slide-shadow {
+ background: #eeeeee; /* Old browsers */
+ background: -moz-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* FF3.6+ */
+ background: -webkit-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* IE10+ */
+ background: linear-gradient(top, #bababa 0%,#eeeeee 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bababa', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
+ height: 3px;
+ margin: 100px -27px 0px -27px;
+ border-top: 1px solid #bababa;
+}
+
+.two-column {
+ width: 40%;
+ float: left;
+ padding: 5%;
+}
+
+.clear {
+ clear: both;
+}
+
+/* */
\ No newline at end of file
diff --git a/erpnext/website/doctype/web_page/template.html b/erpnext/website/doctype/web_page/template.html
index 69500699a71..e6f071d0a7a 100644
--- a/erpnext/website/doctype/web_page/template.html
+++ b/erpnext/website/doctype/web_page/template.html
@@ -1,16 +1,25 @@
-
- {% if doc.head_section %}
+
+ {% if doc.head_section and doc.layout=='Two column with header' %}
{{ doc.head_section_html }}
{% endif %}
+
+ {% if doc.layout.startswith('Two column') %}
+ {% endif %}
{{ doc.main_section_html }}
{% if doc.next_page_html %}
{{ doc.next_page_html }}
{% endif %}
+
+ {% if doc.layout.startswith('Two column') %}
+ {% endif %}
+
+ {% if doc.layout.startswith('Two column') %}
{{ doc.side_section_html }}
{% if doc.see_also %}
@@ -20,6 +29,7 @@
{% endif %}
+ {% endif %}
diff --git a/erpnext/website/doctype/web_page/web_page.js b/erpnext/website/doctype/web_page/web_page.js
new file mode 100644
index 00000000000..442907512a2
--- /dev/null
+++ b/erpnext/website/doctype/web_page/web_page.js
@@ -0,0 +1,15 @@
+$.extend(cur_frm.cscript, {
+ layout: function(doc) {
+ if(!doc.layout) doc.layout = 'Two column with header'
+ hide_field(['head_section', 'side_section']);
+ if(doc.layout=='Two column with header') {
+ unhide_field(['head_section', 'side_section']);
+ }
+ if(doc.layout=='Two column') {
+ unhide_field('side_section');
+ }
+ },
+ refresh: function(doc) {
+ cur_frm.cscript.layout(doc);
+ }
+})
\ No newline at end of file
diff --git a/erpnext/website/doctype/web_page/web_page.txt b/erpnext/website/doctype/web_page/web_page.txt
index 5adbccc6252..7c155d788c6 100644
--- a/erpnext/website/doctype/web_page/web_page.txt
+++ b/erpnext/website/doctype/web_page/web_page.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-27 14:36:48',
+ 'creation': '2012-04-02 16:02:43',
'docstatus': 0,
- 'modified': '2012-03-27 14:36:48',
+ 'modified': '2012-04-10 10:41:00',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -17,12 +17,12 @@
'colour': u'White:FFF',
'description': u'A custom page is a simple page with the layout - headline, main section, side section\n\nEditing:\n\n- Editing is in [markdown format](http://daringfireball.net/projects/markdown/syntax)\n- You can also add images and embed html code\n\nAccessing the page:\n\n- The page can be accessed as #![page-name] after the main url\n\nIdeal for pages like FAQ, Terms and Conditions, Help etc.\n\n',
'doctype': 'DocType',
- 'max_attachments': 5,
+ 'max_attachments': 20,
'module': u'Website',
'name': '__common__',
'section_style': u'Simple',
'show_in_menu': 0,
- 'version': 6
+ 'version': 11
},
# These values are common for all DocField
@@ -66,6 +66,14 @@
'permlevel': 1
},
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'sb0',
+ 'fieldtype': u'Section Break',
+ 'label': u'Title and Style'
+ },
+
# DocField
{
'colour': u'White:FFF',
@@ -77,6 +85,42 @@
'reqd': 1
},
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'layout',
+ 'fieldtype': u'Select',
+ 'label': u'Layout',
+ 'options': u'Two column with header\nTwo column\nSingle column'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'cb1',
+ 'fieldtype': u'Column Break',
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'text_align',
+ 'fieldtype': u'Select',
+ 'label': u'Text Align',
+ 'options': u'Left\nCenter\nRight'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Page content',
+ 'doctype': u'DocField',
+ 'fieldname': u'sb1',
+ 'fieldtype': u'Section Break',
+ 'label': u'Content'
+ },
+
# DocField
{
'colour': u'White:FFF',
@@ -107,6 +151,16 @@
'label': u'Side Section'
},
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Link to other pages in the side bar and next section',
+ 'doctype': u'DocField',
+ 'fieldname': u'sb2',
+ 'fieldtype': u'Section Break',
+ 'label': u'Links'
+ },
+
# DocField
{
'colour': u'White:FFF',
diff --git a/js/all-app.js b/js/all-app.js
index d64251915ac..d0c032ff79a 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -1604,7 +1604,7 @@ d.cur_frm=f;d.dn=dn;d.table_form=f.meta.istable;f.refresh(dn);d.dialog.show();})
/*
* lib/js/legacy/widgets/form/form_header.js
*/
-_f.FrmHeader=function(parent,frm){var me=this;this.wrapper=$a(parent,'div');if(frm.meta.in_dialog)$y(this.wrapper,{marginLeft:'8px',marginRight:'8px'});this.page_head=new PageHeader(this.wrapper);wn.views.breadcrumbs(this.page_head.breadcrumbs,frm.meta.module,frm.meta.name);this.dt_area=$a(this.page_head.main_head,'h1','',{marginRight:'8px',display:'inline'})
+_f.FrmHeader=function(parent,frm){var me=this;this.wrapper=$a(parent,'div');if(frm.meta.in_dialog)$y(this.wrapper,{marginLeft:'8px',marginRight:'8px'});this.page_head=new PageHeader(this.wrapper);wn.views.breadcrumbs(this.page_head.breadcrumbs,frm.meta.module,frm.meta.name);this.dt_area=$a(this.page_head.main_head,'span','',{marginRight:'8px',display:'inline'})
var div=$a(null,'div','',{marginBottom:'4px'});this.page_head.wrapper.insertBefore(div,this.page_head.sub_head);this.dn_area=$a(div,'span','',{fontSize:'14px',fontWeight:'normal',marginRight:'8px',padding:'2px'})
this.status_area=$a(div,'span','',{marginRight:'8px',marginBottom:'2px',cursor:'pointer',textShadow:'none'})}
_f.FrmHeader.prototype.show=function(){$ds(this.wrapper);}
@@ -2190,8 +2190,9 @@ else if(nm=='Accounts Browser')
pscript.make_chart(chart_type);}
loadpage(nm,call_back);}
var update_messages=function(reset){if(inList(['Guest'],user)||!wn.session_alive){return;}
-if(!reset){$c_page('home','event_updates','get_global_status_messages',null,function(r,rt){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
-show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
+if(!reset){var set_messages=function(r){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
+show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}}
+wn.call({method:'startup.startup.get_global_status_messages',callback:set_messages});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
wn.updates.id=setInterval(update_messages,60000);}
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
diff --git a/js/all-web.js b/js/all-web.js
index f64ee82e958..bedf0efb33e 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -889,8 +889,9 @@ else if(nm=='Accounts Browser')
pscript.make_chart(chart_type);}
loadpage(nm,call_back);}
var update_messages=function(reset){if(inList(['Guest'],user)||!wn.session_alive){return;}
-if(!reset){$c_page('home','event_updates','get_global_status_messages',null,function(r,rt){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
-show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
+if(!reset){var set_messages=function(r){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
+show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}}
+wn.call({method:'startup.startup.get_global_status_messages',callback:set_messages});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
wn.updates.id=setInterval(update_messages,60000);}
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
diff --git a/version.num b/version.num
index f733f7b3b6a..e4a36c3722d 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-1511
\ No newline at end of file
+1539
\ No newline at end of file
diff --git a/wnf.py b/wnf.py
index 4cd1c8b581d..94450d8e745 100755
--- a/wnf.py
+++ b/wnf.py
@@ -18,9 +18,12 @@
import os, sys
-def replace_code(start, txt1, txt2, extn):
+def replace_code(start, txt1, txt2, extn, search=None):
"""replace all txt1 by txt2 in files with extension (extn)"""
+ import webnotes.utils
import os, re
+ esc = webnotes.utils.make_esc('[]')
+ if not search: search = esc(txt1)
for wt in os.walk(start, followlinks=1):
for fn in wt[2]:
if fn.split('.')[-1]==extn:
@@ -29,7 +32,7 @@ def replace_code(start, txt1, txt2, extn):
with open(fpath, 'r') as f:
content = f.read()
- if re.search(txt1, content):
+ if re.search(search, content):
res = search_replace_with_prompt(fpath, txt1, txt2)
if res == 'skip':
return 'skip'
@@ -239,11 +242,11 @@ def run():
elif options.sync_all is not None:
import webnotes.model.sync
- webnotes.model.sync.sync_all()
+ webnotes.model.sync.sync_all(options.force or 0)
elif options.sync is not None:
import webnotes.model.sync
- webnotes.model.sync.sync(options.sync[0], options.sync[1])
+ webnotes.model.sync.sync(options.sync[0], options.sync[1], options.force or 0)
# print messages
if webnotes.message_log: