patch to reload all sales and purchase doctypes and print formats

This commit is contained in:
Akhilesh Darjee 2014-01-29 17:40:34 +05:30
parent 4f7215662d
commit b665d86292
6 changed files with 45 additions and 39 deletions

View File

@ -478,4 +478,4 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
});
var tname = cur_frm.cscript.tname;
var fname = cur_frm.cscript.fname;
var fname = cur_frm.cscript.fname;

View File

@ -3,20 +3,8 @@ erpnext.patches.4_0.update_user_properties
erpnext.patches.4_0.move_warehouse_user_to_restrictions
erpnext.patches.4_0.new_permissions
erpnext.patches.4_0.update_incharge_name_to_sales_person_in_maintenance_schedule
execute:webnotes.reload_doc('accounts', 'doctype', 'sales_invoice') # 2014-01-03
execute:webnotes.reload_doc('selling', 'doctype', 'sales_order') # 2014-01-03
execute:webnotes.reload_doc('selling', 'doctype', 'quotation') # 2014-01-03
execute:webnotes.reload_doc('stock', 'doctype', 'delivery_note') # 2014-01-03
execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2014-01-03
execute:webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Classic') # 2014-01-03
execute:webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Modern') # 2014-01-03
execute:webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Spartan') # 2014-01-03
execute:webnotes.reload_doc('selling', 'Print Format', 'Quotation Classic') # 2014-01-03
execute:webnotes.reload_doc('selling', 'Print Format', 'Quotation Modern') # 2014-01-03
execute:webnotes.reload_doc('selling', 'Print Format', 'Quotation Spartan') # 2014-01-03
execute:webnotes.reload_doc('selling', 'Print Format', 'Sales Order Classic') # 2014-01-03
execute:webnotes.reload_doc('selling', 'Print Format', 'Sales Order Modern') # 2014-01-03
execute:webnotes.reload_doc('selling', 'Print Format', 'Sales Order Spartan') # 2014-01-03
execute:webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Classic') # 2014-01-03
execute:webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Modern') # 2014-01-03
execute:webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Spartan') # 2014-01-03
erpnext.patches.4_0.reload_sales_doctype_and_print_format
erpnext.patches.4_0.reload_purchase_doctype_and_print_format
execute:webnotes.reload_doc('accounts', 'doctype', 'pos_setting') # 2014-01-29
execute:webnotes.reload_doc('selling', 'doctype', 'customer') # 2014-01-29
execute:webnotes.reload_doc('buying', 'doctype', 'supplier') # 2014-01-29

View File

@ -0,0 +1,14 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
def execute():
webnotes.reload_doc('accounts', 'doctype', 'purchase_invoice')
webnotes.reload_doc('buying', 'doctype', 'purchase_order')
webnotes.reload_doc('buying', 'doctype', 'supplier_quotation')
webnotes.reload_doc('stock', 'doctype', 'purchase_receipt')
webnotes.reload_doc('buying', 'Print Format', 'Purchase Order Classic')
webnotes.reload_doc('buying', 'Print Format', 'Purchase Order Modern')
webnotes.reload_doc('buying', 'Print Format', 'Purchase Order Spartan')

View File

@ -0,0 +1,24 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
def execute():
webnotes.reload_doc('accounts', 'doctype', 'sales_invoice')
webnotes.reload_doc('selling', 'doctype', 'sales_order')
webnotes.reload_doc('selling', 'doctype', 'quotation')
webnotes.reload_doc('stock', 'doctype', 'delivery_note')
webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice')
webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Classic')
webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Modern')
webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Spartan')
webnotes.reload_doc('selling', 'Print Format', 'Quotation Classic')
webnotes.reload_doc('selling', 'Print Format', 'Quotation Modern')
webnotes.reload_doc('selling', 'Print Format', 'Quotation Spartan')
webnotes.reload_doc('selling', 'Print Format', 'Sales Order Classic')
webnotes.reload_doc('selling', 'Print Format', 'Sales Order Modern')
webnotes.reload_doc('selling', 'Print Format', 'Sales Order Spartan')
webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Classic')
webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Modern')
webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Spartan')

View File

@ -670,4 +670,4 @@ var set_sales_bom_help = function(doc) {
}
}
refresh_field('sales_bom_help');
}
}

View File

@ -1,20 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2010-08-08 17:09:34",
"modified_by": "Administrator",
"modified": "2011-10-19 14:18:26"
},
{
"name": "__common__",
"module": "Stock",
"standard": "Yes",
"html": "<html>\n<head>\n<!--Other charges function-->\n<script>\n var make_row = function(title,val,bold){\n var bstart = '<b>'; var bend = '</b>';\n return '<tr><td style=\"width:50%\">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'\n +'<td style=\"width:20%;text-align:right\">'+doc.currency+'</td>'\n +'<td style=\"width:30%;text-align:right\">'+(val?val:'0.00')+'</td>'\n +'</tr>'\n }\n\n function get_other_charges(){\n var out ='';\n out += '<div><table class=\"noborder\" style=\"width:100%\">';\n out += make_row('Total Amount',fmt_money(convert_rate(doc.total_amount)),1)\n +make_row('Grand Total',fmt_money(convert_rate(doc.grand_total)),1);\n out += '</table></div>';\n return out;\n }\n\n function get_buying_costs(){\n var out ='';\n if(doc.buying_cost_transport || doc.buying_cost_taxes || doc.buying_cost_other){\n out += '<div><table class=\"noborder\" style=\"width:100%\">'\n + '<tr><td style=\"width:100%\"><b>'+'Buying Cost Details'+'</b></td></tr>';\n if(doc.buying_cost_transport){ out += make_row('Transport Cost',fmt_money(convert_rate(doc.buying_cost_transport)),0)}\n if(doc.buying_cost_taxes){ out += make_row('Taxes',fmt_money(convert_rate(doc.buying_cost_taxes)),0)}\n if(doc.buying_cost_other){ out += make_row('Other Cost',fmt_money(convert_rate(doc.buying_cost_other)),0)}\n out += '</table></div>';\n }\n return out;\n }\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals['Control Panel']['Control Panel'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= '';\n\t\t\n\treturn lh;\n}\n\n \n function convert_rate(val){\n var new_val = flt(val)/flt(doc.conversion_rate);\n return new_val;\n }\n \n function get_transport_details(){\n var out = '';\n if(doc.transporter_name || doc.lr_no || doc.lr_date){\n out += '<div><table class=\"noborder\" style=\"width:40%\">'\n +'<tr><td style=\"width:80%\"><b>' + 'Transporter Details'+'</b></td><td style=\"width:20%\"></td></tr>'\n\n if(doc.transporter_name){ out += '<tr><td style=\"width:40%\">' + 'Transporter Name'+'</td><td style=\"width:60%\">'+doc.transporter_name+'</td></tr>'}\n if(doc.lr_no){ out += '<tr><td style=\"width:40%\">' + 'LR No'+'</td><td style=\"width:60%\">'+doc.lr_no+'</td></tr>'}\n if(doc.lr_date){ out += '<tr><td style=\"width:40%\">' + 'LR Date'+'</td><td style=\"width:60%\">'+doc.lr_date+'</td></tr>'}\n out += '</table></div>'\n }\n return out;\n }\n\n</script>\n</head>\n<body>\n<div style=\"border:1px solid black;padding:15px\">\n<!--header-->\n<div><script>get_letter_head()</script></div>\n<div style=\"border-bottom: 1px solid; padding-bottom: 5px;\">\n <div><br><b>Purchase Receipt: <script>doc.name</script></b></div>\n <div>Date: <script>date.str_to_user(doc.transaction_date)</script></div>\n</div>\n\n<div style=\"padding-top:15px\">\n<div><script>doc.supplier</script></div>\n<div><br><script>replace_newlines(doc.address_display)</script></div>\n</div>\n\n<div>\n<br>\n <script>\n var t = print_table('Purchase Receipt', doc.name, 'purchase_receipt_details', 'Purchase Receipt Item', ['SR', 'item_code','description','received_qty','qty','rejected_qty','po_rate','amount','billed_qty'], ['Sr', 'Item Code', 'Description','Received Quantity','Accepted Qty','Rejected Qty','Rate','Amount','Billed Qty'], ['4%','12%', '24%', '10%','10%','10%','10%','10%','10%'])\n if(t.appendChild) {\n // single\n out = t.innerHTML;\n } \n else {//multiple\n out = ''\n for(var i=0;i<t.length;i++) {\n if(i!=t.length-1){\n out += '<div style:\"padding-top:5px;\"></div>' + t[i].innerHTML +'<div style=\"page-break-after:always\"></div>';\n }\n else out += '<div style:\"padding-top:5px;\"></div>' + t[i].innerHTML;\n }\n }\n out;\n </script>\n\n</div>\n\n<!--Other charges table-->\n<div>\n<table style=\"width:100%\">\n <tr><td style=\"width:40%\"><script>get_buying_costs()</script></td>\n <td style=\"width:20%\"></td><td style=\"width:40%\"><script>get_other_charges()</script></td></tr>\n</table>\n</div>\n<div><script>get_transport_details()</script></div>\n<div><br>Payment Terms</div>\n<div><br><script>replace_newlines(doc.payment_terms)</script></div>\n<div><br>For NCSCI</div>\n<div><br><br>(Authorised Signatory)</div>\n</div></body>\n</html>",
"doctype": "Print Format"
},
{
"name": "Purchase Receipt Format",
"doctype": "Print Format"
}
]