Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename
diff --git a/erpnext/accounts/__init__.py b/erpnext/accounts/__init__.py
index 6934003..c750d25 100644
--- a/erpnext/accounts/__init__.py
+++ b/erpnext/accounts/__init__.py
@@ -19,8 +19,8 @@
from webnotes.model.code import get_obj
install_docs = [
- {"doctype":"Role", "name":"Accounts Manager"},
- {"doctype":"Role", "name":"Accounts User"}
+ {"doctype":"Role", "role_name":"Accounts Manager", "name":"Accounts Manager"},
+ {"doctype":"Role", "role_name":"Accounts User", "name":"Accounts User"}
]
@webnotes.whitelist()
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 11239d5..f880eb7 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -334,10 +334,9 @@
}
/* ***************************** UTILITY FUNCTIONS ************************ */
-
// Calculate Advance
// ------------------
-var calc_total_advance = function(doc,cdt,cdn) {
+calc_total_advance = function(doc,cdt,cdn) {
var doc = locals[doc.doctype][doc.name];
var el = getchildren('Purchase Invoice Advance',doc.name,'advance_allocation_details')
var tot_tds=0;
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 6c956a0..1878526 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -193,9 +193,14 @@
item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(args['item_code']), as_dict=1)
- ret['income_account'] = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or args['income_account']
- ret['cost_center'] = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or args['cost_center']
- ret['warehouse'] = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or args['warehouse']
+ ret['income_account'] = item and item[0].get('default_income_account') \
+ or (dtl and dtl[0].get('income_account') or args.get('income_account'))
+
+ ret['cost_center'] = item and item[0].get('default_sales_cost_center') \
+ or (dtl and dtl[0].get('cost_center') or args.get('cost_center'))
+
+ ret['warehouse'] = item and item[0].get('default_warehouse') \
+ or (dtl and dtl[0].get('warehouse') or args.get('warehouse'))
if ret['warehouse']:
actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], ret['warehouse']))
diff --git a/erpnext/buying/__init__.py b/erpnext/buying/__init__.py
index 8e18bc5..1bcab3d 100644
--- a/erpnext/buying/__init__.py
+++ b/erpnext/buying/__init__.py
@@ -1,6 +1,6 @@
install_docs = [
- {"doctype":"Role", "name":"Purchase Manager"},
- {"doctype":"Role", "name":"Purchase User"},
- {"doctype":"Role", "name":"Purchase Master Manager"},
- {"doctype":"Role", "name":"Supplier"}
-]
\ No newline at end of file
+ {"doctype":"Role", "role_name":"Purchase Manager", "name":"Purchase Manager"},
+ {"doctype":"Role", "role_name":"Purchase User", "name":"Purchase User"},
+ {"doctype":"Role", "role_name":"Purchase Master Manager", "name":"Purchase Master Manager"},
+ {"doctype":"Role", "role_name":"Supplier", "name":"Supplier"}
+]
diff --git a/erpnext/hr/__init__.py b/erpnext/hr/__init__.py
index ab2d197..930b9ee 100644
--- a/erpnext/hr/__init__.py
+++ b/erpnext/hr/__init__.py
@@ -1,5 +1,5 @@
install_docs = [
- {"doctype":"Role", "name":"Employee"},
- {"doctype":"Role", "name":"HR Manager"},
- {"doctype":"Role", "name":"HR User"},
+ {"doctype":"Role", "role_name":"Employee", "name":"Employee"},
+ {"doctype":"Role", "role_name":"HR Manager", "name":"HR Manager"},
+ {"doctype":"Role", "role_name":"HR User", "name":"HR User"},
]
diff --git a/erpnext/hr/page/hr_home/hr_home.html b/erpnext/hr/page/hr_home/hr_home.html
index b49ce09..47e7e67 100644
--- a/erpnext/hr/page/hr_home/hr_home.html
+++ b/erpnext/hr/page/hr_home/hr_home.html
@@ -57,7 +57,7 @@
<div class="section-item">
<a class="section-link"
title = "List of holidays"
- href="#!List/Leave Allocation">Holiday List</a>
+ href="#!List/Holiday List">Holiday List</a>
</div>
</div>
</div>
diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py
index 693fd77..7847ee1 100644
--- a/erpnext/patches/jan_mar_2012/rename_dt.py
+++ b/erpnext/patches/jan_mar_2012/rename_dt.py
@@ -129,7 +129,8 @@
'periodic_sales_summary', 'monthly_despatched_trend', 'sales', 'sales_order',
'sales_order1', 'sales_agentwise_commission', 'test_report',
'territory_wise_sales_-_target_vs_actual_',
- 'pending_po_items_to_bill1', 'pending_po_items_to_receive1', 'expense_vouchers', 'pending_expense_vouchers')""")
+ 'pending_po_items_to_bill1', 'pending_po_items_to_receive1',
+ 'expense_vouchers', 'pending_expense_vouchers', 'shortage_to_indent')""")
webnotes.conn.sql("""
DELETE FROM `tabSearch Criteria`
diff --git a/erpnext/production/__init__.py b/erpnext/production/__init__.py
index 4da0c58..4fb00a3 100644
--- a/erpnext/production/__init__.py
+++ b/erpnext/production/__init__.py
@@ -1,4 +1,4 @@
install_docs = [
- {"doctype":"Role", "name":"Production Manager"},
- {"doctype":"Role", "name":"Production User"},
+ {"doctype":"Role", "role_name":"Production Manager", "name":"Production Manager"},
+ {"doctype":"Role", "role_name":"Production User", "name":"Production User"},
]
diff --git a/erpnext/projects/__init__.py b/erpnext/projects/__init__.py
index 636248f..61a6eb6 100644
--- a/erpnext/projects/__init__.py
+++ b/erpnext/projects/__init__.py
@@ -1,3 +1,3 @@
install_docs = [
- {"doctype":"Role", "name":"Projects User"},
+ {"doctype":"Role", "role_name":"Projects User", "name":"Projects User"},
]
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index 801ba56..faa175f 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -52,4 +52,4 @@
//--------- calculate gross profit --------------------------------
cur_frm.cscript.est_material_cost = function(doc, cdt, cdn){
get_server_fields('get_gross_profit','','',doc, cdt, cdn, 1);
-}
\ No newline at end of file
+}
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index c88382b..af4864b 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -119,4 +119,4 @@
cur_frm.cscript.refresh(cur_frm.doc, cur_frm.doc.doctype, cur_frm.doc.name);
}
});
-}
\ No newline at end of file
+}
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index 51a9875..9cca9a7 100644
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -51,7 +51,7 @@
def get_allocated_to_name(self):
as_em = sql("select first_name, last_name from `tabProfile` where name=%s",str(self.doc.allocated_to))
- ret = { 'allocated_to_name' : as_em and (as_em[0][0] + ' ' + as_em[0][1]) or ''}
+ ret = { 'allocated_to_name' : as_em and (cstr(as_em[0][0]) + ' ' + cstr(as_em[0][1])) or ''}
return ret
# validate
@@ -95,7 +95,7 @@
sql("delete from tabEvent where ref_type='Task' and ref_name=%s", self.doc.name)
self.add_calendar_event()
else:
- msgprint("An Expeted start date has not been set for this task.Please set a, 'Expected Start date'\
+ msgprint("An Expeted start date has not been set for this task.Please set 'Expected Start date'\
to add an event to allocated persons calender.You can save a task without this also.")
diff --git a/erpnext/selling/__init__.py b/erpnext/selling/__init__.py
index c61f23c..f8a457a 100644
--- a/erpnext/selling/__init__.py
+++ b/erpnext/selling/__init__.py
@@ -1,7 +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"},
+ {"doctype":"Role", "role_name":"Customer", "name":"Customer"},
+ {"doctype":"Role", "role_name":"Partner", "name":"Partner"},
+ {"doctype":"Role", "role_name":"Sales Manager", "name":"Sales Manager"},
+ {"doctype":"Role", "role_name":"Sales Master Manager", "name":"Sales Master Manager"},
+ {"doctype":"Role", "role_name":"Sales User", "name":"Sales User"},
]
diff --git a/erpnext/setup/__init__.py b/erpnext/setup/__init__.py
index dad1873..c4b3773 100644
--- a/erpnext/setup/__init__.py
+++ b/erpnext/setup/__init__.py
@@ -1,3 +1,3 @@
install_docs = [
- {'doctype':'Role', 'name': 'System Manager'}
-]
\ No newline at end of file
+ {'doctype':'Role', 'role_name': 'System Manager', 'name': 'System Manager'}
+]
diff --git a/erpnext/startup/js/feature_setup.js b/erpnext/startup/js/feature_setup.js
index b929a7c..f7fdb26 100644
--- a/erpnext/startup/js/feature_setup.js
+++ b/erpnext/startup/js/feature_setup.js
@@ -30,10 +30,10 @@
'fs_projects': {
'BOM': {'fields':['project_name']},
'Delivery Note': {'fields':['project_name']},
- 'Purchase Invoice': {'fields':['project_name']},
+ 'Purchase Invoice': {'entries':['project_name']},
'Production Order': {'fields':['project_name']},
- 'Purchase Order': {'fields':['project_name']},
- 'Purchase Receipt': {'fields':['project_name']},
+ 'Purchase Order': {'po_details':['project_name']},
+ 'Purchase Receipt': {'purchase_receipt_details':['project_name']},
'Sales Invoice': {'fields':['project_name']},
'Sales Order': {'fields':['project_name']},
'Stock Entry': {'fields':['project_name']},
diff --git a/erpnext/stock/__init__.py b/erpnext/stock/__init__.py
index ee2b061..f171425 100644
--- a/erpnext/stock/__init__.py
+++ b/erpnext/stock/__init__.py
@@ -1,6 +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"},
+ {"doctype":"Role", "role_name":"Material Manager", "name":"Material Manager"},
+ {"doctype":"Role", "role_name":"Material Master Manager", "name":"Material Master Manager"},
+ {"doctype":"Role", "role_name":"Material User", "name":"Material User"},
+ {"doctype":"Role", "role_name":"Quality Manager", "name":"Quality Manager"},
]
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 771cb82..19cec92 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
@@ -44,17 +44,17 @@
cur_frm.cscript.return_type = function(doc, cdt, cdn) {
var cp = wn.control_panel;
hide_field(['purchase_receipt_no', 'delivery_note_no', 'sales_invoice_no',
- 'return_details', 'Get Items', 'Make Excise Invoice', 'Make Stock Entry',
+ 'return_details', 'get_items', 'Make Excise Invoice', 'Make Stock Entry',
'Make Debit Note', 'Make Credit Note']);
if(doc.return_type == 'Sales Return') {
- unhide_field(['delivery_note_no', 'sales_invoice_no', 'Get Items',
+ unhide_field(['delivery_note_no', 'sales_invoice_no', 'get_items',
'return_details', 'Make Credit Note', 'Make Stock Entry']);
if(cp.country == 'India') { unhide_field(['Make Excise Invoice']); }
} else if(doc.return_type == 'Purchase Return') {
- unhide_field(['purchase_receipt_no', 'Get Items', 'return_details',
+ unhide_field(['purchase_receipt_no', 'get_items', 'return_details',
'Make Debit Note', 'Make Stock Entry']);
if(cp.country == 'India') { unhide_field(['Make Excise Invoice']); }
diff --git a/erpnext/support/__init__.py b/erpnext/support/__init__.py
index b94538b..71ef684 100644
--- a/erpnext/support/__init__.py
+++ b/erpnext/support/__init__.py
@@ -1,6 +1,6 @@
install_docs = [
- {'doctype':'Role', 'name':'Support Team'},
- {'doctype':'Role', 'name':'Support Manager'},
- {'doctype':'Role', 'name':'Maintenance User'},
- {'doctype':'Role', 'name':'Maintenance Manager'}
-]
\ No newline at end of file
+ {'doctype':'Role', 'role_name':'Support Team', 'name':'Support Team'},
+ {'doctype':'Role', 'role_name':'Support Manager', 'name':'Support Manager'},
+ {'doctype':'Role', 'role_name':'Maintenance User', 'name':'Maintenance User'},
+ {'doctype':'Role', 'role_name':'Maintenance Manager', 'name':'Maintenance Manager'}
+]
diff --git a/erpnext/support/doctype/support_ticket/listview.js b/erpnext/support/doctype/support_ticket/listview.js
index 67ba9ea..944c08f 100644
--- a/erpnext/support/doctype/support_ticket/listview.js
+++ b/erpnext/support/doctype/support_ticket/listview.js
@@ -10,6 +10,7 @@
"`tabSupport Ticket`.description"
]);
this.stats = this.stats.concat(['status']);
+ this.show_hide_check_column();
},
prepare_data: function(data) {
@@ -43,9 +44,10 @@
},
columns: [
+ {width: '3%', content:'check'},
{width: '20%', content:'name'},
{width: '10%', content:'status_html'},
- {width: '56%', content:'tags+description', css: {color:'#aaa'}},
+ {width: '53%', content:'tags+description', css: {color:'#aaa'}},
{width: '14%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
]
diff --git a/erpnext/website/__init__.py b/erpnext/website/__init__.py
index 1ed1cf1..97062cf 100644
--- a/erpnext/website/__init__.py
+++ b/erpnext/website/__init__.py
@@ -1,4 +1,4 @@
install_docs = [
- {"doctype":"Role", "name":"Blogger"},
- {"doctype":"Role", "name":"Website Manager"},
-]
\ No newline at end of file
+ {"doctype":"Role", "role_name":"Blogger", "name":"Blogger"},
+ {"doctype":"Role", "role_name":"Website Manager", "name":"Website Manager"},
+]
diff --git a/js/all-app.js b/js/all-app.js
index c53302a..769d6ca 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -290,7 +290,7 @@
if(icon){$('<i>').addClass(icon).appendTo($button);}
$button.html(label).click(click);return $button}},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
if(!(this.hide_refresh||this.no_refresh)){this.add_button('Refresh',function(){me.run();},'icon-refresh');}
-if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){wn.views.formview.create(me.new_doctype)},'icon-plus');}
+if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){newdoc(me.new_doctype);},'icon-plus');}
if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}
if(me.no_toolbar||me.hide_toolbar){me.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
this.onrun=a0;if(a0&&a0.callback)
@@ -402,7 +402,7 @@
%(label)s</a> \
(%(count)s)</div>\
</div>',args));this.setup_stat_item_click($item);return $item;},setup_stat_item_click:function($item){var me=this;$item.find('a').click(function(){var fieldname=$(this).attr('data-field');var label=$(this).attr('data-label');me.set_filter(fieldname,label);return false;});},set_filter:function(fieldname,label){var filter=this.filter_list.get_filter(fieldname);if(filter){var v=filter.field.get_value();if(v.indexOf(label)!=-1){return false;}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{filter.set_values(fieldname,'in',v+', '+label);}}}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{this.filter_list.add_filter(fieldname,'=',label);}}
-this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
+this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];this.show_hide_check_column();},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
if(opts.content.indexOf&&opts.content.indexOf('+')!=-1){$.map(opts.content.split('+'),function(v){me.render_column(data,parent,{content:v});});return;}
if(typeof opts.content=='function'){opts.content(parent,data);}
else if(opts.content=='name'){$(parent).append(repl('<a href="#!Form/%(doctype)s/%(name)s">%(name)s</a>',data));}
@@ -423,7 +423,7 @@
if(diff==1){data.when='Yesterday'}
if(diff==2){data.when='2 days ago'}
if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('<span class="label label-info" style="cursor: pointer">'
-+strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}}})
++strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}},show_hide_check_column:function(){if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}}})
/*
* lib/js/wn/views/pageview.js
*/
@@ -2227,7 +2227,7 @@
/*
* erpnext/startup/js/feature_setup.js
*/
-pscript.feature_dict={'fs_projects':{'BOM':{'fields':['project_name']},'Delivery Note':{'fields':['project_name']},'Purchase Invoice':{'fields':['project_name']},'Production Order':{'fields':['project_name']},'Purchase Order':{'fields':['project_name']},'Purchase Receipt':{'fields':['project_name']},'Sales Invoice':{'fields':['project_name']},'Sales Order':{'fields':['project_name']},'Stock Entry':{'fields':['project_name']},'Timesheet':{'timesheet_details':['project_name']}},'fs_packing_details':{},'fs_discounts':{'Delivery Note':{'delivery_note_details':['adj_rate']},'Quotation':{'quotation_details':['adj_rate']},'Sales Invoice':{'entries':['adj_rate']},'Sales Order':{'sales_order_details':['adj_rate','ref_rate']}},'fs_purchase_discounts':{'Purchase Order':{'po_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Receipt':{'purchase_receipt_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Invoice':{'entries':['purchase_ref_rate','discount_rate','import_ref_rate']}},'fs_brands':{'Delivery Note':{'delivery_note_details':['brand']},'Purchase Request':{'indent_details':['brand']},'Item':{'fields':['brand']},'Purchase Order':{'po_details':['brand']},'Purchase Invoice':{'entries':['brand']},'Quotation':{'quotation_details':['brand']},'Sales Invoice':{'entries':['brand']},'Sales BOM':{'fields':['new_item_brand']},'Sales Order':{'sales_order_details':['brand']},'Serial No':{'fields':['brand']}},'fs_after_sales_installations':{'Delivery Note':{'fields':['installation_status','per_installed'],'delivery_note_details':['installed_qty']}},'fs_item_batch_nos':{'Delivery Note':{'delivery_note_details':['batch_no']},'Item':{'fields':['has_batch_no']},'Purchase Receipt':{'purchase_receipt_details':['batch_no']},'Quality Inspection':{'fields':['batch_no']},'Sales and Pruchase Return Wizard':{'return_details':['batch_no']},'Sales Invoice':{'entries':['batch_no']},'Stock Entry':{'mtn_details':['batch_no']},'Stock Ledger Entry':{'fields':['batch_no']}},'fs_item_serial_nos':{'Customer Issue':{'fields':['serial_no']},'Delivery Note':{'delivery_note_details':['serial_no'],'packing_details':['serial_no']},'Installation Note':{'installed_item_details':['serial_no']},'Item':{'fields':['has_serial_no']},'Maintenance Schedule':{'item_maintenance_detail':['serial_no'],'maintenance_schedule_detail':['serial_no']},'Maintenance Visit':{'maintenance_visit_details':['serial_no']},'Purchase Receipt':{'purchase_receipt_details':['serial_no']},'Quality Inspection':{'fields':['item_serial_no']},'Sales and Pruchase Return Wizard':{'return_details':['serial_no']},'Sales Invoice':{'entries':['serial_no']},'Stock Entry':{'mtn_details':['serial_no']},'Stock Ledger Entry':{'fields':['serial_no']}},'fs_item_group_in_details':{'Delivery Note':{'delivery_note_details':['item_group']},'Opportunity':{'enquiry_details':['item_group']},'Purchase Request':{'indent_details':['item_group']},'Item':{'fields':['item_group']},'Global Defaults':{'fields':['default_item_group']},'Purchase Order':{'po_details':['item_group']},'Purchase Receipt':{'purchase_receipt_details':['item_group']},'Purchase Voucher':{'entries':['item_group']},'Quotation':{'quotation_details':['item_group']},'Sales Invoice':{'entries':['item_group']},'Sales BOM':{'fields':['serial_no']},'Sales Order':{'sales_order_details':['item_group']},'Serial No':{'fields':['item_group']},'Sales Partner':{'partner_target_details':['item_group']},'Sales Person':{'target_details':['item_group']},'Territory':{'target_details':['item_group']}},'fs_page_break':{'Delivery Note':{'delivery_note_details':['page_break'],'packing_details':['page_break']},'Purchase Request':{'indent_details':['page_break']},'Purchase Order':{'po_details':['page_break']},'Purchase Receipt':{'purchase_receipt_details':['page_break']},'Purchase Voucher':{'entries':['page_break']},'Quotation':{'quotation_details':['page_break']},'Sales Invoice':{'entries':['page_break']},'Sales Order':{'sales_order_details':['page_break']}},'fs_exports':{'Delivery Note':{'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','amount','basic_rate']},'POS Setting':{'fields':['conversion_rate','currency']},'Quotation':{'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','amount','basic_rate']},'Sales Invoice':{'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['base_ref_rate','amount','basic_rate']},'Item':{'ref_rate_details':['ref_currency']},'Sales BOM':{'fields':['currency']},'Sales Order':{'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','amount','basic_rate']}},'fs_imports':{'Purchase Invoice':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['purchase_ref_rate','amount','rate']},'Purchase Order':{'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['purchase_ref_rate','amount','purchase_rate']},'Purchase Receipt':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['purchase_ref_rate','amount','purchase_rate']},'Supplier Quotation':{'fields':['conversion_rate','currency']}},'fs_item_advanced':{'Item':{'fields':['item_customer_details']}},'fs_sales_extras':{'Address':{'fields':['sales_partner']},'Contact':{'fields':['sales_partner']},'Customer':{'fields':['sales_team']},'Delivery Note':{'fields':['sales_team','Packing List']},'Item':{'fields':['item_customer_details']},'Sales Invoice':{'fields':['sales_team']},'Sales Order':{'fields':['sales_team','Packing List']}},'fs_more_info':{'Delivery Note':{'fields':['More Info']},'Opportunity':{'fields':['More Info']},'Purchase Request':{'fields':['More Info']},'Lead':{'fields':['More Info']},'Purchase Invoice':{'fields':['More Info']},'Purchase Order':{'fields':['More Info']},'Purchase Receipt':{'fields':['More Info']},'Quotation':{'fields':['More Info']},'Sales Invoice':{'fields':['More Info']},'Sales Order':{'fields':['More Info']},},'fs_quality':{'Item':{'fields':['Item Inspection Criteria','inspection_required']},'Purchase Receipt':{'purchase_receipt_details':['qa_no']}},'fs_manufacturing':{'Item':{'fields':['Manufacturing']}},'fs_pos':{'Sales Invoice':{'fields':['is_pos']}},'fs_recurring_invoice':{'Sales Invoice':{'fields':['Recurring Invoice']}}}
+pscript.feature_dict={'fs_projects':{'BOM':{'fields':['project_name']},'Delivery Note':{'fields':['project_name']},'Purchase Invoice':{'entries':['project_name']},'Production Order':{'fields':['project_name']},'Purchase Order':{'po_details':['project_name']},'Purchase Receipt':{'purchase_receipt_details':['project_name']},'Sales Invoice':{'fields':['project_name']},'Sales Order':{'fields':['project_name']},'Stock Entry':{'fields':['project_name']},'Timesheet':{'timesheet_details':['project_name']}},'fs_packing_details':{},'fs_discounts':{'Delivery Note':{'delivery_note_details':['adj_rate']},'Quotation':{'quotation_details':['adj_rate']},'Sales Invoice':{'entries':['adj_rate']},'Sales Order':{'sales_order_details':['adj_rate','ref_rate']}},'fs_purchase_discounts':{'Purchase Order':{'po_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Receipt':{'purchase_receipt_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Invoice':{'entries':['purchase_ref_rate','discount_rate','import_ref_rate']}},'fs_brands':{'Delivery Note':{'delivery_note_details':['brand']},'Purchase Request':{'indent_details':['brand']},'Item':{'fields':['brand']},'Purchase Order':{'po_details':['brand']},'Purchase Invoice':{'entries':['brand']},'Quotation':{'quotation_details':['brand']},'Sales Invoice':{'entries':['brand']},'Sales BOM':{'fields':['new_item_brand']},'Sales Order':{'sales_order_details':['brand']},'Serial No':{'fields':['brand']}},'fs_after_sales_installations':{'Delivery Note':{'fields':['installation_status','per_installed'],'delivery_note_details':['installed_qty']}},'fs_item_batch_nos':{'Delivery Note':{'delivery_note_details':['batch_no']},'Item':{'fields':['has_batch_no']},'Purchase Receipt':{'purchase_receipt_details':['batch_no']},'Quality Inspection':{'fields':['batch_no']},'Sales and Pruchase Return Wizard':{'return_details':['batch_no']},'Sales Invoice':{'entries':['batch_no']},'Stock Entry':{'mtn_details':['batch_no']},'Stock Ledger Entry':{'fields':['batch_no']}},'fs_item_serial_nos':{'Customer Issue':{'fields':['serial_no']},'Delivery Note':{'delivery_note_details':['serial_no'],'packing_details':['serial_no']},'Installation Note':{'installed_item_details':['serial_no']},'Item':{'fields':['has_serial_no']},'Maintenance Schedule':{'item_maintenance_detail':['serial_no'],'maintenance_schedule_detail':['serial_no']},'Maintenance Visit':{'maintenance_visit_details':['serial_no']},'Purchase Receipt':{'purchase_receipt_details':['serial_no']},'Quality Inspection':{'fields':['item_serial_no']},'Sales and Pruchase Return Wizard':{'return_details':['serial_no']},'Sales Invoice':{'entries':['serial_no']},'Stock Entry':{'mtn_details':['serial_no']},'Stock Ledger Entry':{'fields':['serial_no']}},'fs_item_group_in_details':{'Delivery Note':{'delivery_note_details':['item_group']},'Opportunity':{'enquiry_details':['item_group']},'Purchase Request':{'indent_details':['item_group']},'Item':{'fields':['item_group']},'Global Defaults':{'fields':['default_item_group']},'Purchase Order':{'po_details':['item_group']},'Purchase Receipt':{'purchase_receipt_details':['item_group']},'Purchase Voucher':{'entries':['item_group']},'Quotation':{'quotation_details':['item_group']},'Sales Invoice':{'entries':['item_group']},'Sales BOM':{'fields':['serial_no']},'Sales Order':{'sales_order_details':['item_group']},'Serial No':{'fields':['item_group']},'Sales Partner':{'partner_target_details':['item_group']},'Sales Person':{'target_details':['item_group']},'Territory':{'target_details':['item_group']}},'fs_page_break':{'Delivery Note':{'delivery_note_details':['page_break'],'packing_details':['page_break']},'Purchase Request':{'indent_details':['page_break']},'Purchase Order':{'po_details':['page_break']},'Purchase Receipt':{'purchase_receipt_details':['page_break']},'Purchase Voucher':{'entries':['page_break']},'Quotation':{'quotation_details':['page_break']},'Sales Invoice':{'entries':['page_break']},'Sales Order':{'sales_order_details':['page_break']}},'fs_exports':{'Delivery Note':{'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','amount','basic_rate']},'POS Setting':{'fields':['conversion_rate','currency']},'Quotation':{'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','amount','basic_rate']},'Sales Invoice':{'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['base_ref_rate','amount','basic_rate']},'Item':{'ref_rate_details':['ref_currency']},'Sales BOM':{'fields':['currency']},'Sales Order':{'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','amount','basic_rate']}},'fs_imports':{'Purchase Invoice':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['purchase_ref_rate','amount','rate']},'Purchase Order':{'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['purchase_ref_rate','amount','purchase_rate']},'Purchase Receipt':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['purchase_ref_rate','amount','purchase_rate']},'Supplier Quotation':{'fields':['conversion_rate','currency']}},'fs_item_advanced':{'Item':{'fields':['item_customer_details']}},'fs_sales_extras':{'Address':{'fields':['sales_partner']},'Contact':{'fields':['sales_partner']},'Customer':{'fields':['sales_team']},'Delivery Note':{'fields':['sales_team','Packing List']},'Item':{'fields':['item_customer_details']},'Sales Invoice':{'fields':['sales_team']},'Sales Order':{'fields':['sales_team','Packing List']}},'fs_more_info':{'Delivery Note':{'fields':['More Info']},'Opportunity':{'fields':['More Info']},'Purchase Request':{'fields':['More Info']},'Lead':{'fields':['More Info']},'Purchase Invoice':{'fields':['More Info']},'Purchase Order':{'fields':['More Info']},'Purchase Receipt':{'fields':['More Info']},'Quotation':{'fields':['More Info']},'Sales Invoice':{'fields':['More Info']},'Sales Order':{'fields':['More Info']},},'fs_quality':{'Item':{'fields':['Item Inspection Criteria','inspection_required']},'Purchase Receipt':{'purchase_receipt_details':['qa_no']}},'fs_manufacturing':{'Item':{'fields':['Manufacturing']}},'fs_pos':{'Sales Invoice':{'fields':['is_pos']}},'fs_recurring_invoice':{'Sales Invoice':{'fields':['Recurring Invoice']}}}
$(document).bind('form_refresh',function(){for(sys_feat in sys_defaults)
{if(sys_defaults[sys_feat]=='0'&&(sys_feat in pscript.feature_dict))
{if(cur_frm.doc.doctype in pscript.feature_dict[sys_feat])
diff --git a/js/all-web.js b/js/all-web.js
index 8a39b46..6b036bf 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -177,7 +177,7 @@
if(icon){$('<i>').addClass(icon).appendTo($button);}
$button.html(label).click(click);return $button}},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
if(!(this.hide_refresh||this.no_refresh)){this.add_button('Refresh',function(){me.run();},'icon-refresh');}
-if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){wn.views.formview.create(me.new_doctype)},'icon-plus');}
+if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){newdoc(me.new_doctype);},'icon-plus');}
if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}
if(me.no_toolbar||me.hide_toolbar){me.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
this.onrun=a0;if(a0&&a0.callback)
@@ -289,7 +289,7 @@
%(label)s</a> \
(%(count)s)</div>\
</div>',args));this.setup_stat_item_click($item);return $item;},setup_stat_item_click:function($item){var me=this;$item.find('a').click(function(){var fieldname=$(this).attr('data-field');var label=$(this).attr('data-label');me.set_filter(fieldname,label);return false;});},set_filter:function(fieldname,label){var filter=this.filter_list.get_filter(fieldname);if(filter){var v=filter.field.get_value();if(v.indexOf(label)!=-1){return false;}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{filter.set_values(fieldname,'in',v+', '+label);}}}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{this.filter_list.add_filter(fieldname,'=',label);}}
-this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
+this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];this.show_hide_check_column();},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
if(opts.content.indexOf&&opts.content.indexOf('+')!=-1){$.map(opts.content.split('+'),function(v){me.render_column(data,parent,{content:v});});return;}
if(typeof opts.content=='function'){opts.content(parent,data);}
else if(opts.content=='name'){$(parent).append(repl('<a href="#!Form/%(doctype)s/%(name)s">%(name)s</a>',data));}
@@ -310,7 +310,7 @@
if(diff==1){data.when='Yesterday'}
if(diff==2){data.when='2 days ago'}
if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('<span class="label label-info" style="cursor: pointer">'
-+strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}}})
++strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}},show_hide_check_column:function(){if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}}})
/*
* lib/js/wn/views/pageview.js
*/
@@ -686,7 +686,7 @@
if(icon){$('<i>').addClass(icon).appendTo($button);}
$button.html(label).click(click);return $button}},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
if(!(this.hide_refresh||this.no_refresh)){this.add_button('Refresh',function(){me.run();},'icon-refresh');}
-if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){wn.views.formview.create(me.new_doctype)},'icon-plus');}
+if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){newdoc(me.new_doctype);},'icon-plus');}
if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}
if(me.no_toolbar||me.hide_toolbar){me.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
this.onrun=a0;if(a0&&a0.callback)