version
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 61b36d2..e5fca9f 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -1,4 +1,5 @@
pscript['onload_Accounts Browser'] = function(){
+ wn.require('lib/js/legacy/widgets/tree.js');
// if the user directly loads the page, ask to select the chart
var parent = $i('ab_body');
parent.innerHTML = 'Please select your chart: '
diff --git a/erpnext/accounts/page/financial_statements/financial_statements.html b/erpnext/accounts/page/financial_statements/financial_statements.html
index 6e69bc2..e6735fa 100644
--- a/erpnext/accounts/page/financial_statements/financial_statements.html
+++ b/erpnext/accounts/page/financial_statements/financial_statements.html
@@ -1,6 +1,5 @@
<div class="layout_wrapper">
<div id="fs_header"></div>
-</div>
<!-- table.statement td { vertical-align: middle; } table.statement td select { width: 100px; } table.stmt_table { table-layout: fixed; border-collapse: collapse; } table.stmt_table td { vertical-align: middle; padding: 2px; } td.stmt_level0 { font-weight: bold; font-size: 14px; border-bottom: 1px solid #AAA; } td.stmt_level1 { font-weight: bold; font-size: 12px; } td.stmt_level2 { font-size: 11px; } td.stmt_level3 { font-size: 11px; } td.stmt_level4 { font-size: 12px; font-weight: bold; border-bottom: 1px solid #000; } td.stmt_level5 { color: BLUE; font-size: 11px; } --> <!--
<div style="border: 1px solid #cccccc; padding: 4px; margin-top: 8px; background-color: #eeeeee; width: 98%;">
<table class="statement" border="0" cellspacing="2px">
@@ -25,7 +24,8 @@
<div style="margin:10px 0px 10px 0px" mce_style="margin:10px 0px 10px 0px"><button class="button" onclick="pscript.print_statement();">Print</button></div>
-->
<div id="print_html">
-<div id="stmt_title1" style="margin:16px 0px 4px 0px; font-size: 16px; font-weight: bold; color: #888;"></div>
-<div id="stmt_title2" style="margin:0px 0px 8px 0px; font-size: 16px; font-weight: bold;"></div>
-<div id="stmt_tree" style="margin: 0px 0px 16px; overflow: auto; display: none; width: 100%;"></div>
+ <div id="stmt_title1" style="margin:16px 0px 4px 0px; font-size: 16px; font-weight: bold; color: #888;"></div>
+ <div id="stmt_title2" style="margin:0px 0px 8px 0px; font-size: 16px; font-weight: bold;"></div>
+ <div id="stmt_tree" style="margin: 0px 0px 16px; overflow: auto; display: none; width: 100%;"></div>
+</div>
</div>
diff --git a/erpnext/home/page/event_updates/event_updates.js b/erpnext/home/page/event_updates/event_updates.js
index 078dfc2..faf9a75 100644
--- a/erpnext/home/page/event_updates/event_updates.js
+++ b/erpnext/home/page/event_updates/event_updates.js
@@ -449,51 +449,40 @@
}
FeedList.prototype.make_list = function() {
- this.list_area = $a(this.wrapper,'div')
- this.no_result = $a(this.wrapper, 'div','help_box',{display:'none'},'Nothing to show yet. Your feed will be updated as you start your activities')
-
- var l = new Listing('Feed List',1);
var me = this;
-
- // style
- l.colwidths = ['100%']; l.page_len = 20;
- l.opts.cell_style = {padding:'0px'};
- l.opts.hide_rec_label = 1;
+ this.list_area = $a(this.wrapper,'div')
- // build query
- l.get_query = function(){
- this.query = repl('select \
+ this.list = new wn.widgets.Listing({
+ parent: this.list_area,
+ query: repl('select \
distinct t1.name, t1.doc_type, t1.doc_name, t1.subject, t1.modified_by, \
- concat(ifnull(t2.first_name,""), " ", ifnull(t2.last_name,"")), t1.modified, t1.color \
+ concat(ifnull(t2.first_name,""), " ", ifnull(t2.last_name,"")) as full_name, \
+ t1.modified, t1.color \
from tabFeed t1, tabProfile t2, tabUserRole t3, tabDocPerm t4 \
where t1.doc_type = t4.parent \
and t2.name = t1.owner \
and t3.parent = "%(user)s" \
and t4.role = t3.role \
and ifnull(t4.`read`,0) = 1 \
- order by t1.modified desc', {user:user})
- this.query_max = ''
- }
-
- // render list ui
- l.show_cell = function(cell,ri,ci,d){ me.render_feed(cell,ri,ci,d); }
-
- // onrun
- l.onrun = function(){ $(me.wrapper).fadeIn(); if(me.after_run) me.after_run(); }
-
- // make
- l.make(this.list_area);
- $dh(l.btn_area);
-
- this.list = l;
+ order by t1.modified desc', {user:user}),
+ no_result_message: 'Nothing to show yet. Your feed will be updated as you start your activities',
+ render_row: function(parent, data) {
+ me.render_feed(parent, data)
+ },
+ onrun: function() {
+ $(me.wrapper).fadeIn();
+ if(me.after_run) me.after_run();
+ },
+ hide_refresh: true
+ });
}
FeedList.prototype.after_run = function() {
this.list.has_data() ? $dh(this.no_result) : $ds(this.no_result)
}
-FeedList.prototype.render_feed = function(cell,ri,ci,d) {
- new FeedItem(cell, d[ri], this);
+FeedList.prototype.render_feed = function(parent, data) {
+ new FeedItem(parent, data, this);
}
// Item
@@ -527,12 +516,12 @@
FeedItem.prototype.add_day_sep = function(det) {
var me = this;
- var prev_date = det[6].split(' ')[0];
+ var prev_date = det.modified.split(' ')[0];
var make_div = function() {
var div = $a(me.head, 'div', '',
{borderBottom:'1px solid #888', margin:'8px 0px', padding:'2px 0px', color:'#888', fontSize:'11px'});
- div.innerHTML = comment_when(det[6], 1);
+ div.innerHTML = comment_when(det.modified, 1);
// today?
if(prev_date==get_today()) {
@@ -554,32 +543,31 @@
tag = $a($td(this.tab,0,0), 'div', '',
{color:'#FFF', padding:'3px', textAlign:'right', fontSize:'11px', whiteSpace:'nowrap', overflow:'hidden', cursor:'pointer'});
$br(tag,'3px');
- $y(tag, {backgroundColor:(det[7] ? det[7] : '#273')});
- tag.innerHTML = get_doctype_label(det[1]);
- tag.dt = det[1]
+ $y(tag, {backgroundColor:(det.color || '#273')});
+ tag.innerHTML = get_doctype_label(det.doc_type);
+ tag.dt = det.doc_type;
tag.onclick = function() { loaddocbrowser(this.dt); }
}
FeedItem.prototype.render_references = function(div, det) {
// name
- div.tab = make_table(div, 1, 2, '100%', [null, '15%'])
- //div.innerHTML = '<b>' + (strip(det[11]) ? det[11] : det[2]) + ' (' + cint(det[12]) + '): </b> has ' + det[7] + ' ';
-
- var dt = det[1]; var dn = det[2]
+ div.tab = make_table(div, 1, 2, '100%', [null, '15%'])
+ var dt = det.doc_type; var dn = det.doc_name
// link
var allow = in_list(profile.can_read, dt);
- var span = $a($td(div.tab,0,0), 'span', (allow ? 'link_type': ''), null, det[2]);
+ var span = $a($td(div.tab,0,0), 'span', (allow ? 'link_type': ''), null, det.doc_name);
span.dt = dt; span.dn = dn;
if(allow) span.onclick = function() { loaddoc(this.dt, this.dn); }
// subject
- if(det[3]) {
- $a($td(div.tab,0,0), 'span', '', {marginLeft:'7px', color:'#444'}, det[3]);
+ if(det.subject) {
+ $a($td(div.tab,0,0), 'span', '', {marginLeft:'7px', color:'#444'}, det.subject);
}
// by
- $y($td(div.tab,0,1), {fontSize:'11px'}).innerHTML = (strip(det[5]) ? det[5] : det[4]);
+ $y($td(div.tab,0,1), {fontSize:'11px'}).innerHTML =
+ (strip(det.full_name) ? det.full_name : det.modified_by);
}
HomeStatusBar = function() {
diff --git a/erpnext/patches/jan_mar_2012/subdomain_login_patch.py b/erpnext/patches/jan_mar_2012/subdomain_login_patch.py
index df26e4d..fcf72dc 100644
--- a/erpnext/patches/jan_mar_2012/subdomain_login_patch.py
+++ b/erpnext/patches/jan_mar_2012/subdomain_login_patch.py
@@ -14,6 +14,7 @@
from webnotes.model import delete_doc
delete_doc("DocType", "SSO Control")
delete_doc("DocType", "WN ERP Client Control")
+ delete_doc("DocType", "Production Tips Common")
delete_doc("DocType", "DocTrigger")
# cleanup control panel
diff --git a/erpnext/production/page/bill_of_materials/bill_of_materials.html b/erpnext/production/page/bill_of_materials/bill_of_materials.html
index 1263e44..55b4e70 100644
--- a/erpnext/production/page/bill_of_materials/bill_of_materials.html
+++ b/erpnext/production/page/bill_of_materials/bill_of_materials.html
@@ -1,4 +1,4 @@
-<div style="margin:0px">
+<div class="layout_wrapper">
<div id="bom_header"> </div>
<!--
<div style="color: #444444;" mce_style="color: #444444;">
diff --git a/erpnext/production/page/bill_of_materials/bill_of_materials.js b/erpnext/production/page/bill_of_materials/bill_of_materials.js
index f2c9b0a..c40fa11 100644
--- a/erpnext/production/page/bill_of_materials/bill_of_materials.js
+++ b/erpnext/production/page/bill_of_materials/bill_of_materials.js
@@ -1,4 +1,5 @@
pscript['onload_Bill of Materials'] = function() {
+ wn.require('lib/js/legacy/widgets/tree.js');
// header and toolbar
var h = new PageHeader('bom_header','Bill of Materials','BOM gives the breakdown of cost for product');
@@ -113,12 +114,11 @@
$c('runserverobj', args={'doctype':'BOM Control', 'docname':'BOM Control', 'method':'calculate_cost', 'arg':pscript.bom_no}, function(r,rt) {
var calculated = r.message;
if (calculated == 'calculated') {pscript.show_bom();}
- else {$i('bom_tree').innerHTML = "Sorry it's taking too long try next time....";}
+ else {$i('bom_tree').innerHTML = "Not available";}
});
}
pscript.collapse_all = function(){
- alert("In");
pscript.bom_tree.collapseall()
}
diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js
index c0c4542..d2ba627 100644
--- a/erpnext/selling/page/sales_browser/sales_browser.js
+++ b/erpnext/selling/page/sales_browser/sales_browser.js
@@ -1,4 +1,5 @@
pscript['onload_Sales Browser'] = function(){
+ wn.require('lib/js/legacy/widgets/tree.js');
var parent = $i('tr_body');
parent.innerHTML = 'Please select your chart: '
var sel = $a(parent,'select');
diff --git a/erpnext/setup/doctype/item_group/item_group.txt b/erpnext/setup/doctype/item_group/item_group.txt
index d2604fd..2e0731c 100644
--- a/erpnext/setup/doctype/item_group/item_group.txt
+++ b/erpnext/setup/doctype/item_group/item_group.txt
@@ -5,16 +5,18 @@
{
'creation': '2010-08-08 17:09:06',
'docstatus': 0,
- 'modified': '2010-12-24 11:58:29',
- 'modified_by': 'abhishek@webnotestech.com',
+ 'modified': '2012-01-30 12:14:30',
+ 'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all DocType
{
+ '_last_update': '1322549700',
'allow_trash': 1,
'autoname': 'field:item_group_name',
'colour': 'White:FFF',
+ 'default_print_format': 'Standard',
'doctype': 'DocType',
'document_type': 'Master',
'in_create': 1,
@@ -25,7 +27,7 @@
'section_style': 'Simple',
'server_code_error': ' ',
'show_in_menu': 0,
- 'version': 54
+ 'version': 57
},
# These values are common for all DocField
@@ -59,7 +61,6 @@
'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
- 'idx': 1,
'permlevel': 1,
'role': 'Material Manager',
'submit': 0,
@@ -72,7 +73,6 @@
'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
- 'idx': 2,
'permlevel': 0,
'role': 'Material Manager',
'submit': 0,
@@ -85,7 +85,6 @@
'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
- 'idx': 3,
'permlevel': 1,
'role': 'Material User',
'submit': 0,
@@ -98,7 +97,6 @@
'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
- 'idx': 4,
'permlevel': 0,
'role': 'Material User',
'submit': 0,
@@ -110,7 +108,6 @@
'cancel': 1,
'create': 1,
'doctype': 'DocPerm',
- 'idx': 5,
'permlevel': 0,
'role': 'System Manager',
'write': 1
@@ -121,7 +118,6 @@
'cancel': 1,
'create': 1,
'doctype': 'DocPerm',
- 'idx': 6,
'permlevel': 0,
'role': 'Material Master Manager',
'write': 1
@@ -130,21 +126,8 @@
# DocField
{
'doctype': 'DocField',
- 'fieldname': 'trash_reason',
- 'fieldtype': 'Small Text',
- 'idx': 1,
- 'label': 'Trash Reason',
- 'oldfieldname': 'trash_reason',
- 'oldfieldtype': 'Small Text',
- 'permlevel': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
'fieldname': 'item_group_name',
'fieldtype': 'Data',
- 'idx': 2,
'label': 'Item Group Name',
'oldfieldname': 'item_group_name',
'oldfieldtype': 'Data',
@@ -155,21 +138,8 @@
# DocField
{
'doctype': 'DocField',
- 'fieldname': 'show_in_catalogue',
- 'fieldtype': 'Check',
- 'idx': 3,
- 'label': 'Show in catalogue',
- 'oldfieldname': 'show_in_catalogue',
- 'oldfieldtype': 'Check',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
- 'idx': 4,
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Text',
@@ -182,7 +152,6 @@
'doctype': 'DocField',
'fieldname': 'parent_item_group',
'fieldtype': 'Link',
- 'idx': 5,
'label': 'Parent Item Group',
'oldfieldname': 'parent_item_group',
'oldfieldtype': 'Link',
@@ -199,7 +168,6 @@
'doctype': 'DocField',
'fieldname': 'is_group',
'fieldtype': 'Select',
- 'idx': 6,
'label': 'Has Child Node',
'oldfieldname': 'is_group',
'oldfieldtype': 'Select',
@@ -211,10 +179,20 @@
# DocField
{
'doctype': 'DocField',
+ 'fieldname': 'trash_reason',
+ 'fieldtype': 'Small Text',
+ 'label': 'Trash Reason',
+ 'oldfieldname': 'trash_reason',
+ 'oldfieldtype': 'Small Text',
+ 'permlevel': 1
+ },
+
+ # DocField
+ {
+ 'doctype': 'DocField',
'fieldname': 'lft',
'fieldtype': 'Int',
'hidden': 1,
- 'idx': 7,
'in_filter': 1,
'label': 'lft',
'no_copy': 1,
@@ -232,7 +210,6 @@
'fieldname': 'rgt',
'fieldtype': 'Int',
'hidden': 1,
- 'idx': 8,
'in_filter': 1,
'label': 'rgt',
'no_copy': 1,
@@ -248,13 +225,13 @@
{
'doctype': 'DocField',
'fieldname': 'old_parent',
- 'fieldtype': 'Data',
+ 'fieldtype': 'Link',
'hidden': 1,
- 'idx': 9,
'label': 'old_parent',
'no_copy': 1,
'oldfieldname': 'old_parent',
'oldfieldtype': 'Data',
+ 'options': 'Item Group',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
diff --git a/erpnext/stock/doctype/item/item.txt b/erpnext/stock/doctype/item/item.txt
index d6ac71b..28d0c7a 100644
--- a/erpnext/stock/doctype/item/item.txt
+++ b/erpnext/stock/doctype/item/item.txt
@@ -5,14 +5,14 @@
{
'creation': '2010-08-08 17:09:05',
'docstatus': 0,
- 'modified': '2012-01-17 18:39:39',
+ 'modified': '2012-01-30 12:10:37',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1325570647',
+ '_last_update': '1327904359',
'allow_attach': 1,
'allow_trash': 1,
'autoname': 'field:item_code',
@@ -495,6 +495,98 @@
# DocField
{
+ 'doctype': 'DocField',
+ 'fieldtype': 'Section Break',
+ 'label': 'Website Details',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': 'White:FFF',
+ 'description': 'Check here to show this item on your website under "Products"',
+ 'doctype': 'DocField',
+ 'fieldname': 'show_in_website',
+ 'fieldtype': 'Check',
+ 'label': 'Show in website',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': 'White:FFF',
+ 'description': 'Small image shown in listings (100px width) (Attach first)',
+ 'doctype': 'DocField',
+ 'fieldname': 'thumbnail_image',
+ 'fieldtype': 'Select',
+ 'label': 'Thumbnail Image',
+ 'options': 'attach_files:',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': 'White:FFF',
+ 'description': 'Small image shown product page (300px width) (Attach first)',
+ 'doctype': 'DocField',
+ 'fieldname': 'full_image',
+ 'fieldtype': 'Select',
+ 'label': 'Full Image',
+ 'options': 'attach_files:',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': 'DocField',
+ 'fieldtype': 'Column Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': 'White:FFF',
+ 'description': 'Price list for your website (leave blank if you do not want to show the price)',
+ 'doctype': 'DocField',
+ 'fieldname': 'website_price_list',
+ 'fieldtype': 'Link',
+ 'label': 'Website Price List',
+ 'options': 'Price List',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': 'White:FFF',
+ 'description': 'Enter your shipping warehouse if you want "In Stock" or "Out of Stock" to appear on your website',
+ 'doctype': 'DocField',
+ 'fieldname': 'website_warehouse',
+ 'fieldtype': 'Link',
+ 'label': 'Website Warehouse',
+ 'options': 'Warehouse',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': 'DocField',
+ 'fieldtype': 'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': 'White:FFF',
+ 'description': 'Detailed description of your product for your website. Formatted in html/markdown format.',
+ 'doctype': 'DocField',
+ 'fieldname': 'website_description',
+ 'fieldtype': 'Code',
+ 'label': 'Website Description',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldtype': 'Section Break',
@@ -624,34 +716,6 @@
# DocField
{
'doctype': 'DocField',
- 'fieldname': 'manufacturer',
- 'fieldtype': 'Data',
- 'label': 'Manufacturer',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'manufacturer_part_no',
- 'fieldtype': 'Data',
- 'label': 'Manufacturer Part Number',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'item_supplier_details',
- 'fieldtype': 'Table',
- 'label': 'Item Supplier Details',
- 'options': 'Item Supplier',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
'fieldtype': 'Section Break',
'label': 'Sales Details',
'oldfieldtype': 'Section Break',
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.py b/erpnext/support/doctype/support_ticket/support_ticket.py
index 986a9b5..4ae3f29 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.py
+++ b/erpnext/support/doctype/support_ticket/support_ticket.py
@@ -65,6 +65,8 @@
d = Document('Support Ticket Response')
d.from_email = from_email or webnotes.user.name
d.parent = self.doc.name
+ d.parenttype = "Support Ticket"
+ d.parentfield = "responses"
d.mail = response
d.content_type = content_type
d.save(1)
diff --git a/erpnext/utilities/doctype/production_tips_common/production_tips_common.js b/erpnext/utilities/doctype/production_tips_common/production_tips_common.js
deleted file mode 100644
index 4dfc00a3..0000000
--- a/erpnext/utilities/doctype/production_tips_common/production_tips_common.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// Global dictionary of next steps for doctypes
-// ============================================
-pscript.tip_prod_dict = {'Production Order':['Material Transfer', 'Backflush']};
-
-
-// Set tips depending on conditions
-// ================================
-cur_frm.cscript.get_tips = function(doc, cdt, cdn){
- var next_step_list = pscript.tip_prod_dict[cur_frm.doctype] ? pscript.tip_prod_dict[cur_frm.doctype] : 0;
-
- if(cur_frm.doctype!='Production Planning Tool'){
- // new doc
- if(doc.__islocal){
- if(doc.status=='Cancelled' || doc.amended_from)
- cur_frm.set_tip("You can now make changes in this " + cur_frm.doctype + " and save it by clicking on the <div style='font-weight:bold; display:inline'>Save</div> button in the above toolbar.");
- else{
- cur_frm.set_tip("To create " + cur_frm.doctype + " please start by entering all the mandatory fields (marked <div style='color:Red; display:inline'> Red</div>).");
- if(cur_frm.doctype=='Stock Entry') cur_frm.append_tip("If your purpose is Production Order, please go to <div style='font-weight:bold; display:inline'>Items</div> tab and click <div style='font-weight:bold; display:inline'>Get Items</div> to fetch the items.");
- cur_frm.append_tip("You can then save this form by clicking on the <div style='font-weight:bold; display:inline'>Save</div> button in the above toolbar.");
- }
- }
-
- // doc exists
- else if(!doc.__islocal){
- // execute when doc is saved
- if(doc.docstatus==0 && cur_frm.doctype!='Production Planning Tool')
- cur_frm.set_tip("You have saved your " + cur_frm.doctype + ". You can make this draft permanent by clicking on <div style='font-weight:bold; display:inline'>Submit</div> button above.");
-
- // execute if doc is submitted
- else if(doc.docstatus==1){
- cur_frm.set_tip("You have submitted this " + cur_frm.doctype + ".");
- for(var i=0; i<next_step_list.length; i++){
- if(i==0) cur_frm.append_tip("To proceed select the <div style='font-weight:bold; display:inline'>Next Steps</div> tab below. To transfer raw materials to Finished Goods Warehouse click on <div style='font-weight:bold; display:inline'>" + next_step_list[i] +"</div>.");
- else cur_frm.append_tip("To update the quantity of finished goods and raw materials in their respective warehouses click on <div style='font-weight:bold; display:inline'>" + next_step_list[i] + "</div>.");
- }
- cur_frm.append_tip("(To amend this "+ cur_frm.doctype + " click on the <div style='font-weight:bold; display:inline'>Cancel</div> button above.)");
- }
-
- // execute when doc is amended
- else if(doc.docstatus==2){
- cur_frm.set_tip("To make this " + cur_frm.doctype + " editable click on the <div style='font-weight:bold; display:inline'>Amend</div> button above.");
- }
- }
- }
-}
-
-
-// Execute if current doctype is Production Planning Tool
-// ======================================================
-cur_frm.cscript.get_PPT_tips = function(doc, cdt, cdn)
-{
- cur_frm.set_tip('Welcome to Production Planning Wizard. This helps you to raise production order and see your raw material status as you plan your production.');
- cur_frm.append_tip("To start fetch all open Production Orders and Sales Orders by clicking on the <div style='font-weight:bold; display:inline'>Get Open Documents</div> button in the <div style='font-weight:bold; display:inline'>Against Document</div> tab below");
-
- cur_frm.cscript['Get Open Documents'] = function(doc, cdt, cdn){
- cur_frm.set_tip("To include the required orders in the Production Plan check mark the <div style='font-weight:bold; display:inline'>Include In Plan</div> cell below.");
- cur_frm.append_tip("Next you can go to the <div style='font-weight:bold; display:inline'>Items</div> tab and click on <div style='font-weight:bold; display:inline'>Get Items</div> button to fetch the items of the selected orders.");
- }
-
- cur_frm.cscript['Get Items'] = function(doc, cdt, cdn){
- cur_frm.set_tip("Now to raise a Production Order just click on <div style='font-weight:bold; display:inline'>Raise Production Ordre</div> button below the table.");
- cur_frm.append_tip("In order to see the Raw Material Report click on <div style='font-weight:bold; display:inline'>Get Raw Material Report</div> button below the table.");
- }
-}
-
-
-// Executes when doc is edit status of doc is changed
-// ==================================================
-cur_frm.cscript.edit_status_changed = function(doc, cdt, cdn){
- cur_frm.cscript.get_tips();
-}
diff --git a/erpnext/utilities/doctype/production_tips_common/production_tips_common.txt b/erpnext/utilities/doctype/production_tips_common/production_tips_common.txt
deleted file mode 100644
index 13209ad..0000000
--- a/erpnext/utilities/doctype/production_tips_common/production_tips_common.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-# DocType, Production Tips Common
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:09:14',
- 'docstatus': 0,
- 'modified': '2010-09-20 14:06:57',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all DocType
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocType',
- 'issingle': 1,
- 'module': 'Utilities',
- 'name': '__common__',
- 'section_style': 'Simple',
- 'server_code_error': ' ',
- 'version': 37
- },
-
- # DocType, Production Tips Common
- {
- 'doctype': 'DocType',
- 'name': 'Production Tips Common'
- }
-]
\ No newline at end of file
diff --git a/erpnext/utilities/page/trash/trash.html b/erpnext/utilities/page/trash/trash.html
index 0fdca75..b17e475 100644
--- a/erpnext/utilities/page/trash/trash.html
+++ b/erpnext/utilities/page/trash/trash.html
@@ -1,2 +1,4 @@
-<div id="trash_header"> </div>
-<div id="trash_div" style="margin: 0px;"> </div>
\ No newline at end of file
+<div class="layout_wrapper">
+<div id="trash_header"></div>
+<div id="trash_div" style="margin: 0px;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/website/Module Def/Website/Website.txt b/erpnext/website/Module Def/Website/Website.txt
index 1fe0444..fa35cde 100644
--- a/erpnext/website/Module Def/Website/Website.txt
+++ b/erpnext/website/Module Def/Website/Website.txt
@@ -5,14 +5,13 @@
{
'creation': '2012-01-23 17:05:32',
'docstatus': 0,
- 'modified': '2012-01-27 14:30:06',
+ 'modified': '2012-01-30 12:19:11',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Module Def Role
{
- '__islocal': 1,
'doctype': 'Module Def Role',
'name': '__common__',
'parent': 'Website',
@@ -22,7 +21,6 @@
# These values are common for all Module Def Item
{
- '__islocal': 1,
'doctype': 'Module Def Item',
'name': '__common__',
'parent': 'Website',
@@ -72,30 +70,6 @@
# Module Def Item
{
- 'display_name': 'Top Bar Settings',
- 'doc_name': 'Top Bar Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Contact Us Settings',
- 'doc_name': 'Contact Us Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Home Settings',
- 'doc_name': 'Home Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
'display_name': 'About Us Settings',
'doc_name': 'About Us Settings',
'doc_type': 'Single DocType',
@@ -118,6 +92,14 @@
'doctype': 'Module Def Item'
},
+ # Module Def Item
+ {
+ 'display_name': 'Products Settings',
+ 'doc_name': 'Products Settings',
+ 'doc_type': 'Single DocType',
+ 'doctype': 'Module Def Item'
+ },
+
# Module Def Role
{
'doctype': 'Module Def Role',
diff --git a/erpnext/utilities/doctype/production_tips_common/__init__.py b/erpnext/website/doctype/product_group/__init__.py
similarity index 100%
rename from erpnext/utilities/doctype/production_tips_common/__init__.py
rename to erpnext/website/doctype/product_group/__init__.py
diff --git a/erpnext/website/doctype/product_group/product_group.txt b/erpnext/website/doctype/product_group/product_group.txt
new file mode 100644
index 0000000..b26ec13
--- /dev/null
+++ b/erpnext/website/doctype/product_group/product_group.txt
@@ -0,0 +1,57 @@
+# DocType, Product Group
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-01-30 12:17:12',
+ 'docstatus': 0,
+ 'modified': '2012-01-30 12:17:12',
+ 'modified_by': 'Administrator',
+ 'owner': 'Administrator'
+ },
+
+ # These values are common for all DocType
+ {
+ 'colour': 'White:FFF',
+ 'doctype': 'DocType',
+ 'istable': 1,
+ 'module': 'Website',
+ 'name': '__common__',
+ 'section_style': 'Simple',
+ 'show_in_menu': 0,
+ 'version': 1
+ },
+
+ # These values are common for all DocField
+ {
+ 'doctype': 'DocField',
+ 'name': '__common__',
+ 'parent': 'Product Group',
+ 'parentfield': 'fields',
+ 'parenttype': 'DocType',
+ 'permlevel': 0
+ },
+
+ # DocType, Product Group
+ {
+ 'doctype': 'DocType',
+ 'name': 'Product Group'
+ },
+
+ # DocField
+ {
+ 'doctype': 'DocField',
+ 'fieldname': 'item_group',
+ 'fieldtype': 'Link',
+ 'label': 'Item Group',
+ 'options': 'Item Group'
+ },
+
+ # DocField
+ {
+ 'doctype': 'DocField',
+ 'fieldname': 'label',
+ 'fieldtype': 'Data',
+ 'label': 'Label'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/production_tips_common/__init__.py b/erpnext/website/doctype/products_settings/__init__.py
similarity index 100%
copy from erpnext/utilities/doctype/production_tips_common/__init__.py
copy to erpnext/website/doctype/products_settings/__init__.py
diff --git a/erpnext/website/doctype/products_settings/products_settings.txt b/erpnext/website/doctype/products_settings/products_settings.txt
new file mode 100644
index 0000000..9e60f95
--- /dev/null
+++ b/erpnext/website/doctype/products_settings/products_settings.txt
@@ -0,0 +1,72 @@
+# DocType, Products Settings
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-01-30 12:15:00',
+ 'docstatus': 0,
+ 'modified': '2012-01-30 13:50:53',
+ 'modified_by': 'Administrator',
+ 'owner': 'Administrator'
+ },
+
+ # These values are common for all DocType
+ {
+ '_last_update': '1327906116',
+ 'colour': 'White:FFF',
+ 'description': 'Products are automatically updated from the item master. To add products to the website, go to the <a href="#!List/Item">Item master</a> and check "Show in Website" in the "Website Details"\n\n',
+ 'doctype': 'DocType',
+ 'issingle': 1,
+ 'module': 'Website',
+ 'name': '__common__',
+ 'section_style': 'Simple',
+ 'show_in_menu': 0,
+ 'version': 3
+ },
+
+ # These values are common for all DocField
+ {
+ 'colour': 'White:FFF',
+ 'description': 'Product Groups that are listed on the website. The first product group from this list will be listed by default on the "Products Page"',
+ 'doctype': 'DocField',
+ 'fieldname': 'groups',
+ 'fieldtype': 'Table',
+ 'label': 'Groups',
+ 'name': '__common__',
+ 'options': 'Product Group',
+ 'parent': 'Products Settings',
+ 'parentfield': 'fields',
+ 'parenttype': 'DocType',
+ 'permlevel': 0
+ },
+
+ # These values are common for all DocPerm
+ {
+ 'create': 1,
+ 'doctype': 'DocPerm',
+ 'name': '__common__',
+ 'parent': 'Products Settings',
+ 'parentfield': 'permissions',
+ 'parenttype': 'DocType',
+ 'permlevel': 0,
+ 'read': 1,
+ 'role': 'Website Manager',
+ 'write': 1
+ },
+
+ # DocType, Products Settings
+ {
+ 'doctype': 'DocType',
+ 'name': 'Products Settings'
+ },
+
+ # DocPerm
+ {
+ 'doctype': 'DocPerm'
+ },
+
+ # DocField
+ {
+ 'doctype': 'DocField'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/website/page/blog/blog.js b/erpnext/website/page/blog/blog.js
index f86e98d..6be1d07 100644
--- a/erpnext/website/page/blog/blog.js
+++ b/erpnext/website/page/blog/blog.js
@@ -1,4 +1,3 @@
-wn.require('lib/js/lib/prettydate.js')
pscript.onload_blog = function(wrapper) {
wrapper.blog_list = new wn.widgets.Listing({
diff --git a/erpnext/website/page/products/README.md b/erpnext/website/page/products/README.md
new file mode 100644
index 0000000..e40b446
--- /dev/null
+++ b/erpnext/website/page/products/README.md
@@ -0,0 +1,27 @@
+## Products
+
+Contains
+
+- List of Products tagged by Item master
+ - image
+ - short description (md)
+ - pricing info (if public) (public pricelist)
+ - stock info (website warehouse)
+- Search
+- Sidebar contains categories (# of items in each category)
+
+When Item is Saved, a page for that item is created with
+
+- Large image
+- Smaller images
+- Long Description
+- Pricing info
+- Stock info
+- Contact Button (instead of Buy / Add to cart)
+
+### Steps
+
+- update item master
+- update item category (show in web + priority) (or in a products settings page)
+- # of public items in each category
+- validation - item cannot have show in item if parent does not have it
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/production_tips_common/__init__.py b/erpnext/website/page/products/__init__.py
similarity index 100%
copy from erpnext/utilities/doctype/production_tips_common/__init__.py
copy to erpnext/website/page/products/__init__.py
diff --git a/erpnext/website/page/products/products.html b/erpnext/website/page/products/products.html
new file mode 100644
index 0000000..57f1354
--- /dev/null
+++ b/erpnext/website/page/products/products.html
@@ -0,0 +1,11 @@
+<div class="layout_wrapper" id="content-products">
+ <div class="web-main-section">
+ <h2 class="products-category"></h2>
+ <div class="products-search">
+ <input name="products-search" /><button class="btn">Search</button>
+ </div>
+ </div>
+ <div class="web-side-section">
+ <h3>Categories</h3>
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/website/page/products/products.js b/erpnext/website/page/products/products.js
new file mode 100644
index 0000000..993397d
--- /dev/null
+++ b/erpnext/website/page/products/products.js
@@ -0,0 +1,11 @@
+erpnext.products = {}
+
+pscript.onload_products = function(wrapper) {
+ // get erpnext.products.default_category
+
+ // make search box
+
+ // make main listing based on default category
+
+ // make sidelisting of categories
+}
\ No newline at end of file
diff --git a/erpnext/website/page/products/products.txt b/erpnext/website/page/products/products.txt
new file mode 100644
index 0000000..f00a05b
--- /dev/null
+++ b/erpnext/website/page/products/products.txt
@@ -0,0 +1,43 @@
+# Page, products
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-01-30 10:49:01',
+ 'docstatus': 0,
+ 'modified': '2012-01-30 10:49:01',
+ 'modified_by': 'Administrator',
+ 'owner': 'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': 'Website',
+ 'name': '__common__',
+ 'page_name': 'products',
+ 'standard': 'Yes',
+ 'title': 'Products'
+ },
+
+ # These values are common for all Page Role
+ {
+ 'doctype': 'Page Role',
+ 'name': '__common__',
+ 'parent': 'products',
+ 'parentfield': 'roles',
+ 'parenttype': 'Page',
+ 'role': 'Guest'
+ },
+
+ # Page, products
+ {
+ 'doctype': 'Page',
+ 'name': 'products'
+ },
+
+ # Page Role
+ {
+ 'doctype': 'Page Role'
+ }
+]
\ No newline at end of file
diff --git a/index.html b/index.html
index 6ab3b03..d758f2f 100644
--- a/index.html
+++ b/index.html
@@ -3,89 +3,16 @@
<meta charset="utf-8">
<title>ERPNext</title>
<meta name="author" content="">
- <script type="text/javascript">window._version_number="233";
+ <script type="text/javascript">window._version_number="249";
/*
* lib/js/wn/class.js
*/
-/*
-Inheritence "Class"
--------------------
-see: http://ejohn.org/blog/simple-javascript-inheritance/
-To subclass, use:
-
- var MyClass = Class.extend({
- init: function
- })
-
-*/
-
-/* Simple JavaScript Inheritance
- * By John Resig http://ejohn.org/
- * MIT Licensed.
- */
-// Inspired by base2 and Prototype
-
-(function(){
- var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
- // The base Class implementation (does nothing)
- this.Class = function(){};
-
- // Create a new Class that inherits from this class
- Class.extend = function(prop) {
- var _super = this.prototype;
-
- // Instantiate a base class (but only create the instance,
- // don't run the init constructor)
- initializing = true;
- var prototype = new this();
- initializing = false;
-
- // Copy the properties over onto the new prototype
- for (var name in prop) {
- // Check if we're overwriting an existing function
- prototype[name] = typeof prop[name] == "function" &&
- typeof _super[name] == "function" && fnTest.test(prop[name]) ?
- (function(name, fn){
- return function() {
- var tmp = this._super;
-
- // Add a new ._super() method that is the same method
- // but on the super-class
- this._super = _super[name];
-
- // The method only need to be bound temporarily, so we
- // remove it when we're done executing
- var ret = fn.apply(this, arguments);
- this._super = tmp;
-
- return ret;
- };
- })(name, prop[name]) :
- prop[name];
- }
-
- // The dummy class constructor
- function Class() {
- // All construction is actually done in the init method
- if ( !initializing && this.init )
- this.init.apply(this, arguments);
- }
-
- // Populate our constructed prototype object
- Class.prototype = prototype;
-
- // Enforce the constructor to be what we expect
- Class.prototype.constructor = Class;
-
- // And make this class extendable
- Class.extend = arguments.callee;
-
- return Class;
- };
-})();
-
+(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(prop){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];}
+function Class(){if(!initializing&&this.init)
+this.init.apply(this,arguments);}
+Class.prototype=prototype;Class.prototype.constructor=Class;Class.extend=arguments.callee;return Class;};})();
/*
* lib/js/wn/provide.js
*/
diff --git a/version.num b/version.num
index 0c56bea..cb16690 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-233
+249
\ No newline at end of file