From b665d862925d025b7e15a4a43b84e8e41f284a59 Mon Sep 17 00:00:00 2001 From: Akhilesh Darjee Date: Wed, 29 Jan 2014 17:40:34 +0530 Subject: [PATCH] patch to reload all sales and purchase doctypes and print formats --- .../purchase_common/purchase_common.js | 2 +- erpnext/patches.txt | 22 ++++------------- ...eload_purchase_doctype_and_print_format.py | 14 +++++++++++ .../reload_sales_doctype_and_print_format.py | 24 +++++++++++++++++++ erpnext/selling/sales_common.js | 2 +- .../Purchase Receipt Format.txt | 20 ---------------- 6 files changed, 45 insertions(+), 39 deletions(-) create mode 100644 erpnext/patches/4_0/reload_purchase_doctype_and_print_format.py create mode 100644 erpnext/patches/4_0/reload_sales_doctype_and_print_format.py delete mode 100644 erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 6739e1ea46..039165f891 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -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; \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 79644a854e..9843f870ba 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/erpnext/patches/4_0/reload_purchase_doctype_and_print_format.py b/erpnext/patches/4_0/reload_purchase_doctype_and_print_format.py new file mode 100644 index 0000000000..96d4fc6545 --- /dev/null +++ b/erpnext/patches/4_0/reload_purchase_doctype_and_print_format.py @@ -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') \ No newline at end of file diff --git a/erpnext/patches/4_0/reload_sales_doctype_and_print_format.py b/erpnext/patches/4_0/reload_sales_doctype_and_print_format.py new file mode 100644 index 0000000000..a435be39f3 --- /dev/null +++ b/erpnext/patches/4_0/reload_sales_doctype_and_print_format.py @@ -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') \ No newline at end of file diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 53be7196cf..fe78ee78ce 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -670,4 +670,4 @@ var set_sales_bom_help = function(doc) { } } refresh_field('sales_bom_help'); -} +} \ No newline at end of file diff --git a/erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt b/erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt deleted file mode 100644 index d39583e90f..0000000000 --- a/erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt +++ /dev/null @@ -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": "\n\n\n\n\n\n
\n\n
\n
\n

Purchase Receipt:
\n
Date:
\n
\n\n
\n
\n

\n
\n\n
\n
\n \n\n
\n\n\n
\n\n \n \n
\n
\n
\n

Payment Terms
\n

\n

For NCSCI
\n


(Authorised Signatory)
\n
\n", - "doctype": "Print Format" - }, - { - "name": "Purchase Receipt Format", - "doctype": "Print Format" - } -] \ No newline at end of file