Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f78ffd84b4 | ||
|
|
63d345c6ab | ||
|
|
d0d1af2072 | ||
|
|
83694fd180 | ||
|
|
fc353efeca | ||
|
|
16edf8b478 | ||
|
|
c9e4fbeda0 | ||
|
|
46ae789f2f | ||
|
|
a9a284a5ae | ||
|
|
823e88d5bd | ||
|
|
1be94efcfa | ||
|
|
a5e9c71397 | ||
|
|
285135da8e | ||
|
|
906c2babaa | ||
|
|
14a394cde1 | ||
|
|
3c821c89f2 | ||
|
|
a041297861 | ||
|
|
1401e3f679 | ||
|
|
dae29bf2d4 | ||
|
|
0a3be6da27 | ||
|
|
3631e9cbe0 | ||
|
|
1c9a7d2a1b | ||
|
|
972f2f9194 | ||
|
|
239296d16a | ||
|
|
3210db9056 | ||
|
|
feda4f9bc9 | ||
|
|
f6954fb798 | ||
|
|
c6656e68b8 | ||
|
|
a39387d352 | ||
|
|
f3791797d6 | ||
|
|
ea4d63cef3 | ||
|
|
5464ca8a73 | ||
|
|
6c6875f503 | ||
|
|
20523c45c7 | ||
|
|
0248811e53 | ||
|
|
93416ee72c | ||
|
|
51e7086a08 | ||
|
|
5e849ae53e | ||
|
|
de0db0d000 | ||
|
|
f3a67c4533 | ||
|
|
0847f9a074 | ||
|
|
9490c21b8a | ||
|
|
bdb71bca4e | ||
|
|
e8861e2871 | ||
|
|
b084b5e449 | ||
|
|
41d3e57702 | ||
|
|
9df2899f72 | ||
|
|
dacf127f1b | ||
|
|
2b49f9b30a | ||
|
|
533434e878 | ||
|
|
1956028ddc | ||
|
|
a87dc3b4e6 | ||
|
|
97b3f750c9 | ||
|
|
c41b63eff1 | ||
|
|
e6f7ac961f | ||
|
|
cf26964deb | ||
|
|
94157334a7 | ||
|
|
c530161de0 | ||
|
|
2212ae12d8 | ||
|
|
54ade0d26c | ||
|
|
f043760526 | ||
|
|
1cd049d824 | ||
|
|
9624bac3cf |
@@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '5.1.5'
|
||||
__version__ = '5.2.1'
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
"icon": "icon-money",
|
||||
"idx": 1,
|
||||
"in_create": 0,
|
||||
"modified": "2015-06-14 20:57:55.471334",
|
||||
"modified": "2015-07-20 03:54:14.297995",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Account",
|
||||
@@ -257,5 +257,5 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"search_fields": "is_group"
|
||||
"search_fields": ""
|
||||
}
|
||||
@@ -4,13 +4,6 @@
|
||||
"docstatus": 0,
|
||||
"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.",
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -109,7 +109,7 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
||||
|
||||
against_jv: function(doc, cdt, cdn) {
|
||||
var d = frappe.get_doc(cdt, cdn);
|
||||
if (d.against_jv && d.party && !flt(d.credit) && !flt(d.debit)) {
|
||||
if (d.against_jv && !flt(d.credit) && !flt(d.debit)) {
|
||||
this.get_outstanding('Journal Entry', d.against_jv, d);
|
||||
}
|
||||
},
|
||||
@@ -119,7 +119,8 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
||||
var args = {
|
||||
"doctype": doctype,
|
||||
"docname": docname,
|
||||
"party": child.party
|
||||
"party": child.party,
|
||||
"account": child.account
|
||||
}
|
||||
|
||||
return this.frm.call({
|
||||
|
||||
@@ -545,12 +545,14 @@ def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
|
||||
@frappe.whitelist()
|
||||
def get_outstanding(args):
|
||||
args = eval(args)
|
||||
if args.get("doctype") == "Journal Entry" and args.get("party"):
|
||||
if args.get("doctype") == "Journal Entry":
|
||||
condition = " and party=%(party)s" if args.get("party") else ""
|
||||
|
||||
against_jv_amount = frappe.db.sql("""
|
||||
select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
|
||||
from `tabJournal Entry Account` where parent=%s and party=%s
|
||||
from `tabJournal Entry Account` where parent=%(docname)s and account=%(account)s {0}
|
||||
and ifnull(against_invoice, '')='' and ifnull(against_voucher, '')=''
|
||||
and ifnull(against_jv, '')=''""", (args['docname'], args['party']))
|
||||
and ifnull(against_jv, '')=''""".format(condition), args)
|
||||
|
||||
against_jv_amount = flt(against_jv_amount[0][0]) if against_jv_amount else 0
|
||||
if against_jv_amount > 0:
|
||||
|
||||
@@ -126,7 +126,7 @@ class PurchaseInvoice(BuyingController):
|
||||
|
||||
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 @@ class PurchaseInvoice(BuyingController):
|
||||
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))
|
||||
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
},
|
||||
|
||||
3
erpnext/change_log/current/readme.md
Normal file
3
erpnext/change_log/current/readme.md
Normal file
@@ -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)
|
||||
9
erpnext/change_log/v5/v5_2_0.md
Normal file
9
erpnext/change_log/v5/v5_2_0.md
Normal file
@@ -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
|
||||
|
||||
@@ -64,7 +64,7 @@ def get_data():
|
||||
"type": "module"
|
||||
},
|
||||
"Learn": {
|
||||
"color": "#7272FF",
|
||||
"color": "#FCB868",
|
||||
"force_show": True,
|
||||
"icon": "icon-facetime-video",
|
||||
"type": "module",
|
||||
|
||||
@@ -15,8 +15,12 @@ def get_data():
|
||||
"type": "help",
|
||||
"label": _("Setup Wizard"),
|
||||
"youtube_id": "oIOf_zCFWKQ"
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"type": "help",
|
||||
"label": _("Customizing Forms"),
|
||||
"youtube_id": "pJhL9mmxV_U"
|
||||
},
|
||||
]
|
||||
|
||||
},
|
||||
@@ -93,6 +97,16 @@ def get_data():
|
||||
"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 @@ def get_data():
|
||||
"label": _("Opening Stock Balance"),
|
||||
"youtube_id": "0yPgrtfeCTs"
|
||||
},
|
||||
{
|
||||
"type": "help",
|
||||
"label": _("Item Variants"),
|
||||
"youtube_id": "OGBETlCzU5o"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -123,6 +132,12 @@ def get_data():
|
||||
"label": _("Customer and Supplier"),
|
||||
"youtube_id": "anoGi_RpQ20"
|
||||
},
|
||||
{
|
||||
"type": "help",
|
||||
"label": _("Material Request to Purchase Order"),
|
||||
"youtube_id": "4TN9kPyfIqM"
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -133,6 +148,47 @@ def get_data():
|
||||
"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"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
@@ -171,9 +171,6 @@ class SellingController(StockController):
|
||||
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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd. and Contributors"
|
||||
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
|
||||
app_icon = "icon-th"
|
||||
app_color = "#e74c3c"
|
||||
app_version = "5.1.5"
|
||||
app_version = "5.2.1"
|
||||
|
||||
error_report_email = "support@erpnext.com"
|
||||
|
||||
|
||||
@@ -19,10 +19,13 @@ erpnext.hr.ExpenseClaimController = frappe.ui.form.Controller.extend({
|
||||
jv.company = cur_frm.doc.company;
|
||||
jv.remark = 'Payment against Expense Claim: ' + cur_frm.doc.name;
|
||||
jv.fiscal_year = cur_frm.doc.fiscal_year;
|
||||
|
||||
var d1 = frappe.model.add_child(jv, 'Journal Entry Account', 'accounts');
|
||||
d1.debit = cur_frm.doc.total_sanctioned_amount;
|
||||
d1.against_expense_claim = cur_frm.doc.name;
|
||||
var expense = cur_frm.doc.expenses || [];
|
||||
for(var i = 0; i < expense.length; i++){
|
||||
var d1 = frappe.model.add_child(jv, 'Journal Entry Account', 'accounts');
|
||||
d1.debit = expense[i].sanctioned_amount;
|
||||
d1.account = expense[i].default_account;
|
||||
d1.against_expense_claim = cur_frm.doc.name;
|
||||
}
|
||||
|
||||
// credit to bank
|
||||
var d1 = frappe.model.add_child(jv, 'Journal Entry Account', 'accounts');
|
||||
@@ -43,6 +46,7 @@ $.extend(cur_frm.cscript, new erpnext.hr.ExpenseClaimController({frm: cur_frm}))
|
||||
|
||||
cur_frm.add_fetch('employee', 'company', 'company');
|
||||
cur_frm.add_fetch('employee','employee_name','employee_name');
|
||||
cur_frm.add_fetch('expense_type', 'default_account', 'default_account');
|
||||
|
||||
cur_frm.cscript.onload = function(doc,cdt,cdn) {
|
||||
if(!doc.approval_status)
|
||||
|
||||
@@ -34,6 +34,18 @@
|
||||
"reqd": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"depends_on": "expense_type",
|
||||
"fieldname": "default_account",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"label": "Default Account",
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"read_only": 1,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_4",
|
||||
"fieldtype": "Section Break",
|
||||
@@ -93,7 +105,7 @@
|
||||
],
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"modified": "2015-04-08 06:18:47.539134",
|
||||
"modified": "2015-07-16 06:13:32.090048",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Expense Claim Detail",
|
||||
|
||||
@@ -17,6 +17,14 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "default_account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Account",
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Small Text",
|
||||
@@ -29,7 +37,7 @@
|
||||
],
|
||||
"icon": "icon-flag",
|
||||
"idx": 1,
|
||||
"modified": "2015-04-19 06:47:51.860833",
|
||||
"modified": "2015-07-15 08:57:23.069980",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Expense Claim Type",
|
||||
|
||||
@@ -9,8 +9,13 @@ from frappe.desk.reportview import execute as runreport
|
||||
def execute(filters=None):
|
||||
if not filters: filters = {}
|
||||
|
||||
employee_filters = filters.get("company") and \
|
||||
[["Employee", "company", "=", filters.get("company")]] or None
|
||||
employee_filters = {
|
||||
"status": "Active"
|
||||
}
|
||||
|
||||
if filters.get("company"):
|
||||
filters["company"] = filters.company
|
||||
|
||||
employees = runreport(doctype="Employee", fields=["name", "employee_name", "department"],
|
||||
filters=employee_filters, limit_page_length=None)
|
||||
|
||||
|
||||
@@ -181,15 +181,12 @@ class BOM(Document):
|
||||
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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -100,6 +100,7 @@ erpnext.patches.v5_0.capacity_planning
|
||||
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_0.update_item_desc_in_invoice
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model import rename_field
|
||||
from frappe.model.utils.rename_field import rename_field
|
||||
from frappe.modules import scrub, get_doctype_module
|
||||
|
||||
rename_map = {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import frappe
|
||||
from frappe.model import rename_field
|
||||
from frappe.model.utils.rename_field import rename_field
|
||||
from frappe.modules import scrub, get_doctype_module
|
||||
|
||||
rename_map = {
|
||||
@@ -111,7 +111,6 @@ rename_map = {
|
||||
["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 @@ rename_map = {
|
||||
["earning_details", "earnings"],
|
||||
["deduction_details", "deductions"]
|
||||
],
|
||||
"Sales BOM": [
|
||||
"Product Bundle": [
|
||||
["sales_bom_items", "items"]
|
||||
],
|
||||
"SMS Settings": [
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model import rename_field
|
||||
from frappe.model.utils.rename_field import rename_field
|
||||
from frappe.modules import scrub, get_doctype_module
|
||||
|
||||
selling_doctypes = ("Quotation", "Sales Order", "Delivery Note", "Sales Invoice")
|
||||
|
||||
7
erpnext/patches/v5_1/default_bom.py
Normal file
7
erpnext/patches/v5_1/default_bom.py
Normal file
@@ -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 )""")
|
||||
@@ -4,6 +4,6 @@ import frappe
|
||||
|
||||
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))
|
||||
where ifnull(credit_days, 0) > 0""".format(dt))
|
||||
|
||||
9
erpnext/patches/v5_1/rename_roles.py
Normal file
9
erpnext/patches/v5_1/rename_roles.py
Normal file
@@ -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")
|
||||
@@ -26,22 +26,29 @@ frappe.ui.form.on("Project Task", "edit_task", function(frm, doctype, name) {
|
||||
// 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 @@ cur_frm.fields_dict['sales_order'].get_query = function(doc) {
|
||||
filters:{
|
||||
'project_name': doc.name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,42 +5,59 @@ frappe.provide("erpnext.projects");
|
||||
|
||||
cur_frm.add_fetch("project", "company", "company");
|
||||
|
||||
erpnext.projects.Task = frappe.ui.form.Controller.extend({
|
||||
setup: function() {
|
||||
this.frm.fields_dict.project.get_query = function() {
|
||||
frappe.ui.form.on("Task", {
|
||||
refresh: function(frm) {
|
||||
var doc = frm.doc;
|
||||
if(!doc.__islocal) {
|
||||
if(frappe.model.can_read("Time Log")) {
|
||||
frm.add_custom_button(__("Time Logs"), function() {
|
||||
frappe.route_options = {"project": doc.project, "task": doc.name}
|
||||
frappe.set_route("List", "Time Log");
|
||||
}, "icon-list", true);
|
||||
}
|
||||
if(frappe.model.can_read("Expense Claim")) {
|
||||
frm.add_custom_button(__("Expense Claims"), function() {
|
||||
frappe.route_options = {"project": doc.project, "task": doc.name}
|
||||
frappe.set_route("List", "Expense Claim");
|
||||
}, "icon-list", true);
|
||||
}
|
||||
|
||||
if(frm.perm[0].write) {
|
||||
if(frm.doc.status==="Open") {
|
||||
frm.add_custom_button("Close", function() {
|
||||
frm.set_value("status", "Closed");
|
||||
frm.save();
|
||||
});
|
||||
} else {
|
||||
frm.add_custom_button("Reopen", function() {
|
||||
frm.set_value("status", "Open");
|
||||
frm.save();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setup: function(frm) {
|
||||
frm.fields_dict.project.get_query = function() {
|
||||
return {
|
||||
query: "erpnext.projects.doctype.task.task.get_project"
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
project: function() {
|
||||
if(this.frm.doc.project) {
|
||||
return get_server_fields('get_project_details', '','', this.frm.doc, this.frm.doc.doctype,
|
||||
this.frm.doc.name, 1);
|
||||
project: function(frm) {
|
||||
if(frm.doc.project) {
|
||||
return get_server_fields('get_project_details', '','', frm.doc, frm.doc.doctype,
|
||||
frm.doc.name, 1);
|
||||
}
|
||||
},
|
||||
|
||||
validate: function() {
|
||||
this.frm.doc.project && frappe.model.remove_from_locals("Project",
|
||||
this.frm.doc.project);
|
||||
validate: function(frm) {
|
||||
frm.doc.project && frappe.model.remove_from_locals("Project",
|
||||
frm.doc.project);
|
||||
},
|
||||
|
||||
refresh: function(doc) {
|
||||
if(!doc.__islocal) {
|
||||
cur_frm.add_custom_button(__("Time Logs"), function() {
|
||||
frappe.route_options = {"project": doc.project, "task": doc.name}
|
||||
frappe.set_route("List", "Time Log");
|
||||
}, "icon-list", true);
|
||||
cur_frm.add_custom_button(__("Expense Claims"), function() {
|
||||
frappe.route_options = {"project": doc.project, "task": doc.name}
|
||||
frappe.set_route("List", "Expense Claim");
|
||||
}, "icon-list", true);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
cur_frm.add_fetch('task', 'subject', 'subject');
|
||||
|
||||
cur_frm.cscript = new erpnext.projects.Task({frm: cur_frm});
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ frappe.ui.form.on("Time Log", "before_save", function(frm) {
|
||||
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 @@ cur_frm.fields_dict['task'].get_query = function(doc) {
|
||||
filters:{
|
||||
'project': doc.project
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,18 +73,20 @@ class TimeLog(Document):
|
||||
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),
|
||||
|
||||
@@ -96,3 +96,8 @@
|
||||
.pos .tax-table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.erpnext-icon {
|
||||
width: 24px;
|
||||
margin-right: 0px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
46
erpnext/public/images/erp-icon.svg
Normal file
46
erpnext/public/images/erp-icon.svg
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#7574FF" d="M512,448c0,35.2-28.8,64-64,64H64c-35.2,0-64-28.8-64-64V64C0,28.8,28.8,0,64,0h384c35.2,0,64,28.8,64,64
|
||||
V448z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M150.483,371.684V141.15c0-15.167,9.534-25.133,23.833-25.133h162.5c13.866,0,20.8,6.933,20.8,18.633v2.6
|
||||
c0,12.133-6.934,18.633-20.8,18.633h-141.7v78.434h109.634c14.3,0,20.8,6.066,20.8,17.767v1.3c0,12.133-6.934,18.633-20.8,18.633
|
||||
H195.117v84.934h144.3c13.867,0,20.367,6.066,20.367,17.767v2.167c0,12.566-6.5,19.5-20.367,19.5h-165.1
|
||||
C160.017,396.384,150.483,386.851,150.483,371.684z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -7,7 +7,11 @@ frappe.provide('erpnext');
|
||||
$(document).bind('toolbar_setup', function() {
|
||||
frappe.app.name = "ERPNext";
|
||||
|
||||
$('.navbar-home').html('ERPNext');
|
||||
frappe.help_feedback_link = '<p><a class="text-muted" \
|
||||
href="https://discuss.erpnext.com">Feedback</a></p>'
|
||||
|
||||
|
||||
$('.navbar-home').html('<img class="erpnext-icon" src="/assets/erpnext/images/erp-icon.svg" />');
|
||||
|
||||
$('[data-link="docs"]').attr("href", "https://manual.erpnext.com")
|
||||
});
|
||||
|
||||
@@ -401,7 +401,7 @@ erpnext.pos.PointOfSale = Class.extend({
|
||||
|
||||
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 @@ erpnext.pos.PointOfSale = Class.extend({
|
||||
|
||||
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.PointOfSale = Class.extend({
|
||||
});
|
||||
|
||||
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 @@ erpnext.pos.make_pos_btn = function(frm) {
|
||||
|
||||
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") {
|
||||
|
||||
@@ -120,3 +120,8 @@
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.erpnext-icon {
|
||||
width: 24px;
|
||||
margin-right: 0px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -46,7 +46,6 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
|
||||
} else {
|
||||
// un-stop
|
||||
cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
|
||||
cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -40,7 +40,7 @@ class SalesOrder(SellingController):
|
||||
check_list.append(cstr(d.item_code))
|
||||
|
||||
if (frappe.db.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or
|
||||
self.has_sales_bom(d.item_code)) and not d.warehouse:
|
||||
self.has_product_bundle(d.item_code)) and not d.warehouse:
|
||||
frappe.throw(_("Reserved warehouse required for stock item {0}").format(d.item_code))
|
||||
|
||||
# used for production plan
|
||||
|
||||
@@ -192,11 +192,11 @@ class TestSalesOrder(unittest.TestCase):
|
||||
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")
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -176,19 +176,12 @@
|
||||
"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,
|
||||
|
||||
@@ -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 @@ def send_request(gateway_url, args):
|
||||
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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -13,7 +13,6 @@ from frappe.geo.country_info import get_country_info
|
||||
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 @@ def setup_account(args=None):
|
||||
|
||||
login_as_first_user(args)
|
||||
|
||||
setup_welcome_emails()
|
||||
|
||||
frappe.db.commit()
|
||||
|
||||
frappe.clear_cache()
|
||||
|
||||
@@ -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"]))
|
||||
@@ -7,6 +7,7 @@ from frappe import throw, _
|
||||
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 @@ def _get_cart_quotation(party=None):
|
||||
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 apply_cart_settings(party=None, quotation=None):
|
||||
|
||||
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 @@ def set_price_list_and_rate(quotation, cart_settings, billing_territory):
|
||||
# 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)
|
||||
|
||||
@@ -23,10 +23,6 @@ class ShoppingCartSettings(Document):
|
||||
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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -9,7 +9,7 @@ import frappe.defaults
|
||||
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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
],
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
],
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -704,7 +704,7 @@ class TestStockEntry(unittest.TestCase):
|
||||
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 @@ class TestStockEntry(unittest.TestCase):
|
||||
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])
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -57,7 +57,12 @@ class StockLedgerEntry(Document):
|
||||
def validate_item(self):
|
||||
item_det = frappe.db.sql("""select name, has_batch_no, docstatus,
|
||||
is_stock_item, has_variants, stock_uom
|
||||
from tabItem where name=%s""", self.item_code, as_dict=True)[0]
|
||||
from tabItem where name=%s""", self.item_code, as_dict=True)
|
||||
|
||||
if not item_det:
|
||||
frappe.throw(_("Item {0} not found").format(self.item_code))
|
||||
|
||||
item_det = item_det[0]
|
||||
|
||||
if item_det.is_stock_item != 'Yes':
|
||||
frappe.throw(_("Item {0} must be a stock Item").format(self.item_code))
|
||||
@@ -97,7 +102,7 @@ class StockLedgerEntry(Document):
|
||||
def scrub_posting_time(self):
|
||||
if not self.posting_time or self.posting_time == '00:0':
|
||||
self.posting_time = '00:00'
|
||||
|
||||
|
||||
def validate_batch(self):
|
||||
if self.batch_no and self.voucher_type != "Stock Entry":
|
||||
expiry_date = frappe.db.get_value("Batch", self.batch_no, "expiry_date")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -147,7 +147,7 @@ def send_email_notification(mr_list):
|
||||
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 \
|
||||
|
||||
@@ -32,11 +32,11 @@ $.extend(shopping_cart, {
|
||||
});
|
||||
|
||||
$("#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() {
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
2
setup.py
2
setup.py
@@ -1,6 +1,6 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
version = "5.1.5"
|
||||
version = "5.2.1"
|
||||
|
||||
with open("requirements.txt", "r") as f:
|
||||
install_requires = f.readlines()
|
||||
|
||||
@@ -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%">
|
||||
|
||||
Reference in New Issue
Block a user