diff --git a/docs/docs.user.stock.accounting_for_stock.md b/docs/docs.user.stock.accounting_for_stock.md deleted file mode 100644 index bf91fe5ce2..0000000000 --- a/docs/docs.user.stock.accounting_for_stock.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -{ - "_label": "Accounting of Inventory / Stock" -} ---- - -The value of available inventory is treated as an Asset in company's Chart of Accounts. Depending on the type of items, it can be treated as Fixed Asset or Current Asset. To prepare Balance Sheet, you should make the accounting entries for those assets. -There are generally two different methods of accounting for inventory: - - -### **Auto / Perpetual Inventory** - -In this process, for each stock transactions, the system posts relevant accounting entries to sync stock balance and accounting balance. This is the default setting in ERPNext for new accounts. - -When you buy and receive items, those items are booked as the company’s assets (stock-in-hand / fixed-assets). When you sell and deliver those items, an expense (cost-of-goods-sold) equal to the buying cost of the items is booked. General Ledger entries are made after every stock transaction. As a result, the value as per Stock Ledger always remains same with the relevant account balance. This improves accuracy of Balance Sheet and Profit and Loss statement. - -To check accounting entries for a particular stock transaction, please check [**examples**](docs.user.stock.perpetual_inventory.html) - -#### **Advantages** - -Perpetual Inventory system will make it easier for you to maintain accuracy of company's asset and expense values. Stock balances will always be synced with relevant account balances, so no more periodic manual entry has to be done to balance them. - -In case of new back-dated stock transactions or cancellation/amendment of an existing transaction, all the future Stock Ledger entries and GL Entries will be recalculated for all items of that transaction. -The same is applicable if any cost is added to the submitted Purchase Receipt, later through the Landed Cost Wizard. - ->Note: Perpetual Inventory totally depends upon the item valuation rate. Hence, you have to be more careful entering valuation rate while making any incoming stock transactions like Purchase Receipt, Material Receipt, or Manufacturing / Repack. - -- - -### **Periodic Inventory** - -In this method, accounting entries are manually created periodically, to sync stock balance and relevant account balance. The system does not create accounting entries automatically for assets, at the time of material purchases or sales. - -In an accounting period, when you buy and receive items, an expense is booked in your accounting system. You sell and deliver some of these items. - -At the end of an accounting period, the total value of items to be sold, need to be booked as the company’s assets, often known as stock-in-hand. - -The difference between the value of the items remaining to be sold and the previous period’s stock-in-hand value can be positive or negative. If positive, this value is removed from expenses (cost-of-goods-sold) and is added to assets (stock-in-hand / fixed-assets). If negative, a reverse entry is passed. - -This complete process is called Periodic Inventory. - -If you are an existing user using Periodic Inventory and want to use Perpetual Inventory, you have to follow some steps to migrate. For details, check [**Migration From Periodic Inventory**](docs.user.stock.perpetual_inventory.html) diff --git a/docs/docs.user.stock.perpetual_inventory.md b/docs/docs.user.stock.perpetual_inventory.md deleted file mode 100644 index eb10326ecb..0000000000 --- a/docs/docs.user.stock.perpetual_inventory.md +++ /dev/null @@ -1,313 +0,0 @@ ---- -{ - "_label": "Perpetual Inventory" -} ---- - -In perpetual inventory, system creates accounting entries for each stock transactions, so that stock and account balance will always remain same. The account balance will be posted against their respective account heads for each Warehouse. On saving of a Warehouse, the system will automatically create an account head with the same name as warehouse. As account balance is maintained for each Warehouse, you should create Warehouses, based on the type of items (Current / Fixed Assets) it stores. - -At the time of items received in a particular warehouse, the balance of asset account (linked to that warehouse) will be increased. Similarly when you deliver some items from that warehouse, an expense will be booked and the asset account will be reduced, based on the valuation amount of those items. - - -## **Activation** - -1. Setup the following default accounts for each Company - - Stock Received But Not Billed - - Stock Adjustment Account - - Expenses Included In Valuation - - Cost Center - -2. In perpetual inventory, the system will maintain seperate account balance for each warehouse under separate account head. To create that account head, enter "Create Account Under" in Warehouse master. - -3. Activate Perpetual Inventory -> Setup > Accounts Settings > Make Accounting Entry For Every Stock Movement - - -- - -## **Example** - -Consider following Chart of Accounts and Warehouse setup for your company: - -#### Chart of Accounts - -- Assets (Dr) - - Current Assets - - Accounts Receivable - - Jane Doe - - Stock Assets - - Stores - - Finished Goods - - Work In Progress - - Tax Assets - - VAT - - Fixed Assets - - Fixed Asset Warehouse -- Liabilities (Cr) - - Current Liabilities - - Accounts Payable - - East Wind Inc. - - Stock Liabilities - - Stock Received But Not Billed - - Tax Liabilities - - Service Tax -- Income (Cr) - - Direct Income - - Sales Account -- Expenses (Dr) - - Direct Expenses - - Stock Expenses - - Cost of Goods Sold - - Expenses Included In Valuation - - Stock Adjustment - - Shipping Charges - - Customs Duty - -#### Warehouse - Account Configuration - -- Stores -- Work In Progress -- Finished Goods -- Fixed Asset Warehouse - -### **Purchase Receipt** - -Suppose you have purchased *10 nos* of item "RM0001" at *$200* and *5 nos* of item "Desktop" at **$100** from supplier "East Wind Inc". Following are the details of Purchase Receipt: - -Supplier: East Wind Inc. - -Items: - - - - - - - - - - - - - - - - -
ItemWarehouseQtyRateAmountValuation Amount
RM0001Stores1020020002200
DesktopFixed Asset Warehouse5100500550
- -**Taxes:** - - - - - - - - - - -
AccountAmountCategory
Shipping Charges100Total and Valuation
VAT120Total
Customs Duty150Valuation
- -**Stock Ledger** - -![pr_stock_ledger](img/accounting-for-stock-2.png) - -**General Ledger** - -![pr_general_ledger](img/accounting-for-stock-3.png) - -As stock balance increases through Purchase Receipt, "Store" and "Fixed Asset Warehouse" accounts are debited and a temporary account "Stock Receipt But Not Billed" account is credited, to maintain double entry accounting system. - - --- - -### **Purchase Invoice** - -On receiving Bill from supplier, for the above Purchase Receipt, you will make Purchase Invoice for the same. The general ledger entries are as follows: - -**General Ledger** - -![pi_general_ledger](img/accounting-for-stock-4.png) - - -Here "Stock Received But Not Billed" account is debited and nullified the effect of Purchase Receipt. "Expenses Included In Valuation" account has been credited which ensures the valuation expense accounts are not booked (debited) twice (in Purchase Invoice and Delivery Note). - --- - -### **Delivery Note** - -Lets say, you have an order from "Jane Doe" to deliver 5 nos of item "RM0001" at $300. Following are the details of Delivery Note: - -**Customer:** Jane Doe - -**Items:** - - - - - - - -
ItemWarehouseQtyRateAmount
RM0001Stores53001500
- -**Taxes:** - - - - - - - - - -
AccountAmount
Service Tax150
VAT100
- - -**Stock Ledger** - -![dn_stock_ledger](img/accounting-for-stock-5.png) - -**General Ledger** - -![dn_general_ledger](img/accounting-for-stock-6.png) - -As item is delivered from "Stores" warehouse, "Stores" account is credited and equal amount is debited to the expense account "Cost of Goods Sold". The debit/credit amount is equal to the total valuation amount (buying cost) of the selling items. And valuation amount is calculated based on your prefferred valuation method (FIFO / Moving Average) or actual cost of serialized items. -
-	
-In this example, we have considered valuation method as FIFO. 
-Valuation Rate 	= Purchase Rate + Charges Included in Valuation 
-				= 200 + (250 * (2000 / 2500) / 10) 
-				= 220
-Total Valuation Amount 	= 220 * 5 
-						= 1100
-	
-
- --- - -### **Sales Invoice with Update Stock** - -Lets say, you did not make Delivery Note against the above order and instead you have made Sales Invoice directly, with "Update Stock" options. The details of the Sales Invoice are same as the above Delivery Note. - -**Stock Ledger** - -![si_stock_ledger](img/accounting-for-stock-7.png) - -**General Ledger** - -![si_general_ledger](img/accounting-for-stock-8.png) - -Here, apart from normal account entries for invoice, "Stores" and "Cost of Goods Sold" accounts are also affected based on the valuation amount. - --- - -### **Stock Entry (Material Receipt)** - -**Items:** - - - - - - - -
ItemTarget WarehouseQtyRateAmount
RM0001Stores5022011000
- -**Stock Ledger** - -![mr_stock_ledger](img/accounting-for-stock-9.png) - -**General Ledger** - -![mr_stock_ledger](img/accounting-for-stock-10.png) - --- - -### **Stock Entry (Material Issue)** - -**Items:** - - - - - - - -
ItemSource WarehouseQtyRateAmount
RM0001Stores102202200
- -**Stock Ledger** - -![mi_stock_ledger](img/accounting-for-stock-11.png) - -**General Ledger** - -![mi_stock_ledger](img/accounting-for-stock-12.png) - --- - -### **Stock Entry (Material Transfer)** - -**Items:** - - - - - - - - - -
ItemSource WarehouseTarget WarehouseQtyRateAmount
RM0001StoresWork In Progress102202200
- -**Stock Ledger** - -![mtn_stock_ledger](img/accounting-for-stock-13.png) - -**General Ledger** - -![mtn_general_ledger](img/accounting-for-stock-14.png) - --- - -### **Stock Entry (Sales Return - Sales Invoice booked)** - -**Items:** - - - - - - - -
ItemTarget WarehouseQtyRateAmount
RM0001Stores2200400
- -**Stock Ledger** - -![sret_stock_ledger](img/accounting-for-stock-15.png) - -**General Ledger** - -![sret_general_ledger](img/accounting-for-stock-16.png) - - --- - -### **Stock Entry (Purchase Return)** - -**Items:** - - - - - - - -
ItemSource WarehouseQtyRateAmount
RM0001Stores4220880
- -**Stock Ledger** - -![pret_stock_ledger](img/accounting-for-stock-17.png) - -**General Ledger** - -![pret_general_ledger](img/accounting-for-stock-18.png) diff --git a/docs/user/accounts/docs.user.accounts.reports.md b/docs/user/accounts/docs.user.accounts.reports.md index 24fb3b36e0..5806875cb7 100644 --- a/docs/user/accounts/docs.user.accounts.reports.md +++ b/docs/user/accounts/docs.user.accounts.reports.md @@ -1,6 +1,6 @@ --- { - "_label": "Reports" + "_label": "Accounting Reports" } --- Some of the major accounting reports are: diff --git a/docs/user/customer_portal/docs.user.customer_portal.login.md b/docs/user/customer_portal/docs.user.customer_portal.login.md index c0c5e78d7c..a41d0b2f7b 100644 --- a/docs/user/customer_portal/docs.user.customer_portal.login.md +++ b/docs/user/customer_portal/docs.user.customer_portal.login.md @@ -1,6 +1,6 @@ --- { - "_label": "Login" + "_label": "Portal Login" } --- To login into the customer account, the customer has to use his email id and the password sent by ERPNext; generated through the sign-up process. diff --git a/docs/user/customer_portal/docs.user.customer_portal.md b/docs/user/customer_portal/docs.user.customer_portal.md index fc886f1dfa..54d6e30fba 100644 --- a/docs/user/customer_portal/docs.user.customer_portal.md +++ b/docs/user/customer_portal/docs.user.customer_portal.md @@ -4,7 +4,7 @@ "_toc": [ "docs.user.customer_portal.sign_up", "docs.user.customer_portal.login", - "docs.user.customer_portal.orders", + "docs.user.customer_portal.order", "docs.user.customer_portal.tickets" ] } diff --git a/docs/user/customize/docs.user.customize.modules.md b/docs/user/customize/docs.user.customize.modules.md deleted file mode 100644 index 8bd21b68da..0000000000 --- a/docs/user/customize/docs.user.customize.modules.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -{ - "_label": "Hiding Modules and Features " -} ---- -### Hiding Unused Features - -As you have seen from this manual that ERPNext contains tons of features which you may not use. We have observed that most users start with using 20% of the features, though a different 20%. To hide fields belonging to features you dont require, go to: - -> Setup > Customize ERPNext > Disable Features. - -Check / uncheck the features you want to use and refresh your page for the changes to take effect. - ---- - -### Hiding Module Icons - -To hide modules (icons) from the home page, go to: - -Setup > Customize ERPNext > Modules Setup - -> Note: Modules are automatically hidden for users that have no permissions on the documents within that module. For example, if a user has no permissions on Purchase Order, Purchase Request, Supplier, the “Buying” module will automatically be hidden. diff --git a/docs/user/projects/docs.user.projects.md b/docs/user/projects/docs.user.projects.md index beeeb0b53a..5c5bdf71c3 100644 --- a/docs/user/projects/docs.user.projects.md +++ b/docs/user/projects/docs.user.projects.md @@ -2,7 +2,7 @@ { "_label": "Projects", "_toc": [ - "docs.user.projects.projects", + "docs.user.projects.project", "docs.user.projects.task", "docs.user.projects.timelog" ] diff --git a/docs/user/projects/docs.user.projects.projects.md b/docs/user/projects/docs.user.projects.projects.md index 9bcda3d2d8..5376b0af32 100644 --- a/docs/user/projects/docs.user.projects.projects.md +++ b/docs/user/projects/docs.user.projects.projects.md @@ -1,6 +1,6 @@ --- { - "_label": "Projects" + "_label": "Project" } --- diff --git a/docs/user/website/docs.user.website.blog.md b/docs/user/website/docs.user.website.blog_post.md similarity index 96% rename from docs/user/website/docs.user.website.blog.md rename to docs/user/website/docs.user.website.blog_post.md index b71836e016..706492febd 100644 --- a/docs/user/website/docs.user.website.blog.md +++ b/docs/user/website/docs.user.website.blog_post.md @@ -1,6 +1,6 @@ --- { - "_label": "Blog" + "_label": "Blog Post" } --- Blogs are a great way to share your thoughts about your business and keep your customers and readers updated of what you are up to. diff --git a/docs/user/website/docs.user.website.md b/docs/user/website/docs.user.website.md index 2e9cfc2772..60d4b157b9 100644 --- a/docs/user/website/docs.user.website.md +++ b/docs/user/website/docs.user.website.md @@ -5,7 +5,7 @@ "docs.user.website.setup", "docs.user.website.web_page", "docs.user.website.style", - "docs.user.website.blog", + "docs.user.website.blog_post", "docs.user.website.add_products_to_website" ] } diff --git a/hr/doctype/leave_application/test_leave_application.py b/hr/doctype/leave_application/test_leave_application.py index 7a900e3bfe..48b502eb7a 100644 --- a/hr/doctype/leave_application/test_leave_application.py +++ b/hr/doctype/leave_application/test_leave_application.py @@ -8,7 +8,7 @@ from hr.doctype.leave_application.leave_application import LeaveDayBlockedError, class TestLeaveApplication(unittest.TestCase): def tearDown(self): - webnotes.session.user = "Administrator" + webnotes.set_user("Administrator") def _clear_roles(self): webnotes.conn.sql("""delete from `tabUserRole` where parent in @@ -19,7 +19,7 @@ class TestLeaveApplication(unittest.TestCase): def _add_employee_leave_approver(self, employee, leave_approver): temp_session_user = webnotes.session.user - webnotes.session.user = "Administrator" + webnotes.set_user("Administrator") employee = webnotes.bean("Employee", employee) employee.doclist.append({ "doctype": "Employee Leave Approver", @@ -27,7 +27,7 @@ class TestLeaveApplication(unittest.TestCase): "leave_approver": leave_approver }) employee.save() - webnotes.session.user = temp_session_user + webnotes.set_user(temp_session_user) def get_application(self, doclist): application = webnotes.bean(copy=doclist) @@ -49,7 +49,7 @@ class TestLeaveApplication(unittest.TestCase): application.doc.status = "Approved" self.assertRaises(LeaveDayBlockedError, application.submit) - webnotes.session.user = "test1@example.com" + webnotes.set_user("test1@example.com") # clear other applications webnotes.conn.sql("delete from `tabLeave Application`") @@ -65,7 +65,7 @@ class TestLeaveApplication(unittest.TestCase): add_role("test@example.com", "Employee") add_role("test2@example.com", "Leave Approver") - webnotes.session.user = "test@example.com" + webnotes.set_user("test@example.com") application = self.get_application(test_records[1]) application.doc.leave_approver = "test2@example.com" application.insert() @@ -89,10 +89,10 @@ class TestLeaveApplication(unittest.TestCase): webnotes.conn.set_value("Employee", "_T-Employee-0002", "department", "_Test Department") - webnotes.session.user = "test1@example.com" + webnotes.set_user("test1@example.com") application.insert() - webnotes.session.user = "test@example.com" + webnotes.set_user("test@example.com") application.doc.status = "Approved" self.assertRaises(LeaveDayBlockedError, application.submit) @@ -116,13 +116,13 @@ class TestLeaveApplication(unittest.TestCase): self._clear_applications() # create leave application as Employee - webnotes.session.user = "test@example.com" + webnotes.set_user("test@example.com") application = self.get_application(test_records[1]) application.doc.leave_approver = "test1@example.com" application.insert() # submit leave application by Leave Approver - webnotes.session.user = "test1@example.com" + webnotes.set_user("test1@example.com") application.doc.status = "Approved" application.submit() self.assertEqual(webnotes.conn.get_value("Leave Application", application.doc.name, @@ -139,7 +139,7 @@ class TestLeaveApplication(unittest.TestCase): # TODO - add test2@example.com leave approver in employee's leave approvers list application = self.get_application(test_records[1]) - webnotes.session.user = "test@example.com" + webnotes.set_user("test@example.com") application.doc.leave_approver = "test1@example.com" self.assertRaises(InvalidLeaveApproverError, application.insert) @@ -153,11 +153,11 @@ class TestLeaveApplication(unittest.TestCase): # create leave application as employee # but submit as invalid leave approver - should raise exception - webnotes.session.user = "test@example.com" + webnotes.set_user("test@example.com") application = self.get_application(test_records[1]) application.doc.leave_approver = "test2@example.com" application.insert() - webnotes.session.user = "test1@example.com" + webnotes.set_user("test1@example.com") application.doc.status = "Approved" from webnotes.model.bean import BeanPermissionError @@ -173,13 +173,13 @@ class TestLeaveApplication(unittest.TestCase): original_department = webnotes.conn.get_value("Employee", "_T-Employee-0001", "department") webnotes.conn.set_value("Employee", "_T-Employee-0001", "department", None) - webnotes.session.user = "test@example.com" + webnotes.set_user("test@example.com") application = self.get_application(test_records[1]) application.doc.leave_approver = "test2@example.com" application.insert() # change to valid leave approver and try to submit leave application - webnotes.session.user = "test2@example.com" + webnotes.set_user("test2@example.com") application.doc.status = "Approved" application.submit() self.assertEqual(webnotes.conn.get_value("Leave Application", application.doc.name, diff --git a/patches/1311/p01_cleanup.py b/patches/1311/p01_cleanup.py index c6d4c01b24..e4953e62bd 100644 --- a/patches/1311/p01_cleanup.py +++ b/patches/1311/p01_cleanup.py @@ -4,7 +4,9 @@ def execute(): webnotes.reload_doc("stock", "doctype", "material_request") webnotes.reload_doc("buying", "doctype", "purchase_order") webnotes.reload_doc("selling", "doctype", "lead") + from core.doctype.custom_field.custom_field import create_custom_field_if_values_exist + create_custom_field_if_values_exist("Material Request", {"fieldtype":"Text", "fieldname":"remark", "label":"Remarks","insert_after":"Fiscal Year"}) create_custom_field_if_values_exist("Purchase Order", diff --git a/patches/april_2013/p05_update_file_data.py b/patches/april_2013/p05_update_file_data.py index 47d6de9186..69edccae1d 100644 --- a/patches/april_2013/p05_update_file_data.py +++ b/patches/april_2013/p05_update_file_data.py @@ -37,7 +37,7 @@ def update_file_list(doctype, singles): except Exception, e: print webnotes.getTraceback() if (e.args and e.args[0]!=1054) or not e.args: - raise e + raise def update_for_doc(doctype, doc): for filedata in doc.file_list.split("\n"): diff --git a/patches/december_2012/file_list_rename.py b/patches/december_2012/file_list_rename.py index ce4ae76a46..aff687b644 100644 --- a/patches/december_2012/file_list_rename.py +++ b/patches/december_2012/file_list_rename.py @@ -10,4 +10,4 @@ def execute(): webnotes.conn.sql("""update `tab%s` set file_list = replace(file_list, "-", "")""" % dt[0]) except Exception, e: - if e.args[0]!=1146: raise e \ No newline at end of file + if e.args[0]!=1146: raise \ No newline at end of file diff --git a/patches/january_2013/file_list_rename_returns.py b/patches/january_2013/file_list_rename_returns.py index 2325da5279..bce0c9aabf 100644 --- a/patches/january_2013/file_list_rename_returns.py +++ b/patches/january_2013/file_list_rename_returns.py @@ -37,7 +37,7 @@ def execute(): except Exception, e: # if duplicate entry, then dont update if e[0]!=1062: - raise e + raise changed_keys = change_map.keys() @@ -62,5 +62,5 @@ def execute(): except Exception, e: if e[0]!=1146: - raise e + raise \ No newline at end of file diff --git a/patches/june_2013/p03_buying_selling_for_price_list.py b/patches/june_2013/p03_buying_selling_for_price_list.py index 61cddd0b28..58096c5c14 100644 --- a/patches/june_2013/p03_buying_selling_for_price_list.py +++ b/patches/june_2013/p03_buying_selling_for_price_list.py @@ -25,4 +25,4 @@ def execute(): webnotes.conn.sql("""update `tabPrice List` set buying_or_selling='Selling' where ifnull(buying_or_selling, '')='' """) else: - raise e \ No newline at end of file + raise \ No newline at end of file diff --git a/patches/may_2013/p06_make_notes.py b/patches/may_2013/p06_make_notes.py index 29bfe25da4..0f98f54c6e 100644 --- a/patches/may_2013/p06_make_notes.py +++ b/patches/may_2013/p06_make_notes.py @@ -33,7 +33,7 @@ def execute(): pass except Exception, e: if e.args[0] != 1062: - raise e + raise webnotes.delete_doc("DocType", "Question") webnotes.delete_doc("DocType", "Answer") diff --git a/patches/patch_list.py b/patches/patch_list.py index 05a7e59be8..5227118ac3 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -212,7 +212,6 @@ patch_list = [ "execute:webnotes.delete_doc('DocType', 'Budget Control')", "patches.september_2013.p03_update_stock_uom_in_sle", "patches.september_2013.p03_move_website_to_framework", - "execute:webnotes.bean('Style Settings').save() #2013-09-19", "execute:webnotes.conn.set_value('Accounts Settings', None, 'frozen_accounts_modifier', 'Accounts Manager') # 2013-09-24", "patches.september_2013.p04_unsubmit_serial_nos", "patches.september_2013.p05_fix_customer_in_pos", @@ -239,4 +238,7 @@ patch_list = [ "patches.october_2013.p08_cleanup_after_item_price_module_change", "patches.october_2013.p10_plugins_refactor", "patches.1311.p01_cleanup", + "execute:webnotes.reload_doc('website', 'doctype', 'table_of_contents') #2013-11-13", + "execute:webnotes.reload_doc('website', 'doctype', 'web_page') #2013-11-13", + "execute:webnotes.bean('Style Settings').save() #2013-11-13", ] \ No newline at end of file diff --git a/patches/september_2012/add_stock_ledger_entry_index.py b/patches/september_2012/add_stock_ledger_entry_index.py index dc3ed964dd..d272f5ad6a 100644 --- a/patches/september_2012/add_stock_ledger_entry_index.py +++ b/patches/september_2012/add_stock_ledger_entry_index.py @@ -10,6 +10,6 @@ def execute(): webnotes.conn.sql("""alter table `tabStock Ledger Entry` add index posting_sort_index(posting_date, posting_time, name)""") webnotes.conn.commit() except Exception, e: - if e.args[0]!=1061: raise e + if e.args[0]!=1061: raise webnotes.conn.begin() \ No newline at end of file diff --git a/patches/september_2013/p01_update_communication.py b/patches/september_2013/p01_update_communication.py index 31317384a2..4b9cac28dc 100644 --- a/patches/september_2013/p01_update_communication.py +++ b/patches/september_2013/p01_update_communication.py @@ -19,4 +19,4 @@ def execute(): where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype) except MySQLdb.OperationalError, e: if e.args[0] != 1054: - raise e + raise diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py index 53531278e4..546ff02b36 100644 --- a/selling/doctype/quotation/quotation.py +++ b/selling/doctype/quotation/quotation.py @@ -168,7 +168,7 @@ def _make_customer(source_name, ignore_permissions=False): customer.insert() return customer else: - raise e + raise except webnotes.MandatoryError: from webnotes.utils import get_url_to_form webnotes.throw(_("Before proceeding, please create Customer from Lead") + \ diff --git a/setup/doctype/email_settings/email_settings.py b/setup/doctype/email_settings/email_settings.py index aa511eefcd..2aa422c7cb 100644 --- a/setup/doctype/email_settings/email_settings.py +++ b/setup/doctype/email_settings/email_settings.py @@ -52,7 +52,7 @@ class DocType: inc_email.password = self.doc.support_password except AttributeError, e: webnotes.msgprint(err_msg) - raise e + raise pop_mb = POP3Mailbox(inc_email) @@ -61,7 +61,7 @@ class DocType: except _socket.error, e: # Invalid mail server -- due to refusing connection webnotes.msgprint('Invalid POP3 Mail Server. Please rectify and try again.') - raise e + raise except poplib.error_proto, e: webnotes.msgprint('Invalid User Name or Support Password. Please rectify and try again.') - raise e + raise diff --git a/setup/doctype/item_group/templates/generators/item_group.html b/setup/doctype/item_group/templates/generators/item_group.html index 459c9896c4..ba32d5c95a 100644 --- a/setup/doctype/item_group/templates/generators/item_group.html +++ b/setup/doctype/item_group/templates/generators/item_group.html @@ -41,10 +41,12 @@ {% endblock %} \ No newline at end of file diff --git a/stock/doctype/item/templates/generators/item.html b/stock/doctype/item/templates/generators/item.html index eab1b73a54..a89eada41b 100644 --- a/stock/doctype/item/templates/generators/item.html +++ b/stock/doctype/item/templates/generators/item.html @@ -3,14 +3,15 @@ {% block javascript %} {% endblock %} diff --git a/stock/utils.py b/stock/utils.py index b3980e479d..17d3853d24 100644 --- a/stock/utils.py +++ b/stock/utils.py @@ -291,7 +291,7 @@ def reorder_item(): "reorder_qty": reorder_qty }) ) - + create_material_request(material_requests) def create_material_request(material_requests): @@ -311,10 +311,7 @@ def create_material_request(material_requests): "company": company, "fiscal_year": defaults.fiscal_year, "transaction_date": nowdate(), - "material_request_type": request_type, - "remark": _("This is an auto generated Material Request.") + \ - _("""It was raised because the (actual + ordered + indented - reserved) - quantity reaches re-order level when the following record was created""") + "material_request_type": request_type }] for d in items: