diff --git a/erpnext/buying/doctype/indent/indent.js b/erpnext/buying/doctype/indent/indent.js index f690252a16..d9008ba30c 100644 --- a/erpnext/buying/doctype/indent/indent.js +++ b/erpnext/buying/doctype/indent/indent.js @@ -3,9 +3,10 @@ cur_frm.cscript.fname = "indent_details"; $import(Purchase Common) $import(SMS Control) +cur_frm.cscript.indent_doctype_label = get_doctype_label('Indent'); + //========================== On Load ================================================= cur_frm.cscript.onload = function(doc, cdt, cdn) { - if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date()) if (!doc.status) doc.status = 'Draft'; @@ -42,18 +43,18 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { } if(!is_closed) { cur_frm.add_custom_button('Make Purchase Order', cur_frm.cscript['Make Purchase Order']) - cur_frm.add_custom_button('Stop Indent', cur_frm.cscript['Stop Indent']) + cur_frm.add_custom_button('Stop ' + cur_frm.cscript.indent_doctype_label, cur_frm.cscript['Stop Purchase Requisition']) } cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); } if(doc.docstatus == 1 && doc.status == 'Stopped') - cur_frm.add_custom_button('Unstop Indent', cur_frm.cscript['Unstop Indent']) + cur_frm.add_custom_button('Unstop ' + cur_frm.cscript.indent_doctype_label, cur_frm.cscript['Unstop Purchase Requisition']) if(doc.docstatus == 1) - unhide_field(['Repair Indent']); + unhide_field(['Repair Purchase Requisition']); else - hide_field(['Repair Indent']); + hide_field(['Repair Purchase Requisition']); } //======================= validation =================================== @@ -71,7 +72,7 @@ cur_frm.cscript.transaction_date = function(doc,cdt,cdn){ cur_frm.cscript.qty = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if (flt(d.qty) < flt(d.min_order_qty)) - alert("Warning: Indent Qty is less than Minimum Order Qty"); + alert("Warning: " + cur_frm.cscript.indent_doctype_label + " Qty is less than Minimum Order Qty"); } // On Button Click Functions @@ -95,9 +96,9 @@ cur_frm.cscript['Make Purchase Order'] = function() { // Stop INDENT // ================================================================================================== -cur_frm.cscript['Stop Indent'] = function() { +cur_frm.cscript['Stop Purchase Requisition'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to STOP this Indent?"); + var check = confirm("Do you really want to STOP this " + cur_frm.cscript.indent_doctype_label + "?"); if (check) { $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': compress_doclist(make_doclist(doc.doctype, doc.name))}, function(r,rt) { @@ -108,9 +109,9 @@ cur_frm.cscript['Stop Indent'] = function() { // Un Stop INDENT //==================================================================================================== -cur_frm.cscript['Unstop Indent'] = function(){ +cur_frm.cscript['Unstop Purchase Requisition'] = function(){ var doc = cur_frm.doc - var check = confirm("Do you really want to UNSTOP this Indent?"); + var check = confirm("Do you really want to UNSTOP this " + cur_frm.cscript.indent_doctype_label + "?"); if (check) { $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': compress_doclist(make_doclist(doc.doctype, doc.name))}, function(r,rt) { diff --git a/erpnext/buying/doctype/indent/indent.txt b/erpnext/buying/doctype/indent/indent.txt index 6d9f5f6e86..d73492bee9 100644 --- a/erpnext/buying/doctype/indent/indent.txt +++ b/erpnext/buying/doctype/indent/indent.txt @@ -5,14 +5,14 @@ { 'creation': '2010-08-08 17:09:04', 'docstatus': 0, - 'modified': '2011-10-12 13:09:38', + 'modified': '2012-01-10 15:39:17', 'modified_by': 'Administrator', 'owner': 'Administrator' }, # These values are common for all DocType { - '_last_update': '1318404775', + '_last_update': '1326190064', 'allow_print': 0, 'colour': 'White:FFF', 'default_print_format': 'Standard', @@ -25,7 +25,7 @@ 'server_code_error': ' ', 'show_in_menu': 0, 'subject': '%(per_ordered)s% ordered', - 'version': 188 + 'version': 197 }, # These values are common for all DocField @@ -235,7 +235,7 @@ 'fieldname': 'transaction_date', 'fieldtype': 'Date', 'in_filter': 1, - 'label': 'Indent Date', + 'label': 'Transaction Date', 'no_copy': 1, 'oldfieldname': 'transaction_date', 'oldfieldtype': 'Date', @@ -249,7 +249,7 @@ # DocField { 'colour': 'White:FFF', - 'description': '% of materials ordered against this Indent', + 'description': '% of materials ordered against this Purchase Requisition', 'doctype': 'DocField', 'fieldname': 'per_ordered', 'fieldtype': 'Currency', @@ -273,7 +273,7 @@ # DocField { 'colour': 'White:FFF', - 'description': 'One or multiple Sales Order no which generated this Indent', + 'description': 'One or multiple Sales Order no which generated this Purchase Requisition', 'doctype': 'DocField', 'fieldname': 'sales_order_no', 'fieldtype': 'Link', @@ -302,7 +302,7 @@ 'doctype': 'DocField', 'fieldname': 'indent_details', 'fieldtype': 'Table', - 'label': 'Indent Details', + 'label': 'Purchase Requisition Details', 'no_copy': 0, 'oldfieldname': 'indent_details', 'oldfieldtype': 'Table', @@ -314,7 +314,7 @@ { 'colour': 'White:FFF', 'default': 'Give additional details about the indent.', - 'description': 'Filing in Additional Information about the Indent will help you analyze your data better.', + 'description': 'Filing in Additional Information about the Purchase Requisition will help you analyze your data better.', 'doctype': 'DocField', 'fieldtype': 'Section Break', 'label': 'More Info', @@ -362,7 +362,7 @@ # DocField { 'colour': 'White:FFF', - 'description': 'Name of the entity who has requested for the indent', + 'description': 'Name of the entity who has requested for the Purchase Requisition', 'doctype': 'DocField', 'fieldname': 'requested_by', 'fieldtype': 'Data', @@ -400,7 +400,7 @@ # DocField { 'colour': 'White:FFF', - 'description': 'After cancelling the indent, a dialog box will ask you reason for cancellation which will be reflected in this field', + 'description': 'After cancelling the Purchase Requisition, a dialog box will ask you reason for cancellation which will be reflected in this field', 'doctype': 'DocField', 'fieldname': 'cancel_reason', 'fieldtype': 'Data', @@ -443,7 +443,7 @@ # DocField { - 'description': 'Add Terms and Conditions for the Indent. You can also prepare a master Term Sheet and use the Template', + 'description': 'Add Terms and Conditions for the Purchase Requisition. You can also prepare a master Term Sheet and use the Template', 'doctype': 'DocField', 'fieldtype': 'Section Break', 'label': 'Terms', @@ -505,7 +505,7 @@ 'doctype': 'DocField', 'fieldname': 'terms', 'fieldtype': 'Text Editor', - 'label': 'Terms1', + 'label': 'Terms Content', 'oldfieldname': 'terms', 'oldfieldtype': 'Text Editor', 'permlevel': 0 @@ -526,7 +526,7 @@ 'colour': 'White:FFF', 'doctype': 'DocField', 'fieldtype': 'Button', - 'label': 'Repair Indent', + 'label': 'Repair Purchase Requisition', 'oldfieldtype': 'Button', 'options': 'repair_indent', 'permlevel': 0, diff --git a/erpnext/buying/doctype/po_detail/po_detail.txt b/erpnext/buying/doctype/po_detail/po_detail.txt index 1512666b03..4e17c222de 100755 --- a/erpnext/buying/doctype/po_detail/po_detail.txt +++ b/erpnext/buying/doctype/po_detail/po_detail.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:12', 'docstatus': 0, - 'modified': '2011-12-14 10:49:46', + 'modified': '2012-01-10 16:38:21', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -22,7 +22,7 @@ 'section_style': 'Tray', 'server_code_error': ' ', 'show_in_menu': 0, - 'version': 60 + 'version': 61 }, # These values are common for all DocField @@ -301,7 +301,7 @@ 'fieldtype': 'Link', 'hidden': 0, 'in_filter': 1, - 'label': 'Indent No', + 'label': 'Purchase Requisition No', 'no_copy': 0, 'oldfieldname': 'prevdoc_docname', 'oldfieldtype': 'Link', @@ -319,7 +319,7 @@ 'fieldtype': 'Date', 'hidden': 0, 'in_filter': 1, - 'label': 'Indent Date', + 'label': 'Purchase Requisition Date', 'oldfieldname': 'prevdoc_date', 'oldfieldtype': 'Date', 'permlevel': 1, @@ -335,7 +335,7 @@ 'fieldtype': 'Data', 'hidden': 1, 'in_filter': 1, - 'label': 'Indent Detail No', + 'label': 'Purchase Requisition Detail No', 'no_copy': 0, 'oldfieldname': 'prevdoc_detail_docname', 'oldfieldtype': 'Data', diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.txt b/erpnext/buying/doctype/purchase_order/purchase_order.txt index dde25fd39a..c367a3b680 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.txt +++ b/erpnext/buying/doctype/purchase_order/purchase_order.txt @@ -5,15 +5,25 @@ { 'creation': '2010-08-08 17:09:15', 'docstatus': 0, - 'modified': '2011-05-17 16:29:14', + 'modified': '2012-01-10 16:19:19', 'modified_by': 'Administrator', 'owner': 'Administrator' }, + # These values are common for all DocField + { + 'doctype': 'DocField', + 'name': '__common__', + 'parent': 'Purchase Order', + 'parentfield': 'fields', + 'parenttype': 'DocType' + }, + # These values are common for all DocType { '_last_update': '1306471022', 'colour': 'White:FFF', + 'default_print_format': 'Standard', 'doctype': 'DocType', 'document_type': 'Transaction', 'is_transaction_doc': 1, @@ -25,15 +35,15 @@ 'server_code_error': ' ', 'show_in_menu': 0, 'subject': 'To %(supplier_name)s on %(transaction_date)s | %(per_received)s% delivered', - 'version': 494 + 'version': 495 }, - # These values are common for all DocField + # These values are common for all DocFormat { - 'doctype': 'DocField', + 'doctype': 'DocFormat', 'name': '__common__', 'parent': 'Purchase Order', - 'parentfield': 'fields', + 'parentfield': 'formats', 'parenttype': 'DocType' }, @@ -53,13 +63,24 @@ 'name': 'Purchase Order' }, + # DocPerm + { + 'amend': 1, + 'cancel': 1, + 'create': 1, + 'doctype': 'DocPerm', + 'permlevel': 0, + 'role': 'Production Manager', + 'submit': 0, + 'write': 1 + }, + # DocPerm { 'amend': 0, 'cancel': 0, 'create': 0, 'doctype': 'DocPerm', - 'idx': 1, 'permlevel': 1, 'role': 'Material User', 'submit': 0, @@ -72,7 +93,6 @@ 'cancel': 0, 'create': 0, 'doctype': 'DocPerm', - 'idx': 2, 'permlevel': 0, 'role': 'Material User', 'submit': 0, @@ -85,7 +105,6 @@ 'cancel': 0, 'create': 0, 'doctype': 'DocPerm', - 'idx': 3, 'permlevel': 1, 'role': 'Purchase Manager', 'submit': 0, @@ -98,7 +117,6 @@ 'cancel': 1, 'create': 1, 'doctype': 'DocPerm', - 'idx': 4, 'permlevel': 0, 'role': 'Purchase Manager', 'submit': 1, @@ -111,7 +129,6 @@ 'cancel': 0, 'create': 1, 'doctype': 'DocPerm', - 'idx': 5, 'permlevel': 0, 'role': 'Purchase User', 'submit': 0, @@ -120,37 +137,64 @@ # DocPerm { + 'amend': 0, + 'cancel': 0, + 'create': 0, 'doctype': 'DocPerm', - 'idx': 6, 'permlevel': 1, - 'role': 'All' + 'role': 'All', + 'submit': 0, + 'write': 0 }, # DocPerm { + 'amend': 0, + 'cancel': 0, + 'create': 0, 'doctype': 'DocPerm', - 'idx': 7, - 'match': 'supplier', 'permlevel': 0, - 'role': 'Supplier' + 'role': 'Supplier', + 'submit': 0, + 'write': 0 }, # DocPerm { + 'amend': 0, + 'cancel': 0, + 'create': 0, 'doctype': 'DocPerm', - 'idx': 8, 'permlevel': 2, 'role': 'All', + 'submit': 0, 'write': 1 }, + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Purchase Order Classic' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Purchase Order Modern' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Purchase Order Spartan' + }, + # DocField { 'colour': 'White:FFF', 'description': 'Enter rates and quantity of items you want to purchase and send the purchase order to your supplier.', 'doctype': 'DocField', 'fieldtype': 'Section Break', - 'idx': 1, 'label': 'Basic Info', 'oldfieldtype': 'Section Break', 'permlevel': 0, @@ -161,7 +205,6 @@ { 'doctype': 'DocField', 'fieldtype': 'Column Break', - 'idx': 2, 'oldfieldtype': 'Column Break', 'permlevel': 0, 'width': '50%' @@ -174,7 +217,6 @@ 'doctype': 'DocField', 'fieldname': 'naming_series', 'fieldtype': 'Select', - 'idx': 3, 'label': 'Series', 'no_copy': 1, 'oldfieldname': 'naming_series', @@ -192,7 +234,6 @@ 'doctype': 'DocField', 'fieldname': 'supplier', 'fieldtype': 'Link', - 'idx': 4, 'in_filter': 1, 'label': 'Supplier', 'oldfieldname': 'supplier', @@ -210,7 +251,6 @@ 'doctype': 'DocField', 'fieldname': 'supplier_address', 'fieldtype': 'Link', - 'idx': 5, 'in_filter': 1, 'label': 'Supplier Address', 'options': 'Address', @@ -223,7 +263,6 @@ 'doctype': 'DocField', 'fieldname': 'contact_person', 'fieldtype': 'Link', - 'idx': 6, 'in_filter': 1, 'label': 'Contact Person', 'options': 'Contact', @@ -236,7 +275,6 @@ 'doctype': 'DocField', 'fieldname': 'supplier_name', 'fieldtype': 'Data', - 'idx': 7, 'label': 'Name', 'permlevel': 1 }, @@ -246,7 +284,6 @@ 'doctype': 'DocField', 'fieldname': 'address_display', 'fieldtype': 'Small Text', - 'idx': 8, 'label': 'Address', 'permlevel': 1 }, @@ -256,7 +293,6 @@ 'doctype': 'DocField', 'fieldname': 'contact_display', 'fieldtype': 'Small Text', - 'idx': 9, 'label': 'Contact', 'permlevel': 1 }, @@ -266,7 +302,6 @@ 'doctype': 'DocField', 'fieldname': 'contact_mobile', 'fieldtype': 'Text', - 'idx': 10, 'label': 'Mobile No', 'permlevel': 1 }, @@ -276,7 +311,6 @@ 'doctype': 'DocField', 'fieldname': 'contact_email', 'fieldtype': 'Text', - 'idx': 11, 'label': 'Contact Email', 'permlevel': 1, 'print_hide': 1 @@ -286,7 +320,6 @@ { 'doctype': 'DocField', 'fieldtype': 'Column Break', - 'idx': 12, 'oldfieldtype': 'Column Break', 'permlevel': 0, 'print_hide': 0, @@ -300,7 +333,6 @@ 'doctype': 'DocField', 'fieldname': 'transaction_date', 'fieldtype': 'Date', - 'idx': 13, 'in_filter': 1, 'label': 'Purchase Order Date', 'oldfieldname': 'transaction_date', @@ -317,7 +349,6 @@ 'doctype': 'DocField', 'fieldname': 'status', 'fieldtype': 'Select', - 'idx': 14, 'in_filter': 1, 'label': 'Status', 'no_copy': 1, @@ -337,7 +368,6 @@ 'doctype': 'DocField', 'fieldname': 'project_name', 'fieldtype': 'Link', - 'idx': 15, 'in_filter': 1, 'label': 'Project Name', 'oldfieldname': 'project_name', @@ -356,7 +386,6 @@ 'doctype': 'DocField', 'fieldname': 'per_received', 'fieldtype': 'Currency', - 'idx': 16, 'label': '% Received', 'no_copy': 1, 'oldfieldname': 'per_received', @@ -373,7 +402,6 @@ 'doctype': 'DocField', 'fieldname': 'per_billed', 'fieldtype': 'Currency', - 'idx': 17, 'label': '% Billed', 'no_copy': 1, 'oldfieldname': 'per_billed', @@ -387,7 +415,6 @@ 'colour': 'White:FFF', 'doctype': 'DocField', 'fieldtype': 'Section Break', - 'idx': 18, 'label': 'Items', 'oldfieldtype': 'Section Break', 'permlevel': 0 @@ -396,13 +423,12 @@ # DocField { 'colour': 'White:FFF', - 'description': 'You can make a purchase order from multiple indents. Select indents one by one and click on the button below.', + 'description': 'You can make a purchase order from multiple Purchase Requisitions. Select Purchase Requisitions one by one and click on the button below.', 'doctype': 'DocField', 'fieldname': 'indent_no', 'fieldtype': 'Link', 'hidden': 0, - 'idx': 19, - 'label': 'Select Indent', + 'label': 'Select Purchase Requisition', 'no_copy': 1, 'oldfieldname': 'indent_no', 'oldfieldtype': 'Link', @@ -416,7 +442,6 @@ 'doctype': 'DocField', 'fieldtype': 'Button', 'hidden': 0, - 'idx': 20, 'label': 'Get Items', 'oldfieldtype': 'Button', 'options': 'get_indent_details', @@ -428,7 +453,6 @@ 'doctype': 'DocField', 'fieldname': 'is_subcontracted', 'fieldtype': 'Select', - 'idx': 21, 'label': 'Is Subcontracted', 'options': '\nYes\nNo', 'permlevel': 0, @@ -439,7 +463,6 @@ { 'doctype': 'DocField', 'fieldtype': 'Column Break', - 'idx': 22, 'permlevel': 0, 'width': '50%' }, @@ -451,7 +474,6 @@ 'doctype': 'DocField', 'fieldname': 'currency', 'fieldtype': 'Select', - 'idx': 23, 'label': 'Currency', 'no_copy': 0, 'oldfieldname': 'currency', @@ -471,7 +493,6 @@ 'fieldname': 'conversion_rate', 'fieldtype': 'Currency', 'hidden': 0, - 'idx': 24, 'label': 'Conversion Rate', 'no_copy': 1, 'oldfieldname': 'conversion_rate', @@ -486,7 +507,6 @@ { 'doctype': 'DocField', 'fieldtype': 'Section Break', - 'idx': 25, 'permlevel': 0 }, @@ -496,7 +516,6 @@ 'doctype': 'DocField', 'fieldname': 'po_details', 'fieldtype': 'Table', - 'idx': 26, 'label': 'PO Details', 'no_copy': 0, 'oldfieldname': 'po_details', @@ -510,7 +529,6 @@ 'colour': 'White:FFF', 'doctype': 'DocField', 'fieldtype': 'Button', - 'idx': 27, 'label': 'Get Last Purchase Rate', 'oldfieldtype': 'Button', 'permlevel': 0, @@ -523,7 +541,6 @@ 'doctype': 'DocField', 'fieldname': 'net_total', 'fieldtype': 'Currency', - 'idx': 28, 'label': 'Net Total*', 'no_copy': 1, 'oldfieldname': 'net_total', @@ -537,7 +554,6 @@ { 'doctype': 'DocField', 'fieldtype': 'Button', - 'idx': 29, 'label': 'Re-Calculate Values', 'oldfieldtype': 'Button', 'permlevel': 0, @@ -549,7 +565,6 @@ 'colour': 'White:FFF', 'doctype': 'DocField', 'fieldtype': 'HTML', - 'idx': 30, 'label': 'Note HTML', 'options': '