Merge branch 'documentation-website'
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 bf91fe5..0000000
--- 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 eb10326..0000000
--- 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:
-
-<b>Supplier:</b> East Wind Inc.
-
-<b>Items:</b>
-<table class="table table-bordered">
- <thead>
- <tr>
- <th>Item</th><th>Warehouse</th><th>Qty</th>
- <th>Rate</th><th>Amount</th><th>Valuation Amount</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>RM0001</td><td>Stores</td><td>10</td><td>200</td><td>2000</td><td>2200</td>
- </tr>
- <tr>
- <td>Desktop</td><td>Fixed Asset Warehouse</td>
- <td>5</td><td>100</td><td>500</td><td>550</td>
- </tr>
- </tbody>
-</table>
-
-**Taxes:**
-
-<table class="table table-bordered">
- <thead>
- <tr><th>Account</th><th>Amount</th><th>Category</th></tr>
- </thead>
- <tbody>
- <tr><td>Shipping Charges</td><td>100</td><td>Total and Valuation</td></tr>
- <tr><td>VAT</td><td>120</td><td>Total</td></tr>
- <tr><td>Customs Duty</td><td>150</td><td>Valuation</td></tr>
- </tbody>
-</table>
-
-**Stock Ledger**
-
-
-
-**General Ledger**
-
-
-
-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**
-
-
-
-
-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:**
-<table class="table table-bordered">
- <thead>
- <tr><th>Item</th><th>Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
- </thead>
- <tbody>
- <tr><td>RM0001</td><td>Stores</td><td>5</td><td>300</td><td>1500</td></tr>
- </tbody>
-</table>
-
-**Taxes:**
-
-<table class="table table-bordered">
- <thead>
- <tr><th>Account</th><th>Amount</th></tr>
- </thead>
- <tbody>
- <tr><td>Service Tax</td><td>150</td></tr>
- <tr><td>VAT</td><td>100</td></tr>
- </tbody>
-</table>
-
-
-**Stock Ledger**
-
-
-
-**General Ledger**
-
-
-
-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.
-<pre>
- <code>
-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
- </code>
-</pre>
-
---
-
-### **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**
-
-
-
-**General Ledger**
-
-
-
-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:**
-<table class="table table-bordered">
- <thead>
- <tr><th>Item</th><th>Target Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
- </thead>
- <tbody>
- <tr><td>RM0001</td><td>Stores</td><td>50</td><td>220</td><td>11000</td></tr>
- </tbody>
-</table>
-
-**Stock Ledger**
-
-
-
-**General Ledger**
-
-
-
---
-
-### **Stock Entry (Material Issue)**
-
-**Items:**
-<table class="table table-bordered">
- <thead>
- <tr><th>Item</th><th>Source Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
- </thead>
- <tbody>
- <tr><td>RM0001</td><td>Stores</td><td>10</td><td>220</td><td>2200</td></tr>
- </tbody>
-</table>
-
-**Stock Ledger**
-
-
-
-**General Ledger**
-
-
-
---
-
-### **Stock Entry (Material Transfer)**
-
-**Items:**
-<table class="table table-bordered">
- <thead>
- <tr><th>Item</th><th>Source Warehouse</th><th>Target Warehouse</th>
- <th>Qty</th><th>Rate</th><th>Amount</th></tr>
- </thead>
- <tbody>
- <tr><td>RM0001</td><td>Stores</td><td>Work In Progress</td>
- <td>10</td><td>220</td><td>2200</td></tr>
- </tbody>
-</table>
-
-**Stock Ledger**
-
-
-
-**General Ledger**
-
-
-
---
-
-### **Stock Entry (Sales Return - Sales Invoice booked)**
-
-**Items:**
-<table class="table table-bordered">
- <thead>
- <tr><th>Item</th><th>Target Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
- </thead>
- <tbody>
- <tr><td>RM0001</td><td>Stores</td><td>2</td><td>200</td><td>400</td></tr>
- </tbody>
-</table>
-
-**Stock Ledger**
-
-
-
-**General Ledger**
-
-
-
-
---
-
-### **Stock Entry (Purchase Return)**
-
-**Items:**
-<table class="table table-bordered">
- <thead>
- <tr><th>Item</th><th>Source Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
- </thead>
- <tbody>
- <tr><td>RM0001</td><td>Stores</td><td>4</td><td>220</td><td>880</td></tr>
- </tbody>
-</table>
-
-**Stock Ledger**
-
-
-
-**General Ledger**
-
-
diff --git a/docs/user/accounts/docs.user.accounts.reports.md b/docs/user/accounts/docs.user.accounts.reports.md
index 24fb3b3..5806875 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 c0c5e78..a41d0b2 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 fc886f1..54d6e30 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 8bd21b6..0000000
--- 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 beeeb0b..5c5bdf7 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 9bcda3d..5376b0a 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 95%
rename from docs/user/website/docs.user.website.blog.md
rename to docs/user/website/docs.user.website.blog_post.md
index b71836e..706492f 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 2e9cfc2..60d4b15 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 7a900e3..48b502e 100644
--- a/hr/doctype/leave_application/test_leave_application.py
+++ b/hr/doctype/leave_application/test_leave_application.py
@@ -8,7 +8,7 @@
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 @@
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 @@
"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 @@
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 @@
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 @@
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 @@
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 @@
# 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 @@
# 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 @@
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 c6d4c01..e4953e6 100644
--- a/patches/1311/p01_cleanup.py
+++ b/patches/1311/p01_cleanup.py
@@ -4,7 +4,9 @@
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 47d6de9..69edcca 100644
--- a/patches/april_2013/p05_update_file_data.py
+++ b/patches/april_2013/p05_update_file_data.py
@@ -37,7 +37,7 @@
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 ce4ae76..aff687b 100644
--- a/patches/december_2012/file_list_rename.py
+++ b/patches/december_2012/file_list_rename.py
@@ -10,4 +10,4 @@
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 2325da5..bce0c9a 100644
--- a/patches/january_2013/file_list_rename_returns.py
+++ b/patches/january_2013/file_list_rename_returns.py
@@ -37,7 +37,7 @@
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 @@
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 61cddd0..58096c5 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 @@
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 29bfe25..0f98f54 100644
--- a/patches/may_2013/p06_make_notes.py
+++ b/patches/may_2013/p06_make_notes.py
@@ -33,7 +33,7 @@
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 05a7e59..5227118 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -212,7 +212,6 @@
"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 @@
"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 dc3ed96..d272f5a 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 @@
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 3131738..4b9cac2 100644
--- a/patches/september_2013/p01_update_communication.py
+++ b/patches/september_2013/p01_update_communication.py
@@ -19,4 +19,4 @@
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 5353127..546ff02 100644
--- a/selling/doctype/quotation/quotation.py
+++ b/selling/doctype/quotation/quotation.py
@@ -168,7 +168,7 @@
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 aa511ee..2aa422c 100644
--- a/setup/doctype/email_settings/email_settings.py
+++ b/setup/doctype/email_settings/email_settings.py
@@ -52,7 +52,7 @@
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 @@
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 459c989..ba32d5c 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 @@
<script>
$(function() {
if(window.logged_in && getCookie("system_user")==="yes") {
- wn.require("lib/js/wn/website/editable.js");
- wn.make_editable($('[itemprop="description"]'), "Item Group", "{{ name }}", "description");
+ wn.has_permission("Item Group", "{{ name }}", "write", function(r) {
+ wn.require("lib/js/wn/website/editable.js");
+ wn.make_editable($('[itemprop="description"]'), "Item Group", "{{ name }}", "description");
+ });
}
-})
+});
</script>
{% 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 eab1b73..a89eada 100644
--- a/stock/doctype/item/templates/generators/item.html
+++ b/stock/doctype/item/templates/generators/item.html
@@ -3,14 +3,15 @@
{% block javascript %}
<script>
{% include "app/stock/doctype/item/templates/includes/product_page.js" %}
-
+
$(function() {
if(window.logged_in && getCookie("system_user")==="yes") {
- wn.require("lib/js/wn/website/editable.js");
- wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description");
+ wn.has_permission("Item", "{{ name }}", "write", function(r) {
+ wn.require("lib/js/wn/website/editable.js");
+ wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description");
+ });
}
- })
-
+ });
</script>
{% endblock %}
diff --git a/stock/utils.py b/stock/utils.py
index b3980e4..17d3853 100644
--- a/stock/utils.py
+++ b/stock/utils.py
@@ -291,7 +291,7 @@
"reorder_qty": reorder_qty
})
)
-
+
create_material_request(material_requests)
def create_material_request(material_requests):
@@ -311,10 +311,7 @@
"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: