Merge branch 'develop'
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index ef61354..67cff5d 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
from __future__ import unicode_literals
-__version__ = '5.1.6'
+__version__ = '5.2.0'
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
index 231c8ab..cdb32dc 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
@@ -5,13 +5,6 @@
"doctype": "DocType",
"fields": [
{
- "fieldname": "check_supplier_invoice_uniqueness",
- "fieldtype": "Check",
- "label": "Check Supplier Invoice Number Uniqueness",
- "permlevel": 0,
- "precision": ""
- },
- {
"default": "1",
"description": "If enabled, the system will post accounting entries for inventory automatically.",
"fieldname": "auto_accounting_for_stock",
@@ -45,12 +38,19 @@
"label": "Credit Controller",
"options": "Role",
"permlevel": 0
+ },
+ {
+ "fieldname": "check_supplier_invoice_uniqueness",
+ "fieldtype": "Check",
+ "label": "Check Supplier Invoice Number Uniqueness",
+ "permlevel": 0,
+ "precision": ""
}
],
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
- "modified": "2015-06-11 06:06:34.047890",
+ "modified": "2015-07-14 00:51:48.095525",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.json b/erpnext/accounts/doctype/cost_center/cost_center.json
index 409f59c..6177d35 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.json
+++ b/erpnext/accounts/doctype/cost_center/cost_center.json
@@ -139,7 +139,7 @@
"icon": "icon-money",
"idx": 1,
"in_create": 0,
- "modified": "2015-04-23 02:54:26.934607",
+ "modified": "2015-07-13 05:28:25.504801",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -189,7 +189,7 @@
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
- "role": "Material User"
+ "role": "Stock User"
}
],
"search_fields": "parent_cost_center, is_group"
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
index 0057d6d..8f887c8 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
@@ -56,7 +56,7 @@
],
"icon": "icon-calendar",
"idx": 1,
- "modified": "2015-04-18 07:33:23.922518",
+ "modified": "2015-07-13 05:28:27.745408",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
@@ -78,11 +78,63 @@
{
"apply_user_permissions": 1,
"delete": 0,
- "email": 1,
+ "email": 0,
"permlevel": 0,
- "print": 1,
+ "print": 0,
"read": 1,
- "role": "All"
+ "role": "Sales User"
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Purchase User",
+ "share": 0,
+ "write": 0
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Accounts User",
+ "share": 0,
+ "write": 0
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Stock User",
+ "share": 0,
+ "write": 0
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Employee",
+ "share": 0,
+ "write": 0
}
],
"sort_field": "name",
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index af144cb..1ac0f5a 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -126,7 +126,7 @@
if cint(frappe.db.get_single_value('Buying Settings', 'maintain_same_rate')):
self.validate_rate_with_reference_doc([
- ["Purchase Order", "purchase_order", "po_detail"],
+ ["Purchase Order", "purchase_order", "po_detail"],
["Purchase Receipt", "purchase_receipt", "pr_detail"]
])
@@ -382,7 +382,8 @@
frappe.throw("Supplier Invoice Date cannot be greater than Posting Date")
if self.bill_no:
if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):
- pi = frappe.db.exists("Purchase Invoice", {"bill_no": self.bill_no, "fiscal_year": self.fiscal_year})
+ pi = frappe.db.exists("Purchase Invoice", {"bill_no": self.bill_no,
+ "fiscal_year": self.fiscal_year, "name": ("!=", self.name)})
if pi:
frappe.throw("Supplier Invoice No exists in Purchase Invoice {0}".format(pi))
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index 8ca8ed0..3076632 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -882,7 +882,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
- "modified": "2015-07-03 03:26:43.080551",
+ "modified": "2015-07-13 05:28:29.397705",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",
@@ -899,7 +899,7 @@
"print": 0,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 27ca393..a1a38d5 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -1,247 +1,247 @@
{
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "naming_series:",
- "creation": "2013-01-10 16:34:11",
- "description": "Supplier of Goods or Services.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Master",
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-01-10 16:34:11",
+ "description": "Supplier of Goods or Services.",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
"fields": [
{
- "fieldname": "basic_info",
- "fieldtype": "Section Break",
- "label": "",
- "oldfieldtype": "Section Break",
- "options": "icon-user",
+ "fieldname": "basic_info",
+ "fieldtype": "Section Break",
+ "label": "",
+ "oldfieldtype": "Section Break",
+ "options": "icon-user",
"permlevel": 0
- },
+ },
{
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "label": "Series",
- "no_copy": 1,
- "oldfieldname": "naming_series",
- "oldfieldtype": "Select",
- "options": "SUPP-",
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "label": "Series",
+ "no_copy": 1,
+ "oldfieldname": "naming_series",
+ "oldfieldtype": "Select",
+ "options": "SUPP-",
"permlevel": 0
- },
+ },
{
- "fieldname": "supplier_name",
- "fieldtype": "Data",
- "in_list_view": 0,
- "label": "Supplier Name",
- "no_copy": 1,
- "oldfieldname": "supplier_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
+ "fieldname": "supplier_name",
+ "fieldtype": "Data",
+ "in_list_view": 0,
+ "label": "Supplier Name",
+ "no_copy": 1,
+ "oldfieldname": "supplier_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "supplier_type",
- "fieldtype": "Link",
- "in_list_view": 1,
- "label": "Supplier Type",
- "oldfieldname": "supplier_type",
- "oldfieldtype": "Link",
- "options": "Supplier Type",
- "permlevel": 0,
+ "fieldname": "supplier_type",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Supplier Type",
+ "oldfieldname": "supplier_type",
+ "oldfieldtype": "Link",
+ "options": "Supplier Type",
+ "permlevel": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "eval:!doc.__islocal",
- "fieldname": "address_contacts",
- "fieldtype": "Section Break",
- "label": "Address & Contacts",
- "oldfieldtype": "Column Break",
- "options": "icon-map-marker",
+ "depends_on": "eval:!doc.__islocal",
+ "fieldname": "address_contacts",
+ "fieldtype": "Section Break",
+ "label": "Address & Contacts",
+ "oldfieldtype": "Column Break",
+ "options": "icon-map-marker",
"permlevel": 0
- },
+ },
{
- "fieldname": "address_html",
- "fieldtype": "HTML",
- "label": "Address HTML",
- "permlevel": 0,
+ "fieldname": "address_html",
+ "fieldtype": "HTML",
+ "label": "Address HTML",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "contact_html",
- "fieldtype": "HTML",
- "label": "Contact HTML",
- "permlevel": 0,
+ "fieldname": "contact_html",
+ "fieldtype": "HTML",
+ "label": "Contact HTML",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "default_payable_accounts",
- "fieldtype": "Section Break",
- "label": "Default Payable Accounts",
+ "fieldname": "default_payable_accounts",
+ "fieldtype": "Section Break",
+ "label": "Default Payable Accounts",
"permlevel": 0
- },
+ },
{
- "depends_on": "eval:!doc.__islocal",
- "description": "Mention if non-standard receivable account applicable",
- "fieldname": "accounts",
- "fieldtype": "Table",
- "label": "Accounts",
- "options": "Party Account",
+ "depends_on": "eval:!doc.__islocal",
+ "description": "Mention if non-standard receivable account applicable",
+ "fieldname": "accounts",
+ "fieldtype": "Table",
+ "label": "Accounts",
+ "options": "Party Account",
"permlevel": 0
- },
+ },
{
- "fieldname": "more_info",
- "fieldtype": "Section Break",
- "label": "More Info",
- "oldfieldtype": "Section Break",
- "options": "icon-file-text",
+ "fieldname": "more_info",
+ "fieldtype": "Section Break",
+ "label": "More Info",
+ "oldfieldtype": "Section Break",
+ "options": "icon-file-text",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_currency",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Currency",
- "no_copy": 1,
- "options": "Currency",
+ "fieldname": "default_currency",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Currency",
+ "no_copy": 1,
+ "options": "Currency",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_price_list",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Price List",
- "options": "Price List",
+ "fieldname": "default_price_list",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Price List",
+ "options": "Price List",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_taxes_and_charges",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Taxes and Charges",
- "options": "Purchase Taxes and Charges Template",
+ "fieldname": "default_taxes_and_charges",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Taxes and Charges",
+ "options": "Purchase Taxes and Charges Template",
"permlevel": 0
- },
+ },
{
- "fieldname": "credit_days",
- "fieldtype": "Int",
- "label": "Credit Days",
+ "fieldname": "credit_days",
+ "fieldtype": "Int",
+ "label": "Credit Days",
"permlevel": 0
- },
+ },
{
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break2",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "website",
- "fieldtype": "Data",
- "label": "Website",
- "oldfieldname": "website",
- "oldfieldtype": "Data",
+ "fieldname": "website",
+ "fieldtype": "Data",
+ "label": "Website",
+ "oldfieldname": "website",
+ "oldfieldtype": "Data",
"permlevel": 0
- },
+ },
{
- "description": "Statutory info and other general information about your Supplier",
- "fieldname": "supplier_details",
- "fieldtype": "Text",
- "label": "Supplier Details",
- "oldfieldname": "supplier_details",
- "oldfieldtype": "Code",
+ "description": "Statutory info and other general information about your Supplier",
+ "fieldname": "supplier_details",
+ "fieldtype": "Text",
+ "label": "Supplier Details",
+ "oldfieldname": "supplier_details",
+ "oldfieldtype": "Code",
"permlevel": 0
- },
+ },
{
- "fieldname": "communications",
- "fieldtype": "Table",
- "hidden": 1,
- "label": "Communications",
- "options": "Communication",
- "permlevel": 0,
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication",
+ "permlevel": 0,
"print_hide": 1
}
- ],
- "icon": "icon-user",
- "idx": 1,
- "modified": "2015-02-24 17:35:03.821319",
- "modified_by": "Administrator",
- "module": "Buying",
- "name": "Supplier",
- "owner": "Administrator",
+ ],
+ "icon": "icon-user",
+ "idx": 1,
+ "modified": "2015-07-13 05:28:29.121285",
+ "modified_by": "Administrator",
+ "module": "Buying",
+ "name": "Supplier",
+ "owner": "Administrator",
"permissions": [
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Purchase User"
- },
+ },
{
- "amend": 0,
- "create": 0,
- "delete": 0,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Purchase Manager",
- "submit": 0,
+ "amend": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Purchase Manager",
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Purchase Master Manager",
- "share": 1,
- "submit": 0,
+ "amend": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Purchase Master Manager",
+ "share": 1,
+ "submit": 0,
"write": 1
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
- "role": "Material User"
- },
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
+ "role": "Stock User"
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Material Manager"
- },
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Stock Manager"
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Accounts User"
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Accounts Manager"
}
- ],
- "search_fields": "supplier_name, supplier_type",
+ ],
+ "search_fields": "supplier_name, supplier_type",
"title_field": "supplier_name"
-}
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index e51b252..02d24c7 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -660,7 +660,7 @@
"icon": "icon-shopping-cart",
"idx": 1,
"is_submittable": 1,
- "modified": "2015-06-15 15:39:08.954248",
+ "modified": "2015-07-13 05:28:30.252636",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",
@@ -723,7 +723,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
diff --git a/erpnext/change_log/current/readme.md b/erpnext/change_log/current/readme.md
new file mode 100644
index 0000000..e93bb75
--- /dev/null
+++ b/erpnext/change_log/current/readme.md
@@ -0,0 +1,3 @@
+Leave change log files in this folder for user release notes.
+
+(this file is just a place holder, don't delete it)
diff --git a/erpnext/change_log/v5/v5_2_0.md b/erpnext/change_log/v5/v5_2_0.md
new file mode 100644
index 0000000..5884595
--- /dev/null
+++ b/erpnext/change_log/v5/v5_2_0.md
@@ -0,0 +1,9 @@
+- New help videos for Selling, Buying, Human Resource, Manufacturing and Buying
+- Role rename: **Material User** is now **Stock User**
+- Role rename: **Material Manager** is now **Stock Manager**
+- Role rename: **Material Master Manager** is now **Item Manager**
+- Fixed inconsistent visibility of 'Add to Cart' button
+- Use Customer's Price List in Shopping Cart
+- Fixed Address creation from Shopping Cart
+- Display images in website's Item and Item List pages when the filename has paranthesis in its name
+
diff --git a/erpnext/config/learn.py b/erpnext/config/learn.py
index ffcd76e..0b5f2d5 100644
--- a/erpnext/config/learn.py
+++ b/erpnext/config/learn.py
@@ -15,8 +15,12 @@
"type": "help",
"label": _("Setup Wizard"),
"youtube_id": "oIOf_zCFWKQ"
- }
-
+ },
+ {
+ "type": "help",
+ "label": _("Customizing Forms"),
+ "youtube_id": "pJhL9mmxV_U"
+ },
]
},
@@ -93,6 +97,16 @@
"label": _("Customer and Supplier"),
"youtube_id": "anoGi_RpQ20"
},
+ {
+ "type": "help",
+ "label": _("Sales Order to Payment"),
+ "youtube_id": "7AMq4lqkN4A"
+ },
+ {
+ "type": "help",
+ "label": _("Point-of-Sale"),
+ "youtube_id": "4WkelWkbP_c"
+ }
]
},
{
@@ -108,11 +122,6 @@
"label": _("Opening Stock Balance"),
"youtube_id": "0yPgrtfeCTs"
},
- {
- "type": "help",
- "label": _("Item Variants"),
- "youtube_id": "OGBETlCzU5o"
- },
]
},
{
@@ -123,6 +132,12 @@
"label": _("Customer and Supplier"),
"youtube_id": "anoGi_RpQ20"
},
+ {
+ "type": "help",
+ "label": _("Material Request to Purchase Order"),
+ "youtube_id": "4TN9kPyfIqM"
+ },
+
]
},
{
@@ -133,6 +148,47 @@
"label": _("Bill of Materials"),
"youtube_id": "hDV0c1OeWLo"
},
+ {
+ "type": "help",
+ "label": _("Production Planning Tool"),
+ "youtube_id": "CzatSl4zJ2Y"
+ },
+ {
+ "type": "help",
+ "label": _("Production Order"),
+ "youtube_id": "ZotgLyp2YFY"
+ },
+
]
- }
+ },
+ {
+ "label": _("Human Resource"),
+ "items": [
+ {
+ "type": "help",
+ "label": _("Setting up Employees"),
+ "youtube_id": "USfIUdZlUhw"
+ },
+ {
+ "type": "help",
+ "label": _("Leave Management"),
+ "youtube_id": "fc0p_AXebc8"
+ },
+ {
+ "type": "help",
+ "label": _("Expense Claims"),
+ "youtube_id": "5SZHJF--ZFY"
+ },
+ ]
+ },
+ {
+ "label": _("Projects"),
+ "items": [
+ {
+ "type": "help",
+ "label": _("Managing Projects"),
+ "youtube_id": "egxIGwtoKI4"
+ },
+ ]
+ },
]
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index c709326..b2a9f03 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -171,9 +171,6 @@
frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx))
if self.doctype == "Sales Order":
- if (frappe.db.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or
- self.has_product_bundle(d.item_code)) and not d.warehouse:
- frappe.throw(_("Reserved Warehouse required for stock Item {0} in row {1}").format(d.item_code, d.idx))
reserved_warehouse = d.warehouse
if flt(d.qty) > flt(d.delivered_qty):
reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty)
diff --git a/erpnext/crm/doctype/newsletter_list/newsletter_list.json b/erpnext/crm/doctype/newsletter_list/newsletter_list.json
index 3fa7f65..e5e5c15 100644
--- a/erpnext/crm/doctype/newsletter_list/newsletter_list.json
+++ b/erpnext/crm/doctype/newsletter_list/newsletter_list.json
@@ -32,6 +32,7 @@
"default": "0",
"fieldname": "total_subscribers",
"fieldtype": "Int",
+ "in_list_view": 1,
"label": "Total Subscribers",
"permlevel": 0,
"precision": "",
@@ -45,7 +46,7 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
- "modified": "2015-03-18 08:08:37.692367",
+ "modified": "2015-07-15 07:18:30.094155",
"modified_by": "Administrator",
"module": "CRM",
"name": "Newsletter List",
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 30032f8..3418b9f 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -5,7 +5,7 @@
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
app_icon = "icon-th"
app_color = "#e74c3c"
-app_version = "5.1.6"
+app_version = "5.2.0"
error_report_email = "support@erpnext.com"
diff --git a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json
index 688fa39..fc7e604 100644
--- a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json
+++ b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json
@@ -29,7 +29,7 @@
],
"icon": "icon-flag",
"idx": 1,
- "modified": "2015-04-19 06:47:51.860833",
+ "modified": "2015-07-13 04:46:38.897484",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim Type",
@@ -55,7 +55,7 @@
"print": 0,
"read": 1,
"report": 0,
- "role": "All",
+ "role": "Employee",
"share": 0,
"write": 0
}
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index f550a8a..fe67ed8 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -181,15 +181,12 @@
if item.default_bom != self.name:
item.default_bom = self.name
item.save()
-
else:
- if not self.is_active:
- frappe.db.set(self, "is_default", 0)
-
- item = frappe.get_doc("Item", self.item)
- if item.default_bom == self.name:
- item.default_bom = None
- item.save()
+ frappe.db.set(self, "is_default", 0)
+ item = frappe.get_doc("Item", self.item)
+ if item.default_bom == self.name:
+ item.default_bom = None
+ item.save()
def clear_operations(self):
if not self.with_operations:
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json
index ccf3f68..75aab99 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.json
+++ b/erpnext/manufacturing/doctype/production_order/production_order.json
@@ -368,7 +368,7 @@
"idx": 1,
"in_create": 0,
"is_submittable": 1,
- "modified": "2015-07-09 03:31:01.291811",
+ "modified": "2015-07-13 05:28:23.259016",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",
@@ -395,7 +395,7 @@
"permlevel": 0,
"read": 1,
"report": 1,
- "role": "Material User"
+ "role": "Stock User"
}
],
"title_field": "production_item"
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 26c1d7b..269dcba 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -100,6 +100,7 @@
execute:frappe.reload_doc('crm', 'doctype', 'lead')
execute:frappe.reload_doc('crm', 'doctype', 'opportunity')
erpnext.patches.v5_0.rename_taxes_and_charges_master
+erpnext.patches.v5_1.sales_bom_rename
erpnext.patches.v5_0.rename_table_fieldnames
execute:frappe.db.sql("update `tabJournal Entry` set voucher_type='Journal Entry' where ifnull(voucher_type, '')=''")
erpnext.patches.v5_0.is_group
@@ -173,5 +174,6 @@
erpnext.patches.v5_1.fix_against_account
erpnext.patches.v5_1.fix_credit_days_based_on
erpnext.patches.v5_1.track_operations
-erpnext.patches.v5_1.sales_bom_rename
execute:frappe.rename_doc("DocType", "Salary Manager", "Process Payroll", force=True)
+erpnext.patches.v5_1.rename_roles
+erpnext.patches.v5_1.default_bom
diff --git a/erpnext/patches/v5_0/rename_table_fieldnames.py b/erpnext/patches/v5_0/rename_table_fieldnames.py
index 758280f..c26accbf 100644
--- a/erpnext/patches/v5_0/rename_table_fieldnames.py
+++ b/erpnext/patches/v5_0/rename_table_fieldnames.py
@@ -111,7 +111,6 @@
["installed_item_details", "items"]
],
"Item": [
- ["item_variants", "variants"],
["item_reorder", "reorder_levels"],
["uom_conversion_details", "uoms"],
["item_supplier_details", "supplier_items"],
@@ -168,7 +167,7 @@
["earning_details", "earnings"],
["deduction_details", "deductions"]
],
- "Sales BOM": [
+ "Product Bundle": [
["sales_bom_items", "items"]
],
"SMS Settings": [
diff --git a/erpnext/patches/v5_1/default_bom.py b/erpnext/patches/v5_1/default_bom.py
new file mode 100644
index 0000000..6484edd
--- /dev/null
+++ b/erpnext/patches/v5_1/default_bom.py
@@ -0,0 +1,7 @@
+from __future__ import unicode_literals
+
+import frappe
+
+def execute():
+ frappe.db.sql("""Update `tabItem` as item set default_bom = NULL where
+ not exists(select name from `tabBOM` as bom where item.default_bom = bom.name and bom.docstatus =1 )""")
\ No newline at end of file
diff --git a/erpnext/patches/v5_1/fix_credit_days_based_on.py b/erpnext/patches/v5_1/fix_credit_days_based_on.py
index f9c91f8..6df19f2 100644
--- a/erpnext/patches/v5_1/fix_credit_days_based_on.py
+++ b/erpnext/patches/v5_1/fix_credit_days_based_on.py
@@ -4,6 +4,6 @@
def execute():
for dt in ("Customer", "Customer Group", "Company"):
- frappe.reload_doctype(dt)
+ frappe.reload_doctype(dt, force=True)
frappe.db.sql("""update `tab{0}` set credit_days_based_on='Fixed Days'
- where ifnull(credit_days, 0) > 0""".format(dt))
\ No newline at end of file
+ where ifnull(credit_days, 0) > 0""".format(dt))
diff --git a/erpnext/patches/v5_1/rename_roles.py b/erpnext/patches/v5_1/rename_roles.py
new file mode 100644
index 0000000..452c800
--- /dev/null
+++ b/erpnext/patches/v5_1/rename_roles.py
@@ -0,0 +1,9 @@
+import frappe
+
+def execute():
+ if not frappe.db.exists("Role", "Stock User"):
+ frappe.rename_doc("Role", "Material User", "Stock User")
+ if not frappe.db.exists("Role", "Stock Manager"):
+ frappe.rename_doc("Role", "Material Manager", "Stock Manager")
+ if not frappe.db.exists("Role", "Stock Manager"):
+ frappe.rename_doc("Role", "Material Master Manager", "Item Manager")
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index aa55876..8999f85 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -26,22 +26,29 @@
// show tasks
cur_frm.cscript.refresh = function(doc) {
if(!doc.__islocal) {
- cur_frm.add_custom_button(__("Gantt Chart"), function() {
- frappe.route_options = {"project": doc.name, "start": doc.expected_start_date, "end": doc.expected_end_date};
- frappe.set_route("Gantt", "Task");
- }, "icon-tasks", true);
- cur_frm.add_custom_button(__("Tasks"), function() {
- frappe.route_options = {"project": doc.name}
- frappe.set_route("List", "Task");
- }, "icon-list", true);
- cur_frm.add_custom_button(__("Time Logs"), function() {
- frappe.route_options = {"project": doc.name}
- frappe.set_route("List", "Time Log");
- }, "icon-list", true);
- cur_frm.add_custom_button(__("Expense Claims"), function() {
- frappe.route_options = {"project": doc.name}
- frappe.set_route("List", "Expense Claim");
- }, "icon-list", true);
+ if(frappe.model.can_read("Task")) {
+ cur_frm.add_custom_button(__("Gantt Chart"), function() {
+ frappe.route_options = {"project": doc.name, "start": doc.expected_start_date, "end": doc.expected_end_date};
+ frappe.set_route("Gantt", "Task");
+ }, "icon-tasks", true);
+ cur_frm.add_custom_button(__("Tasks"), function() {
+ frappe.route_options = {"project": doc.name}
+ frappe.set_route("List", "Task");
+ }, "icon-list", true);
+ }
+ if(frappe.model.can_read("Time Log")) {
+ cur_frm.add_custom_button(__("Time Logs"), function() {
+ frappe.route_options = {"project": doc.name}
+ frappe.set_route("List", "Time Log");
+ }, "icon-list", true);
+ }
+
+ if(frappe.model.can_read("Expense Claim")) {
+ cur_frm.add_custom_button(__("Expense Claims"), function() {
+ frappe.route_options = {"project": doc.name}
+ frappe.set_route("List", "Expense Claim");
+ }, "icon-list", true);
+ }
}
}
@@ -56,5 +63,5 @@
filters:{
'project_name': doc.name
}
- }
+ }
}
diff --git a/erpnext/projects/doctype/time_log/time_log.js b/erpnext/projects/doctype/time_log/time_log.js
index 536ddf8..776a75b 100644
--- a/erpnext/projects/doctype/time_log/time_log.js
+++ b/erpnext/projects/doctype/time_log/time_log.js
@@ -42,7 +42,7 @@
frappe.ui.form.on("Time Log", "to_time", function(frm) {
if(frm._setting_hours) return;
frm.set_value("hours", moment(cur_frm.doc.to_time).diff(moment(cur_frm.doc.from_time),
- "hours"));
+ "minutes") / 60);
});
@@ -98,5 +98,5 @@
filters:{
'project': doc.project
}
- }
+ }
}
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index 841ef28..136362b 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -73,18 +73,20 @@
def validate_overlap_for(self, fieldname):
existing = self.get_overlap_for(fieldname)
if existing:
- frappe.throw(_("This Time Log conflicts with {0} for {1}").format(existing.name,
- self.meta.get_label(fieldname)), OverlapError)
+ frappe.throw(_("This Time Log conflicts with {0} for {1} {2}").format(existing.name,
+ self.meta.get_label(fieldname), self.get(fieldname)), OverlapError)
def get_overlap_for(self, fieldname):
if not self.get(fieldname):
return
- existing = frappe.db.sql("""select name, from_time, to_time from `tabTime Log` where `{0}`=%(val)s and
+ existing = frappe.db.sql("""select name, from_time, to_time from `tabTime Log`
+ where `{0}`=%(val)s and
(
- (from_time between %(from_time)s and %(to_time)s) or
- (to_time between %(from_time)s and %(to_time)s) or
- (%(from_time)s between from_time and to_time))
+ (from_time > %(from_time)s and from_time < %(to_time)s) or
+ (to_time > %(from_time)s and to_time < %(to_time)s) or
+ (%(from_time)s > from_time and %(from_time)s < to_time) or
+ (%(from_time)s = from_time and %(to_time)s = to_time))
and name!=%(name)s
and ifnull(task, "")=%(task)s
and docstatus < 2""".format(fieldname),
diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js
index d198ead..6264019 100644
--- a/erpnext/public/js/conf.js
+++ b/erpnext/public/js/conf.js
@@ -7,6 +7,10 @@
$(document).bind('toolbar_setup', function() {
frappe.app.name = "ERPNext";
+ frappe.help_feedback_link = '<p><a class="text-muted" \
+ href="https://discuss.erpnext.com">Feedback</a></p>'
+
+
$('.navbar-home').html('ERPNext');
$('[data-link="docs"]').attr("href", "https://manual.erpnext.com")
diff --git a/erpnext/public/js/pos/pos.js b/erpnext/public/js/pos/pos.js
index 70f3023..e28c718 100644
--- a/erpnext/public/js/pos/pos.js
+++ b/erpnext/public/js/pos/pos.js
@@ -401,7 +401,7 @@
this.with_modes_of_payment(function() {
// prefer cash payment!
- var default_mode = me.frm.doc.mode_of_payment ? me.frm.doc.mode_of_payment :
+ var default_mode = me.frm.doc.mode_of_payment ? me.frm.doc.mode_of_payment :
me.modes_of_payment.indexOf(__("Cash"))!==-1 ? __("Cash") : undefined;
// show payment wizard
@@ -450,8 +450,7 @@
if (is_cash && !dialog.get_value("change")) {
// set to nearest 5
- var paid_amount = 5 * Math.ceil(dialog.get_value("total_amount") / 5);
- dialog.set_value("paid_amount", paid_amount);
+ dialog.set_value("paid_amount", dialog.get_value("total_amount"));
dialog.get_input("paid_amount").trigger("change");
}
}).trigger("change");
@@ -487,6 +486,12 @@
});
erpnext.pos.make_pos_btn = function(frm) {
+ frm.page.add_menu_item(__("{0} View", [frm.page.current_view_name === "pos" ? "Form" : "Point-of-Sale"]), function() {
+ erpnext.pos.toggle(frm);
+ });
+
+ if(frm.pos_btn) return;
+
// Show POS button only if it is enabled from features setup
if (cint(sys_defaults.fs_pos_view)!==1 || frm.doctype==="Material Request") {
return;
@@ -494,7 +499,8 @@
if(!frm.pos_btn) {
frm.pos_btn = frm.page.add_action_icon("icon-th", function() {
- erpnext.pos.toggle(frm) });
+ erpnext.pos.toggle(frm);
+ });
}
if(erpnext.open_as_pos && frm.page.current_view_name !== "pos") {
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index edae9b4..cced319 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -278,7 +278,7 @@
],
"icon": "icon-user",
"idx": 1,
- "modified": "2015-07-09 12:41:31.037121",
+ "modified": "2015-07-13 05:28:25.753684",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer",
@@ -343,7 +343,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User"
+ "role": "Stock User"
},
{
"email": 1,
@@ -351,7 +351,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager"
+ "role": "Stock Manager"
},
{
"email": 1,
diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.json b/erpnext/selling/doctype/product_bundle/product_bundle.json
index c998b23..3f4e296 100644
--- a/erpnext/selling/doctype/product_bundle/product_bundle.json
+++ b/erpnext/selling/doctype/product_bundle/product_bundle.json
@@ -46,7 +46,7 @@
"icon": "icon-sitemap",
"idx": 1,
"is_submittable": 0,
- "modified": "2015-07-06 06:11:10.534423",
+ "modified": "2015-07-13 05:28:28.140327",
"modified_by": "Administrator",
"module": "Selling",
"name": "Product Bundle",
@@ -61,7 +61,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 0,
"write": 1
@@ -76,7 +76,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 28f98e4..4ce961d 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -1089,7 +1089,7 @@
"idx": 1,
"is_submittable": 1,
"issingle": 0,
- "modified": "2015-07-03 03:25:20.180721",
+ "modified": "2015-07-13 05:28:26.889049",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",
@@ -1170,7 +1170,7 @@
"permlevel": 0,
"read": 1,
"report": 1,
- "role": "Material User"
+ "role": "Stock User"
},
{
"permlevel": 1,
diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py
index 91daa3f..59e58b0 100644
--- a/erpnext/selling/doctype/sales_order/test_sales_order.py
+++ b/erpnext/selling/doctype/sales_order/test_sales_order.py
@@ -192,11 +192,11 @@
frappe.permissions.add_user_permission("Company", "_Test Company 1", "test2@example.com")
test_user = frappe.get_doc("User", "test@example.com")
- test_user.add_roles("Sales User", "Material User")
+ test_user.add_roles("Sales User", "Stock User")
test_user.remove_roles("Sales Manager")
test_user_2 = frappe.get_doc("User", "test2@example.com")
- test_user_2.add_roles("Sales User", "Material User")
+ test_user_2.add_roles("Sales User", "Stock User")
test_user_2.remove_roles("Sales Manager")
frappe.set_user("test@example.com")
diff --git a/erpnext/setup/doctype/brand/brand.json b/erpnext/setup/doctype/brand/brand.json
index 2b20b10..288bdd7 100644
--- a/erpnext/setup/doctype/brand/brand.json
+++ b/erpnext/setup/doctype/brand/brand.json
@@ -33,7 +33,7 @@
"icon": "icon-certificate",
"idx": 1,
"in_dialog": 0,
- "modified": "2015-02-05 05:11:35.319683",
+ "modified": "2015-07-13 05:28:24.597639",
"modified_by": "Administrator",
"module": "Setup",
"name": "Brand",
@@ -47,7 +47,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"write": 1
},
@@ -61,7 +61,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index ca8e694..09b033e 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -440,7 +440,7 @@
],
"icon": "icon-building",
"idx": 1,
- "modified": "2015-07-09 14:20:56.619890",
+ "modified": "2015-07-14 02:23:45.064575",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
@@ -467,7 +467,72 @@
"permlevel": 0,
"print": 1,
"read": 1,
- "role": "All"
+ "role": "Accounts User"
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Employee",
+ "share": 0,
+ "write": 0
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Sales User",
+ "share": 0,
+ "write": 0
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Purchase User",
+ "share": 0,
+ "write": 0
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Stock User",
+ "share": 0,
+ "write": 0
+ },
+ {
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Projects User",
+ "share": 0,
+ "write": 0
}
]
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/item_group/item_group.json b/erpnext/setup/doctype/item_group/item_group.json
index 32d0bb6..1a8c5fa 100644
--- a/erpnext/setup/doctype/item_group/item_group.json
+++ b/erpnext/setup/doctype/item_group/item_group.json
@@ -190,7 +190,7 @@
"in_create": 1,
"issingle": 0,
"max_attachments": 3,
- "modified": "2015-02-16 23:50:48.113171",
+ "modified": "2015-07-13 05:28:26.719060",
"modified_by": "Administrator",
"module": "Setup",
"name": "Item Group",
@@ -205,7 +205,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"submit": 0,
"write": 0
},
@@ -219,7 +219,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
@@ -231,7 +231,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 0,
"write": 1
diff --git a/erpnext/setup/doctype/notification_control/notification_control.json b/erpnext/setup/doctype/notification_control/notification_control.json
index f81801d..a77fe67 100644
--- a/erpnext/setup/doctype/notification_control/notification_control.json
+++ b/erpnext/setup/doctype/notification_control/notification_control.json
@@ -176,20 +176,13 @@
"icon": "icon-envelope",
"idx": 1,
"issingle": 1,
- "modified": "2015-03-04 01:13:46.715113",
+ "modified": "2015-07-13 06:24:05.436127",
"modified_by": "Administrator",
"module": "Setup",
"name": "Notification Control",
"owner": "Administrator",
"permissions": [
{
- "create": 0,
- "permlevel": 0,
- "read": 1,
- "role": "Guest",
- "write": 0
- },
- {
"create": 1,
"permlevel": 0,
"read": 1,
diff --git a/erpnext/setup/doctype/sms_settings/sms_settings.py b/erpnext/setup/doctype/sms_settings/sms_settings.py
index a9201e7..1403ee5 100644
--- a/erpnext/setup/doctype/sms_settings/sms_settings.py
+++ b/erpnext/setup/doctype/sms_settings/sms_settings.py
@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
-import frappe, json
+import frappe
from frappe import _, throw, msgprint
from frappe.utils import cstr, nowdate
@@ -92,6 +92,8 @@
conn.request('GET', api_url + urllib.urlencode(args), headers = headers) # send request
resp = conn.getresponse() # get response
resp = resp.read()
+ if resp.status==200:
+ create_sms_log()
return resp
# Split gateway url to server and api url
diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
index cb1b6e1..c166590 100644
--- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
+++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
@@ -32,7 +32,7 @@
],
"icon": "icon-legal",
"idx": 1,
- "modified": "2015-02-05 05:11:48.092112",
+ "modified": "2015-07-13 05:28:25.035649",
"modified_by": "Administrator",
"module": "Setup",
"name": "Terms and Conditions",
@@ -103,7 +103,7 @@
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
- "role": "Material User"
+ "role": "Stock User"
}
]
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/territory/territory.json b/erpnext/setup/doctype/territory/territory.json
index ab1d7e7..256b328 100644
--- a/erpnext/setup/doctype/territory/territory.json
+++ b/erpnext/setup/doctype/territory/territory.json
@@ -136,7 +136,7 @@
"icon": "icon-map-marker",
"idx": 1,
"in_create": 0,
- "modified": "2015-02-05 05:11:48.158225",
+ "modified": "2015-07-13 05:28:25.602509",
"modified_by": "Administrator",
"module": "Setup",
"name": "Territory",
@@ -188,7 +188,7 @@
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
- "role": "Material User"
+ "role": "Stock User"
},
{
"apply_user_permissions": 1,
diff --git a/erpnext/setup/doctype/uom/uom.json b/erpnext/setup/doctype/uom/uom.json
index c0bb4e1..9a1bef4 100644
--- a/erpnext/setup/doctype/uom/uom.json
+++ b/erpnext/setup/doctype/uom/uom.json
@@ -27,7 +27,7 @@
],
"icon": "icon-compass",
"idx": 1,
- "modified": "2015-02-05 05:11:48.493718",
+ "modified": "2015-07-13 05:28:23.143040",
"modified_by": "Administrator",
"module": "Setup",
"name": "UOM",
@@ -42,7 +42,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 0,
"write": 1
@@ -56,7 +56,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"submit": 0,
"write": 0
},
@@ -70,7 +70,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
}
diff --git a/erpnext/setup/page/setup_wizard/emails/email-1.md b/erpnext/setup/page/setup_wizard/emails/email-1.md
deleted file mode 100644
index 70c0c73..0000000
--- a/erpnext/setup/page/setup_wizard/emails/email-1.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Dear {{ fullname }},
-
-Thanks for setting up your ERPNext account!
-
-ERPNext is an open source and cloud ERP system that will help you to:
-
-1. Become organized by having a central repository of your data.
-1. Stay on top of what is happening in the organization.
-1. Prioritize and act quickly on pending activities.
-1. Analyze your performance and find improvement areas.
-1. Profit!
-
-Some tips on setting up ERPNext:
-
-1. Try and make dummy cycles: Run your dummy quotes, invoices, payments, deliveries in the system so that you can get familiar with what ERPNext can do for you.
-1. Data Import Tool: You can import bulk data into system using the data import tool: via **Setup > Data > Data Import Tool**.
-1. Add more users via **Setup > Users and Permissions > User**.
-1. If you are done with the testing and want to start fresh, you can delete your company and create a new one.
-
-If you need help or are stuck, [head to the user forum](https://discuss.frappe.io) or [read the manual](https://manual.erpnext.com).
-
-[Watch the ERPNext help tutorial videos](https://www.youtube.com/playlist?list=PL3lFfCEoMxvxDHtYyQFJeUYkWzQpXwFM9)
-
-
-Best of luck!
-
-Automatically Sent from your ERPNext Account
diff --git a/erpnext/setup/page/setup_wizard/emails/email-2.md b/erpnext/setup/page/setup_wizard/emails/email-2.md
deleted file mode 100644
index 3d7ad82..0000000
--- a/erpnext/setup/page/setup_wizard/emails/email-2.md
+++ /dev/null
@@ -1,14 +0,0 @@
-Dear {{ fullname }},
-
-If you need help in setting up your ERPNext account, here are some resources:
-
-1. [Read the manual](https://manual.erpnext.com)
-1. [See the help videos](https://www.youtube.com/playlist?list=PL3lFfCEoMxvxDHtYyQFJeUYkWzQpXwFM9)
-1. [Ask your questions in the user forum](https://discuss.frappe.io)
-1. [Buy support from the ERPNext Team](https://erpnext.com/pricing)
-1. [Connect with a Service Provider](https://community.erpnext.com/service-providers)
-1. [Hangout on the community chat (gitter.im)](https://gitter.im/frappe/erpnext)
-
-Thanks!
-
-Automatically sent from your ERPNext Account
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py
index a9774fa..4bb01d4 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.py
@@ -13,7 +13,6 @@
from frappe.utils.nestedset import get_root_of
from .default_website import website_maker
import install_fixtures
-from .welcome_emails import setup_welcome_emails
@frappe.whitelist()
def setup_account(args=None):
@@ -78,8 +77,6 @@
login_as_first_user(args)
- setup_welcome_emails()
-
frappe.db.commit()
frappe.clear_cache()
diff --git a/erpnext/setup/page/setup_wizard/welcome_emails.py b/erpnext/setup/page/setup_wizard/welcome_emails.py
deleted file mode 100644
index 03a9717..0000000
--- a/erpnext/setup/page/setup_wizard/welcome_emails.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.utils import add_days, nowdate, get_fullname
-import markdown2
-
-def setup_welcome_emails():
- for email in (
- {"fname": "email-1.md", "subject": "Setting up ERPNext", "after": 1},
- {"fname": "email-2.md", "subject": "Getting ERPNext Help", "after": 3},
- ):
- content = frappe.get_template("setup/page/setup_wizard/emails/" \
- + email["fname"]).render({"fullname": get_fullname()})
-
- frappe.sendmail(recipients = frappe.session.user, subject = email["subject"],
- sender = "hello@erpnext.com",
- content=markdown2.markdown(content), as_bulk = True,
- send_after= add_days(nowdate(), email["after"]))
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index 18bdba6..cfba98b 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -7,6 +7,7 @@
import frappe.defaults
from frappe.utils import cint, flt, get_fullname, fmt_money, cstr
from erpnext.utilities.doctype.address.address import get_address_display
+from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings import get_shopping_cart_settings
from frappe.utils.nestedset import get_root_of
class WebsitePriceListMissingError(frappe.ValidationError): pass
@@ -162,7 +163,7 @@
else:
qdoc = frappe.get_doc({
"doctype": "Quotation",
- "naming_series": frappe.defaults.get_user_default("shopping_cart_quotation_series") or "QTN-CART-",
+ "naming_series": get_shopping_cart_settings().quotation_series or "QTN-CART-",
"quotation_to": party.doctype,
"company": frappe.db.get_value("Shopping Cart Settings", None, "company"),
"order_type": "Shopping Cart",
@@ -236,7 +237,9 @@
def set_price_list_and_rate(quotation, cart_settings, billing_territory):
"""set price list based on billing territory"""
- quotation.selling_price_list = cart_settings.get_price_list(billing_territory)
+
+ _set_price_list(quotation, cart_settings, billing_territory)
+
# reset values
quotation.price_list_currency = quotation.currency = \
quotation.plc_conversion_rate = quotation.conversion_rate = None
@@ -249,6 +252,18 @@
# set it in cookies for using in product page
frappe.local.cookie_manager.set_cookie("selling_price_list", quotation.selling_price_list)
+def _set_price_list(quotation, cart_settings, billing_territory):
+ # check if customer price list exists
+ selling_price_list = None
+ if quotation.customer:
+ selling_price_list = frappe.db.get_value("Customer", quotation.customer, "default_price_list")
+
+ # else check for territory based price list
+ if not selling_price_list:
+ selling_price_list = cart_settings.get_price_list(billing_territory)
+
+ quotation.selling_price_list = selling_price_list
+
def set_taxes(quotation, cart_settings, billing_territory):
"""set taxes based on billing territory"""
quotation.taxes_and_charges = cart_settings.get_tax_master(billing_territory)
diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py
index cdfe0fd..8fbf4a4 100644
--- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py
+++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py
@@ -23,10 +23,6 @@
self.validate_tax_masters()
self.validate_exchange_rates_exist()
- def on_update(self):
- frappe.db.set_default("shopping_cart_enabled", self.get("enabled") or 0)
- frappe.db.set_default("shopping_cart_quotation_series", self.get("quotation_series"))
-
def validate_overlapping_territories(self, parentfield, fieldname):
# for displaying message
doctype = self.meta.get_field(parentfield).options
diff --git a/erpnext/shopping_cart/product.py b/erpnext/shopping_cart/product.py
index 85faa03..d7795d2 100644
--- a/erpnext/shopping_cart/product.py
+++ b/erpnext/shopping_cart/product.py
@@ -4,19 +4,19 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils import cint, fmt_money, cstr
+from frappe.utils import cint, fmt_money
from erpnext.shopping_cart.cart import _get_cart_quotation
-from urllib import unquote
+from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings import is_cart_enabled
@frappe.whitelist(allow_guest=True)
def get_product_info(item_code):
"""get product price / stock info"""
- if not cint(frappe.db.get_default("shopping_cart_enabled")):
+ if not is_cart_enabled():
return {}
cart_quotation = _get_cart_quotation()
- price_list = cstr(unquote(frappe.local.request.cookies.get("selling_price_list")))
+ price_list = cart_quotation.selling_price_list
warehouse = frappe.db.get_value("Item", item_code, "website_warehouse")
if warehouse:
diff --git a/erpnext/shopping_cart/utils.py b/erpnext/shopping_cart/utils.py
index 09bfa43..7794a8f 100644
--- a/erpnext/shopping_cart/utils.py
+++ b/erpnext/shopping_cart/utils.py
@@ -9,7 +9,7 @@
from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings import is_cart_enabled
def show_cart_count():
- if (frappe.db.get_default("shopping_cart_enabled") and
+ if (is_cart_enabled() and
frappe.db.get_value("User", frappe.session.user, "user_type") == "Website User"):
return True
diff --git a/erpnext/stock/__init__.py b/erpnext/stock/__init__.py
index feb55c7..824786b 100644
--- a/erpnext/stock/__init__.py
+++ b/erpnext/stock/__init__.py
@@ -1,8 +1,8 @@
from __future__ import unicode_literals
install_docs = [
- {"doctype":"Role", "role_name":"Material Manager", "name":"Material Manager"},
- {"doctype":"Role", "role_name":"Material Master Manager", "name":"Material Master Manager"},
- {"doctype":"Role", "role_name":"Material User", "name":"Material User"},
+ {"doctype":"Role", "role_name":"Stock Manager", "name":"Stock Manager"},
+ {"doctype":"Role", "role_name":"Item Manager", "name":"Item Manager"},
+ {"doctype":"Role", "role_name":"Stock User", "name":"Stock User"},
{"doctype":"Role", "role_name":"Quality Manager", "name":"Quality Manager"},
{"doctype":"Item Group", "item_group_name":"All Item Groups", "is_group":"Yes"},
{"doctype":"Item Group", "item_group_name":"Default",
diff --git a/erpnext/stock/doctype/batch/batch.json b/erpnext/stock/doctype/batch/batch.json
index 756955b..3430ee1 100644
--- a/erpnext/stock/doctype/batch/batch.json
+++ b/erpnext/stock/doctype/batch/batch.json
@@ -62,7 +62,7 @@
"icon": "icon-archive",
"idx": 1,
"max_attachments": 5,
- "modified": "2015-02-05 05:11:34.824412",
+ "modified": "2015-07-13 05:28:24.973774",
"modified_by": "Administrator",
"module": "Stock",
"name": "Batch",
@@ -77,7 +77,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 0,
"write": 1
diff --git a/erpnext/stock/doctype/bin/bin.json b/erpnext/stock/doctype/bin/bin.json
index 2160ca4..11a86ef 100644
--- a/erpnext/stock/doctype/bin/bin.json
+++ b/erpnext/stock/doctype/bin/bin.json
@@ -162,7 +162,7 @@
"hide_toolbar": 1,
"idx": 1,
"in_create": 1,
- "modified": "2014-05-27 03:49:07.654364",
+ "modified": "2015-07-13 05:28:24.087304",
"modified_by": "Administrator",
"module": "Stock",
"name": "Bin",
@@ -197,7 +197,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
}
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index 3859d63..72a7227 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -1070,7 +1070,7 @@
"idx": 1,
"in_create": 0,
"is_submittable": 1,
- "modified": "2015-07-07 02:37:08.064584",
+ "modified": "2015-07-13 05:28:29.814096",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",
@@ -1087,7 +1087,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"share": 1,
"submit": 1,
"write": 1
@@ -1102,7 +1102,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 1,
"write": 1
@@ -1151,7 +1151,7 @@
{
"permlevel": 1,
"read": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"write": 1
}
],
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index 8fdb52b..1012cda 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -903,7 +903,7 @@
"icon": "icon-tag",
"idx": 1,
"max_attachments": 1,
- "modified": "2015-07-09 02:23:47.669199",
+ "modified": "2015-07-13 05:28:28.698107",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item",
@@ -918,7 +918,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 0,
"write": 1
@@ -932,7 +932,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"submit": 0,
"write": 0
},
@@ -946,7 +946,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.json b/erpnext/stock/doctype/item_attribute/item_attribute.json
index 3b2bd0e..1824fb6 100644
--- a/erpnext/stock/doctype/item_attribute/item_attribute.json
+++ b/erpnext/stock/doctype/item_attribute/item_attribute.json
@@ -54,7 +54,7 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
- "modified": "2015-02-05 05:11:39.794192",
+ "modified": "2015-07-13 05:28:20.561939",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Attribute",
@@ -74,7 +74,7 @@
"print": 0,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
index 9575ce9..1d31f03 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
+++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
@@ -102,7 +102,7 @@
],
"icon": "icon-usd",
"is_submittable": 1,
- "modified": "2015-02-11 16:21:49.528566",
+ "modified": "2015-07-13 05:28:22.039577",
"modified_by": "Administrator",
"module": "Stock",
"name": "Landed Cost Voucher",
@@ -118,7 +118,7 @@
"permlevel": 0,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 1,
"write": 1
diff --git a/erpnext/stock/doctype/manage_variants/manage_variants.json b/erpnext/stock/doctype/manage_variants/manage_variants.json
index 7c61620..ff4f436 100644
--- a/erpnext/stock/doctype/manage_variants/manage_variants.json
+++ b/erpnext/stock/doctype/manage_variants/manage_variants.json
@@ -75,7 +75,7 @@
"is_submittable": 0,
"issingle": 1,
"istable": 0,
- "modified": "2015-06-30 13:40:59.946655",
+ "modified": "2015-07-13 05:28:29.057918",
"modified_by": "Administrator",
"module": "Stock",
"name": "Manage Variants",
@@ -91,7 +91,7 @@
"print": 1,
"read": 1,
"report": 0,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"write": 1
}
diff --git a/erpnext/stock/doctype/material_request/material_request.json b/erpnext/stock/doctype/material_request/material_request.json
index a3026c4..8c808c7 100644
--- a/erpnext/stock/doctype/material_request/material_request.json
+++ b/erpnext/stock/doctype/material_request/material_request.json
@@ -221,7 +221,7 @@
"icon": "icon-ticket",
"idx": 1,
"is_submittable": 1,
- "modified": "2015-06-09 05:47:05.934432",
+ "modified": "2015-07-13 05:28:25.935998",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request",
@@ -252,7 +252,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 1,
"write": 1
@@ -268,7 +268,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"share": 1,
"submit": 1,
"write": 1
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.json b/erpnext/stock/doctype/packing_slip/packing_slip.json
index 431ac9b..1ba25c9 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.json
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.json
@@ -197,7 +197,7 @@
"icon": "icon-suitcase",
"idx": 1,
"is_submittable": 1,
- "modified": "2015-02-20 05:09:24.405911",
+ "modified": "2015-07-13 05:28:24.850528",
"modified_by": "Administrator",
"module": "Stock",
"name": "Packing Slip",
@@ -214,7 +214,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"share": 1,
"submit": 1,
"write": 1
@@ -245,7 +245,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 1,
"write": 1
@@ -260,7 +260,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 1,
"write": 1
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
index c1a3538..6e344b6 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
@@ -854,7 +854,7 @@
"icon": "icon-truck",
"idx": 1,
"is_submittable": 1,
- "modified": "2015-06-15 15:38:43.754869",
+ "modified": "2015-07-13 05:28:27.389559",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",
@@ -870,7 +870,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 1,
"write": 1
@@ -886,7 +886,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"share": 1,
"submit": 1,
"write": 1
@@ -928,7 +928,7 @@
{
"permlevel": 1,
"read": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"write": 1
}
],
diff --git a/erpnext/stock/doctype/serial_no/serial_no.json b/erpnext/stock/doctype/serial_no/serial_no.json
index 3ef2e15..8ffe7ed 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.json
+++ b/erpnext/stock/doctype/serial_no/serial_no.json
@@ -418,7 +418,7 @@
"icon": "icon-barcode",
"idx": 1,
"in_create": 0,
- "modified": "2015-05-28 21:35:58.378231",
+ "modified": "2015-07-13 05:28:27.961178",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No",
@@ -432,7 +432,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 0,
"write": 1
@@ -446,7 +446,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"submit": 0,
"write": 0
},
@@ -460,7 +460,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
}
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json
index 11898ce..06dec58 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.json
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.json
@@ -678,7 +678,7 @@
"is_submittable": 1,
"issingle": 0,
"max_attachments": 0,
- "modified": "2015-05-20 07:58:59.025553",
+ "modified": "2015-07-13 05:28:26.085266",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",
@@ -695,7 +695,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"share": 1,
"submit": 1,
"write": 1
@@ -741,7 +741,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 1,
"write": 1
diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
index 81c07fb..70d6413 100644
--- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
@@ -704,7 +704,7 @@
def test_warehouse_company_validation(self):
set_perpetual_inventory(0)
frappe.get_doc("User", "test2@example.com")\
- .add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
+ .add_roles("Sales User", "Sales Manager", "Stock User", "Stock Manager")
frappe.set_user("test2@example.com")
from erpnext.stock.utils import InvalidWarehouseCompany
@@ -720,11 +720,11 @@
frappe.defaults.add_default("Warehouse", "_Test Warehouse 1 - _TC", "test@example.com", "User Permission")
frappe.defaults.add_default("Warehouse", "_Test Warehouse 2 - _TC1", "test2@example.com", "User Permission")
test_user = frappe.get_doc("User", "test@example.com")
- test_user.add_roles("Sales User", "Sales Manager", "Material User")
- test_user.remove_roles("Material Manager")
+ test_user.add_roles("Sales User", "Sales Manager", "Stock User")
+ test_user.remove_roles("Stock Manager")
frappe.get_doc("User", "test2@example.com")\
- .add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
+ .add_roles("Sales User", "Sales Manager", "Stock User", "Stock Manager")
frappe.set_user("test@example.com")
st1 = frappe.copy_doc(test_records[0])
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json
index f6bd010..780bcc9 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json
@@ -266,7 +266,7 @@
"icon": "icon-list",
"idx": 1,
"in_create": 1,
- "modified": "2014-06-23 08:07:56.370276",
+ "modified": "2015-07-13 05:28:27.826340",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Ledger Entry",
@@ -280,7 +280,7 @@
"permlevel": 0,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
index db09565..72d0f66 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
@@ -149,7 +149,7 @@
"idx": 1,
"is_submittable": 1,
"max_attachments": 1,
- "modified": "2015-07-06 03:13:52.054017",
+ "modified": "2015-07-13 05:28:29.255124",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Reconciliation",
@@ -163,7 +163,7 @@
"permlevel": 0,
"read": 1,
"report": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 1,
"write": 1
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json
index 2a8b54c..4907e45 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.json
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.json
@@ -103,7 +103,7 @@
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
- "modified": "2015-02-18 08:37:18.229705",
+ "modified": "2015-07-13 05:28:23.839277",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Settings",
@@ -115,7 +115,7 @@
"permlevel": 0,
"print": 1,
"read": 1,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"write": 1
}
diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json
index 9782606..3747f5c 100644
--- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json
+++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json
@@ -43,7 +43,7 @@
"idx": 1,
"in_create": 0,
"issingle": 1,
- "modified": "2015-02-05 05:11:47.290476",
+ "modified": "2015-07-13 05:28:25.689187",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock UOM Replace Utility",
@@ -56,7 +56,7 @@
"print": 1,
"read": 1,
"report": 0,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 0,
"write": 1
@@ -68,7 +68,7 @@
"print": 1,
"read": 1,
"report": 0,
- "role": "Material Manager",
+ "role": "Stock Manager",
"share": 1,
"submit": 0,
"write": 1
diff --git a/erpnext/stock/doctype/warehouse/warehouse.json b/erpnext/stock/doctype/warehouse/warehouse.json
index e9bb900..670aa1b 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.json
+++ b/erpnext/stock/doctype/warehouse/warehouse.json
@@ -151,7 +151,7 @@
],
"icon": "icon-building",
"idx": 1,
- "modified": "2015-02-05 05:11:48.803063",
+ "modified": "2015-07-13 05:28:25.214824",
"modified_by": "Administrator",
"module": "Stock",
"name": "Warehouse",
@@ -166,7 +166,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material Master Manager",
+ "role": "Item Manager",
"share": 1,
"submit": 0,
"write": 1
@@ -181,7 +181,7 @@
"print": 1,
"read": 1,
"report": 1,
- "role": "Material User",
+ "role": "Stock User",
"submit": 0,
"write": 0
},
diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py
index f5b612c..f739f94 100644
--- a/erpnext/stock/reorder_item.py
+++ b/erpnext/stock/reorder_item.py
@@ -147,7 +147,7 @@
email_list = frappe.db.sql_list("""select distinct r.parent
from tabUserRole r, tabUser p
where p.name = r.parent and p.enabled = 1 and p.docstatus < 2
- and r.role in ('Purchase Manager','Material Manager')
+ and r.role in ('Purchase Manager','Stock Manager')
and p.name not in ('Administrator', 'All', 'Guest')""")
msg="""<h3>Following Material Requests has been raised automatically \
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index b6f36e6..d5956f9 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -32,11 +32,11 @@
});
$("#cart-add-shipping-address").on("click", function() {
- window.location.href = "address?address_fieldname=shipping_address_name";
+ window.location.href = "addresses";
});
$("#cart-add-billing-address").on("click", function() {
- window.location.href = "address?address_fieldname=customer_address";
+ window.location.href = "address";
});
$(".btn-place-order").on("click", function() {
diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html
index aa44a17..0967e97 100644
--- a/erpnext/templates/includes/macros.html
+++ b/erpnext/templates/includes/macros.html
@@ -1,6 +1,6 @@
{% macro product_image_square(website_image, css_class="") %}
<div class="product-image product-image-square {% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
- {% if website_image -%} style="background-image: url({{ website_image }});" {%- endif %}>
+ {% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) }}');" {%- endif %}>
{% if not website_image -%}<i class="centered octicon octicon-device-camera"></i>{%- endif %}
</div>
{% endmacro %}
@@ -8,10 +8,9 @@
{% macro product_image(website_image, css_class="") %}
<div class="product-image {% if not website_image -%} missing-image {%- endif %} {{ css_class }}">
{% if website_image -%}
- <img src="{{ website_image }}" class="img-responsive">
+ <img src="{{ frappe.utils.quoted(website_image) }}" class="img-responsive">
{%- else -%}
<i class="centered octicon octicon-device-camera"></i>
{%- endif %}
</div>
{% endmacro %}
-
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index 2ffdd5e..e4e4a6a 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -35,14 +35,14 @@
<div id="cart-shipping-address" class="panel-group"
data-fieldname="shipping_address_name"></div>
<button class="btn btn-default" type="button" id="cart-add-shipping-address">
- <span class="icon icon-plus"></span> {{ _("New Shipping Address") }}</button>
+ <span class="icon icon-list"></span> {{ _("Manage Addresses") }}</button>
</div>
<div class="col-md-6">
<h4>Billing Address</h4>
<div id="cart-billing-address" class="panel-group"
data-fieldname="customer_address"></div>
<button class="btn btn-default" type="button" id="cart-add-billing-address">
- <span class="icon icon-plus"></span> {{ _("New Billing Address") }}</button>
+ <span class="icon icon-list"></span> {{ _("Manage Addresses") }}</button>
</div>
</div>
<hr>
diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html
index ece5386..116523c 100644
--- a/erpnext/templates/print_formats/includes/item_table_description.html
+++ b/erpnext/templates/print_formats/includes/item_table_description.html
@@ -1,7 +1,6 @@
{% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
<div class="pull-left" style="max-width: 38.2%; margin-right: 10px;">
- <!-- width: 100% is a mozilla bug -->
- <img src="{{ doc.image }}" class="img-responsive" style="width: 100%;">
+ <img src="{{ doc.image }}" class="img-responsive">
</div>
{%- endif %}
<div>
diff --git a/setup.py b/setup.py
index e7702e4..610b284 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = "5.1.6"
+version = "5.2.0"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()
diff --git a/sponsors.md b/sponsors.md
index 74f67f8..7578229 100644
--- a/sponsors.md
+++ b/sponsors.md
@@ -3,14 +3,14 @@
#### General
-- [CWT (connector & wire technology GmbH)](http://www.cwt-assembly.com/) (2013)
+- [CWT (Connector & Wire Technology GmbH)](http://www.cwt-assembly.com/) (2013)
- [Pinnacle GIS](http://pinnaclegis.com.au/) (2014)
- [Rohit Industries](www.rigpl.com) (2014)
#### Features
-<table>
+<table style="width: 100%">
<tbody>
<tr>
<td style="width: 30%">