Merge pull request #16449 from scmmishra/remove-foundation
feat: Deprecated In App Help
diff --git a/.travis.yml b/.travis.yml
index f20128d..14260e3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,7 +34,6 @@
- bench get-app erpnext $TRAVIS_BUILD_DIR
- bench use test_site
- bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes
- - bench build
- bench scheduler disable
- sed -i 's/9000/9001/g' sites/common_site_config.json
- bench start &
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index b9b5347..a482dac 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
-__version__ = '10.1.77'
+__version__ = '10.1.80'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
index 9b812a8..bcb163f 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
@@ -1,5 +1,6 @@
# 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, os, json
diff --git a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py
index bf1e967..014cf45 100644
--- a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py
+++ b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import unittest
import frappe
diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py
index 08f8248..b13259b 100644
--- a/erpnext/accounts/doctype/bank_account/bank_account.py
+++ b/erpnext/accounts/doctype/bank_account/bank_account.py
@@ -31,3 +31,13 @@
doc.is_default = 1
return doc
+
+@frappe.whitelist()
+def get_party_bank_account(party_type, party):
+ return frappe.db.get_value(party_type,
+ party, 'default_bank_account')
+
+@frappe.whitelist()
+def get_bank_account_details(bank_account):
+ return frappe.db.get_value("Bank Account",
+ bank_account, ['account', 'bank', 'bank_account_no'], as_dict=1)
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index 7814b08..9172762 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -26,7 +26,7 @@
select
"Journal Entry" as payment_document, t1.name as payment_entry,
t1.cheque_no as cheque_number, t1.cheque_date,
- t2.debit_in_account_currency as debit, t2.credit_in_account_currency as credit,
+ sum(t2.debit_in_account_currency) as debit, sum(t2.credit_in_account_currency) as credit,
t1.posting_date, t2.against_account, t1.clearance_date, t2.account_currency
from
`tabJournal Entry` t1, `tabJournal Entry Account` t2
@@ -34,6 +34,7 @@
t2.parent = t1.name and t2.account = %s and t1.docstatus=1
and t1.posting_date >= %s and t1.posting_date <= %s
and ifnull(t1.is_opening, 'No') = 'No' {0}
+ group by t2.account, t1.name
order by t1.posting_date ASC, t1.name DESC
""".format(condition), (self.bank_account, self.from_date, self.to_date), as_dict=1)
diff --git a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py
index 6e7b687..43ebcb0 100644
--- a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py
+++ b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
DEFAULT_MAPPERS = [
{
'doctype': 'Cash Flow Mapper',
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index 8f3ae19..3df4da5 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -46,7 +46,7 @@
doctype_name: frm.doc.doctype,
name: frm.doc.name,
field_name: d.fields[0].fieldname,
- field_value: data.cost_center_number,
+ number_value: data.cost_center_number,
company: frm.doc.company
},
callback: function(r) {
diff --git a/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py b/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py
index 834d105..efbf4eb 100644
--- a/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py
+++ b/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py
@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
+from __future__ import unicode_literals
import frappe
import unittest
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index afb44e8..30ae54b 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -284,7 +284,12 @@
() => frm.events.get_outstanding_documents(frm),
() => frm.events.hide_unhide_fields(frm),
() => frm.events.set_dynamic_labels(frm),
- () => { frm.set_party_account_based_on_party = false; }
+ () => {
+ frm.set_party_account_based_on_party = false;
+ if (r.message.bank_account) {
+ frm.set_value("bank_account", r.message.bank_account);
+ }
+ }
]);
}
}
@@ -833,6 +838,25 @@
}
})
}
+ },
+
+ bank_account: function(frm) {
+ const field = frm.doc.payment_type == "Pay" ? "paid_from":"paid_to";
+ if (frm.doc.bank_account && in_list(['Pay', 'Receive'], frm.doc.payment_type)) {
+ frappe.call({
+ method: "erpnext.accounts.doctype.bank_account.bank_account.get_bank_account_details",
+ args: {
+ bank_account: frm.doc.bank_account
+ },
+ callback: function(r) {
+ if (r.message) {
+ frm.set_value(field, r.message.account);
+ frm.set_value('bank', r.message.bank);
+ frm.set_value('bank_account_no', r.message.bank_account_no);
+ }
+ }
+ });
+ }
}
});
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json
index bc9062b..9354c61 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.json
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json
@@ -1,5 +1,6 @@
{
"allow_copy": 0,
+ "allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
@@ -379,24 +380,24 @@
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
- "allow_on_submit": 0,
+ "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "party",
- "fieldname": "contact_person",
- "fieldtype": "Link",
+ "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
+ "description": "",
+ "fieldname": "party_name",
+ "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_global_search": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Contact",
+ "label": "Party Name",
"length": 0,
"no_copy": 0,
- "options": "Contact",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -444,24 +445,24 @@
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
- "allow_on_submit": 1,
+ "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
- "description": "",
- "fieldname": "party_name",
- "fieldtype": "Data",
+ "depends_on": "party",
+ "fieldname": "bank_account",
+ "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_global_search": 1,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Party Name",
+ "label": "Bank Account",
"length": 0,
"no_copy": 0,
+ "options": "Bank Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -514,6 +515,40 @@
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "party",
+ "fieldname": "contact_person",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Contact",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Contact",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
"collapsible": 1,
"columns": 0,
"fieldname": "payment_accounts_section",
@@ -1874,6 +1909,72 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_from": "bank_account.bank",
+ "fieldname": "bank",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fetch_from": "bank_account.bank_account_no",
+ "fieldname": "bank_account_no",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank Account No",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "payment_order",
"fieldtype": "Link",
"hidden": 0,
@@ -2040,7 +2141,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2018-09-25 14:38:48.312629",
+ "modified": "2019-01-15 15:58:40.742601",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index f213ffa..7f1f550 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -12,6 +12,7 @@
from erpnext.setup.utils import get_exchange_rate
from erpnext.accounts.general_ledger import make_gl_entries
from erpnext.hr.doctype.expense_claim.expense_claim import update_reimbursed_amount
+from erpnext.accounts.doctype.bank_account.bank_account import get_party_bank_account, get_bank_account_details
from erpnext.controllers.accounts_controller import AccountsController, get_supplier_block_status
from six import string_types, iteritems
@@ -88,6 +89,16 @@
.format(d.idx, d.reference_doctype, d.reference_name))
reference_names.append((d.reference_doctype, d.reference_name))
+ def set_bank_account_data(self):
+ if self.bank_account:
+ bank_data = get_bank_account_details(self.bank_account)
+
+ field = "paid_from" if self.payment_type == "Pay" else "paid_to"
+
+ self.bank = bank_data.bank
+ self.bank_account_no = bank_data.bank_account_no
+ self.set(field, bank_data.account)
+
def validate_allocated_amount(self):
for d in self.get("references"):
if (flt(d.allocated_amount))> 0:
@@ -670,6 +681,7 @@
@frappe.whitelist()
def get_party_details(company, party_type, party, date, cost_center=None):
+ bank_account = ''
if not frappe.db.exists(party_type, party):
frappe.throw(_("Invalid {0}: {1}").format(party_type, party))
@@ -680,13 +692,16 @@
_party_name = "title" if party_type == "Student" else party_type.lower() + "_name"
party_name = frappe.db.get_value(party_type, party, _party_name)
party_balance = get_balance_on(party_type=party_type, party=party, cost_center=cost_center)
+ if party_type in ["Customer", "Supplier"]:
+ bank_account = get_party_bank_account(party_type, party)
return {
"party_account": party_account,
"party_name": party_name,
"party_account_currency": account_currency,
"party_balance": party_balance,
- "account_balance": account_balance
+ "account_balance": account_balance,
+ "bank_account": bank_account
}
@@ -890,6 +905,11 @@
pe.allocate_payment_amount = 1
pe.letter_head = doc.get("letter_head")
+ if pe.party_type in ["Customer", "Supplier"]:
+ bank_account = get_party_bank_account(pe.party_type, pe.party)
+ pe.set("bank_account", bank_account)
+ pe.set_bank_account_data()
+
# only Purchase Invoice can be blocked individually
if doc.doctype == "Purchase Invoice" and doc.invoice_is_blocked():
frappe.msgprint(_('{0} is on hold till {1}'.format(doc.name, doc.release_date)))
diff --git a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py
index 80ac69f..6b93f92 100644
--- a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py
+++ b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
index b211b50..cfb24c3 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
@@ -1,23 +1,34 @@
{
"allow_copy": 1,
+ "allow_events_in_timeline": 0,
+ "allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
+ "beta": 0,
"creation": "2014-07-09 12:04:51.681583",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
+ "editable_grid": 0,
+ "engine": "InnoDB",
"fields": [
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
@@ -26,22 +37,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "party_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
@@ -50,23 +69,31 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "",
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
@@ -75,22 +102,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "receivable_payable_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Receivable / Payable Account",
"length": 0,
"no_copy": 0,
@@ -100,22 +135,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "bank_cash_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Bank / Cash Account",
"length": 0,
"no_copy": 0,
@@ -124,22 +167,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -147,22 +198,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "From Invoice Date",
"length": 0,
"no_copy": 0,
@@ -170,22 +229,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 1,
+ "search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "To Invoice Date",
"length": 0,
"no_copy": 0,
@@ -193,22 +260,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 1,
+ "search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "minimum_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Minimum Invoice Amount",
"length": 0,
"no_copy": 0,
@@ -216,22 +291,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "maximum_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Maximum Invoice Amount",
"length": 0,
"no_copy": 0,
@@ -239,22 +322,63 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
+ "description": "System will fetch all the entries if limit value is zero.",
+ "fieldname": "limit",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Limit",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "get_unreconciled_entries",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Get Unreconciled Entries",
"length": 0,
"no_copy": 0,
@@ -262,22 +386,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Unreconciled Payment Details",
"length": 0,
"no_copy": 0,
@@ -285,22 +417,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "payments",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Payments",
"length": 0,
"no_copy": 0,
@@ -309,22 +449,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "reconcile",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reconcile",
"length": 0,
"no_copy": 0,
@@ -332,22 +480,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "sec_break2",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Invoice/Journal Entry Details",
"length": 0,
"no_copy": 0,
@@ -355,22 +511,30 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "invoices",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Invoices",
"length": 0,
"no_copy": 0,
@@ -379,25 +543,28 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
+ "translatable": 0,
"unique": 0
}
],
+ "has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 1,
- "icon": "fa fa-resize-horizontal",
+ "icon": "icon-resize-horizontal",
"idx": 0,
+ "image_view": 0,
"in_create": 0,
-
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-01-04 02:26:58.807921",
+ "modified": "2019-01-15 17:42:21.135214",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation",
@@ -406,7 +573,6 @@
"permissions": [
{
"amend": 0,
- "apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
@@ -426,7 +592,6 @@
},
{
"amend": 0,
- "apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
@@ -445,8 +610,13 @@
"write": 1
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
- "sort_order": "DESC"
+ "sort_order": "DESC",
+ "track_changes": 1,
+ "track_seen": 0,
+ "track_views": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
index 7cd951a..094ece9 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
@@ -25,7 +25,7 @@
def get_payment_entries(self):
order_doctype = "Sales Order" if self.party_type=="Customer" else "Purchase Order"
payment_entries = get_advance_payment_entries(self.party_type, self.party,
- self.receivable_payable_account, order_doctype, against_all_orders=True)
+ self.receivable_payable_account, order_doctype, against_all_orders=True, limit=self.limit)
return payment_entries
@@ -36,6 +36,8 @@
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
if self.bank_cash_account else "1=1"
+ limit_cond = "limit %s" % (self.limit or 1000)
+
journal_entries = frappe.db.sql("""
select
"Journal Entry" as reference_type, t1.name as reference_name,
@@ -55,10 +57,11 @@
THEN 1=1
ELSE {bank_account_condition}
END)
- order by t1.posting_date
+ order by t1.posting_date {limit_cond}
""".format(**{
"dr_or_cr": dr_or_cr,
"bank_account_condition": bank_account_condition,
+ "limit_cond": limit_cond
}), {
"party_type": self.party_type,
"party": self.party,
@@ -80,7 +83,7 @@
condition = self.check_condition()
non_reconciled_invoices = get_outstanding_invoices(self.party_type, self.party,
- self.receivable_payable_account, condition=condition)
+ self.receivable_payable_account, condition=condition, limit=self.limit)
self.add_invoice_entries(non_reconciled_invoices)
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index d28dc93..f2d5006 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -1,7 +1,8 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
+# -*- coding: utf-8 -*-
-
+from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import cint, cstr, formatdate, flt, getdate, nowdate
from frappe import _, throw
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
index f101b6a..173939d 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 7348e1f..c5ce0f7 100755
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -1,7 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
-
-
+from __future__ import unicode_literals
import json
@@ -250,10 +249,12 @@
cond = "1=1"
if pos_profile.get('update_stock') and pos_profile.get('warehouse'):
- cond = "warehouse = '{0}'".format(pos_profile.get('warehouse'))
+ cond = "warehouse = %(warehouse)s"
- serial_nos = frappe.db.sql("""select name, warehouse, item_code from `tabSerial No` where {0}
- and company = %(company)s """.format(cond), {'company': company}, as_dict=1)
+ serial_nos = frappe.db.sql("""select name, warehouse, item_code
+ from `tabSerial No` where {0} and company = %(company)s """.format(cond),{
+ 'company': company, 'warehouse': frappe.db.escape(pos_profile.get('warehouse'))
+ }, as_dict=1)
itemwise_serial_no = {}
for sn in serial_nos:
@@ -331,10 +332,12 @@
itemwise_bin_data = {}
cond = "1=1"
if pos_profile.get('warehouse'):
- cond = "warehouse = '{0}'".format(pos_profile.get('warehouse'))
+ cond = "warehouse = %(warehouse)s"
bin_data = frappe.db.sql(""" select item_code, warehouse, actual_qty from `tabBin`
- where actual_qty > 0 and {cond}""".format(cond=cond), as_dict=1)
+ where actual_qty > 0 and {cond}""".format(cond=cond), {
+ 'warehouse': frappe.db.escape(pos_profile.get('warehouse'))
+ }, as_dict=1)
for bins in bin_data:
if bins.item_code not in itemwise_bin_data:
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
index 71fce77..28da815 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index a69a172..1e1f8b5 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -14,7 +14,7 @@
from frappe.contacts.doctype.contact.contact import get_contact_details, get_default_contact
from erpnext.exceptions import PartyFrozen, PartyDisabled, InvalidAccountCurrency
from erpnext.accounts.utils import get_fiscal_year
-from erpnext import get_default_currency, get_company_currency
+from erpnext import get_company_currency
from six import iteritems
@@ -562,3 +562,12 @@
return out[0][0]
else:
return ''
+
+def get_partywise_advanced_payment_amount(party_type="Customer"):
+ data = frappe.db.sql(""" SELECT party, sum({0}) as amount
+ FROM `tabGL Entry`
+ WHERE party_type = %s and against_voucher is null GROUP BY party"""
+ .format(("credit - debit") if party_type == "Customer" else "debit") , party_type)
+
+ if data:
+ return frappe._dict(data)
\ No newline at end of file
diff --git a/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json b/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json
index 33af313..8a31368 100644
--- a/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json
+++ b/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json
@@ -7,10 +7,10 @@
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
- "html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ doc.company }}<br>\n\t{% if doc.company_address_display %}\n\t\t{% set company_address = doc.company_address_display.replace(\"\\n\", \" \").replace(\"<br>\", \" \") %}\n\t\t{% if \"GSTIN\" not in company_address %}\n\t\t\t{{ company_address }}\n\t\t\t<b>{{ _(\"GSTIN\") }}:</b>{{ doc.company_gstin }}\n\t\t{% else %}\n\t\t\t{{ company_address.replace(\"GSTIN\", \"<br>GSTIN\") }}\n\t\t{% endif %}\n\t{% endif %}\n\t<br>\n\t{% if doc.docstatus == 0 %}\n\t\t<b>{{ doc.status + \" \"+ (doc.select_print_heading or _(\"Invoice\")) }}</b><br>\n\t{% else %}\n\t\t<b>{{ doc.select_print_heading or _(\"Invoice\") }}</b><br>\n\t{% endif %}\n</p>\n<p>\n\t<b>{{ _(\"Receipt No\") }}:</b> {{ doc.name }}<br>\n\t<b>{{ _(\"Date\") }}:</b> {{ doc.get_formatted(\"posting_date\") }}<br>\n\t{% if doc.grand_total > 50000 %}\n\t\t{% set customer_address = doc.address_display.replace(\"\\n\", \" \").replace(\"<br>\", \" \") %}\n\t\t<b>{{ _(\"Customer\") }}:</b><br>\n\t\t{{ doc.customer_name }}<br>\n\t\t{{ customer_address }}\n\t{% endif %}\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"40%\">{{ _(\"Item\") }}</b></th>\n\t\t\t<th width=\"30%\" class=\"text-right\">{{ _(\"Qty\") }}</th>\n\t\t\t<th width=\"30%\" class=\"text-right\">{{ _(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{%- for item in doc.items -%}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t<br>{{ item.item_name }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.gst_hsn_code -%}\n\t\t\t\t\t<br><b>{{ _(\"HSN/SAC\") }}:</b> {{ item.gst_hsn_code }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.serial_no -%}\n\t\t\t\t\t<br><b>{{ _(\"Serial No\") }}:</b> {{ item.serial_no }}\n\t\t\t\t{%- endif -%}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ item.qty }}<br>@ {{ item.rate }}</td>\n\t\t\t<td class=\"text-right\">{{ item.get_formatted(\"amount\") }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t{% if doc.flags.show_inclusive_tax_in_print %}\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ _(\"Total Excl. Tax\") }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ doc.get_formatted(\"net_total\", doc) }}\n\t\t\t\t</td>\n\t\t\t{% else %}\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ _(\"Total\") }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ doc.get_formatted(\"total\", doc) }}\n\t\t\t\t</td>\n\t\t\t{% endif %}\n\t\t</tr>\n\t\t{%- for row in doc.taxes -%}\n\t\t {%- if not row.included_in_print_rate or doc.flags.show_inclusive_tax_in_print -%}\n\t\t\t<tr>\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ row.description }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t\t</td>\n\t\t\t<tr>\n\t\t {%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"grand_total\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- if doc.rounded_total -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Rounded Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"rounded_total\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"paid_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t{%- if doc.change_amount -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Change Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"change_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t{%- endif -%}\n\t</tbody>\n</table>\n<p><b>Tax Breakup:</b></p>\n<div style=\"font-size: 8px\">\n\t{{ doc.other_charges_calculation }}\n</div>\n<p>{{ doc.terms or \"\" }}</p>\n<p class=\"text-center\">{{ _(\"Thank you, please visit again.\") }}</p>",
+ "html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ doc.company }}<br>\n\t{% if doc.company_address_display %}\n\t\t{% set company_address = doc.company_address_display.replace(\"\\n\", \" \").replace(\"<br>\", \" \") %}\n\t\t{% if \"GSTIN\" not in company_address %}\n\t\t\t{{ company_address }}\n\t\t\t<b>{{ _(\"GSTIN\") }}:</b>{{ doc.company_gstin }}\n\t\t{% else %}\n\t\t\t{{ company_address.replace(\"GSTIN\", \"<br>GSTIN\") }}\n\t\t{% endif %}\n\t{% endif %}\n\t<br>\n\t{% if doc.docstatus == 0 %}\n\t\t<b>{{ doc.status + \" \"+ (doc.select_print_heading or _(\"Invoice\")) }}</b><br>\n\t{% else %}\n\t\t<b>{{ doc.select_print_heading or _(\"Invoice\") }}</b><br>\n\t{% endif %}\n</p>\n<p>\n\t<b>{{ _(\"Receipt No\") }}:</b> {{ doc.name }}<br>\n\t<b>{{ _(\"Date\") }}:</b> {{ doc.get_formatted(\"posting_date\") }}<br>\n\t{% if doc.grand_total > 50000 %}\n\t\t{% set customer_address = doc.address_display.replace(\"\\n\", \" \").replace(\"<br>\", \" \") %}\n\t\t<b>{{ _(\"Customer\") }}:</b><br>\n\t\t{{ doc.customer_name }}<br>\n\t\t{{ customer_address }}\n\t{% endif %}\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"40%\">{{ _(\"Item\") }}</b></th>\n\t\t\t<th width=\"30%\" class=\"text-right\">{{ _(\"Qty\") }}</th>\n\t\t\t<th width=\"30%\" class=\"text-right\">{{ _(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{%- for item in doc.items -%}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t<br>{{ item.item_name }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.gst_hsn_code -%}\n\t\t\t\t\t<br><b>{{ _(\"HSN/SAC\") }}:</b> {{ item.gst_hsn_code }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.serial_no -%}\n\t\t\t\t\t<br><b>{{ _(\"Serial No\") }}:</b> {{ item.serial_no }}\n\t\t\t\t{%- endif -%}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ item.qty }}<br>@ {{ item.rate }}</td>\n\t\t\t<td class=\"text-right\">{{ item.get_formatted(\"amount\") }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t{% if doc.flags.show_inclusive_tax_in_print %}\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ _(\"Total Excl. Tax\") }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ doc.get_formatted(\"net_total\", doc) }}\n\t\t\t\t</td>\n\t\t\t{% else %}\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ _(\"Total\") }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ doc.get_formatted(\"total\", doc) }}\n\t\t\t\t</td>\n\t\t\t{% endif %}\n\t\t</tr>\n\t\t{%- for row in doc.taxes -%}\n\t\t {%- if (not row.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) and row.tax_amount != 0 -%}\n\t\t\t<tr>\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ row.description }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t\t</td>\n\t\t\t<tr>\n\t\t {%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"grand_total\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- if doc.rounded_total -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Rounded Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"rounded_total\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"paid_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t{%- if doc.change_amount -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Change Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"change_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t{%- endif -%}\n\t</tbody>\n</table>\n<p>{{ doc.terms or \"\" }}</p>\n<p class=\"text-center\">{{ _(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"line_breaks": 0,
- "modified": "2018-03-20 14:24:08.167930",
+ "modified": "2019-01-24 17:09:27.190929",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GST POS Invoice",
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 22d4d94..95cb351 100755
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -190,7 +190,7 @@
dn_details = get_dn_details(args.get("party_type"), voucher_nos)
self.voucher_details = get_voucher_details(args.get("party_type"), voucher_nos, dn_details)
- if self.filters.based_on_payment_terms:
+ if self.filters.based_on_payment_terms and gl_entries_data:
self.payment_term_map = self.get_payment_term_detail(voucher_nos)
for gle in gl_entries_data:
diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py
index f911eaa..43786a4 100644
--- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
import frappe.defaults
import unittest
diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
index 190031a..cc21d34 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
@@ -5,6 +5,7 @@
import frappe
from frappe import _, scrub
from frappe.utils import flt
+from erpnext.accounts.party import get_partywise_advanced_payment_amount
from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport
from six import iteritems
@@ -24,6 +25,12 @@
credit_debit_label = "Credit Note Amt" if args.get('party_type') == 'Customer' else "Debit Note Amt"
columns += [{
+ "label": _("Advance Amount"),
+ "fieldname": "advance_amount",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 100
+ },{
"label": _("Total Invoiced Amt"),
"fieldname": "total_invoiced_amt",
"fieldtype": "Currency",
@@ -129,12 +136,15 @@
partywise_total = self.get_partywise_total(party_naming_by, args)
+ partywise_advance_amount = get_partywise_advanced_payment_amount(args.get("party_type")) or {}
for party, party_dict in iteritems(partywise_total):
row = [party]
if party_naming_by == "Naming Series":
row += [self.get_party_name(args.get("party_type"), party)]
+ row += [partywise_advance_amount.get(party, 0)]
+
row += [
party_dict.invoiced_amt, party_dict.paid_amt, party_dict.credit_amt, party_dict.outstanding_amt,
party_dict.range1, party_dict.range2, party_dict.range3, party_dict.range4,
@@ -180,11 +190,14 @@
def get_voucherwise_data(self, party_naming_by, args):
voucherwise_data = ReceivablePayableReport(self.filters).run(args)[1]
- cols = ["posting_date", "party"]
+ cols = ["posting_date", "party", "customer-contact"]
if party_naming_by == "Naming Series":
cols += ["party_name"]
+ if args.get("party_type") == 'Customer':
+ cols += ["contact"]
+
cols += ["voucher_type", "voucher_no", "due_date"]
if args.get("party_type") == "Supplier":
diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
index 13424db..0861b20 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
@@ -36,8 +36,8 @@
def get_entries(filters):
conditions = get_conditions(filters)
journal_entries = frappe.db.sql("""SELECT
- "Journal Entry", jv.name, jv.posting_date, jv.cheque_no, jv.clearance_date, jvd.against_account,
- if((jvd.debit - jvd.credit) < 0, (jvd.debit - jvd.credit) * -1, (jvd.debit - jvd.credit))
+ "Journal Entry", jv.name, jv.posting_date, jv.cheque_no,
+ jv.clearance_date, jvd.against_account, jvd.debit - jvd.credit
FROM
`tabJournal Entry Account` jvd, `tabJournal Entry` jv
WHERE
@@ -46,7 +46,7 @@
payment_entries = frappe.db.sql("""SELECT
"Payment Entry", name, posting_date, reference_no, clearance_date, party,
- if(paid_from=%(account)s, paid_amount, received_amount)
+ if(paid_from=%(account)s, paid_amount * -1, received_amount)
FROM
`tabPayment Entry`
WHERE
diff --git a/erpnext/accounts/report/customer_ledger_summary/__init__.py b/erpnext/accounts/report/customer_ledger_summary/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/accounts/report/customer_ledger_summary/__init__.py
diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js
new file mode 100644
index 0000000..a123631
--- /dev/null
+++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js
@@ -0,0 +1,97 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+/* eslint-disable */
+
+frappe.query_reports["Customer Ledger Summary"] = {
+ "filters": [
+ {
+ "fieldname":"company",
+ "label": __("Company"),
+ "fieldtype": "Link",
+ "options": "Company",
+ "default": frappe.defaults.get_user_default("Company")
+ },
+ {
+ "fieldname":"from_date",
+ "label": __("From Date"),
+ "fieldtype": "Date",
+ "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
+ "reqd": 1,
+ "width": "60px"
+ },
+ {
+ "fieldname":"to_date",
+ "label": __("To Date"),
+ "fieldtype": "Date",
+ "default": frappe.datetime.get_today(),
+ "reqd": 1,
+ "width": "60px"
+ },
+ {
+ "fieldname":"finance_book",
+ "label": __("Finance Book"),
+ "fieldtype": "Link",
+ "options": "Finance Book"
+ },
+ {
+ "fieldname":"party",
+ "label": __("Customer"),
+ "fieldtype": "Link",
+ "options": "Customer",
+ on_change: () => {
+ var party = frappe.query_report.get_filter_value('party');
+ if (party) {
+ frappe.db.get_value('Customer', party, ["tax_id", "customer_name"], function(value) {
+ frappe.query_report.set_filter_value('tax_id', value["tax_id"]);
+ frappe.query_report.set_filter_value('customer_name', value["customer_name"]);
+ });
+ } else {
+ frappe.query_report.set_filter_value('tax_id', "");
+ frappe.query_report.set_filter_value('customer_name', "");
+ }
+ }
+ },
+ {
+ "fieldname":"customer_group",
+ "label": __("Customer Group"),
+ "fieldtype": "Link",
+ "options": "Customer Group"
+ },
+ {
+ "fieldname":"payment_terms_template",
+ "label": __("Payment Terms Template"),
+ "fieldtype": "Link",
+ "options": "Payment Terms Template"
+ },
+ {
+ "fieldname":"territory",
+ "label": __("Territory"),
+ "fieldtype": "Link",
+ "options": "Territory"
+ },
+ {
+ "fieldname":"sales_partner",
+ "label": __("Sales Partner"),
+ "fieldtype": "Link",
+ "options": "Sales Partner"
+ },
+ {
+ "fieldname":"sales_person",
+ "label": __("Sales Person"),
+ "fieldtype": "Link",
+ "options": "Sales Person"
+ },
+ {
+ "fieldname":"tax_id",
+ "label": __("Tax Id"),
+ "fieldtype": "Data",
+ "hidden": 1
+ },
+ {
+ "fieldname":"customer_name",
+ "label": __("Customer Name"),
+ "fieldtype": "Data",
+ "hidden": 1
+ }
+ ]
+};
diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.json b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.json
new file mode 100644
index 0000000..91e4e19
--- /dev/null
+++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.json
@@ -0,0 +1,26 @@
+{
+ "add_total_row": 1,
+ "creation": "2018-12-11 00:58:19.078506",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "modified": "2018-12-11 00:59:21.708343",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Customer Ledger Summary",
+ "owner": "Administrator",
+ "prepared_report": 0,
+ "ref_doctype": "Sales Invoice",
+ "report_name": "Customer Ledger Summary",
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py
new file mode 100644
index 0000000..e33bd61
--- /dev/null
+++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py
@@ -0,0 +1,321 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+import erpnext
+from frappe import _
+from frappe.utils import getdate, nowdate
+from six import iteritems, itervalues
+
+class PartyLedgerSummaryReport(object):
+ def __init__(self, filters=None):
+ self.filters = frappe._dict(filters or {})
+ self.filters.from_date = getdate(self.filters.from_date or nowdate())
+ self.filters.to_date = getdate(self.filters.to_date or nowdate())
+
+ def run(self, args):
+ if self.filters.from_date > self.filters.to_date:
+ frappe.throw(_("From Date must be before To Date"))
+
+ self.filters.party_type = args.get("party_type")
+ self.party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1])
+
+ discount_account_field = "discount_allowed_account" if self.filters.party_type == "Customer" \
+ else "discount_received_account"
+ self.round_off_account, self.write_off_account, self.discount_account = frappe.get_cached_value('Company',
+ self.filters.company, ["round_off_account", "write_off_account", discount_account_field])
+
+ columns = self.get_columns()
+ data = self.get_data()
+ return columns, data
+
+ def get_columns(self):
+ columns = [{
+ "label": _(self.filters.party_type),
+ "fieldtype": "Link",
+ "fieldname": "party",
+ "options": self.filters.party_type,
+ "width": 200
+ }]
+
+ if self.party_naming_by == "Naming Series":
+ columns.append({
+ "label": _(self.filters.party_type + "Name"),
+ "fieldtype": "Data",
+ "fieldname": "party_name",
+ "width": 110
+ })
+
+ credit_or_debit_note = "Credit Note" if self.filters.party_type == "Customer" else "Debit Note"
+ discount_allowed_or_received = "Discount Allowed" if self.filters.party_type == "Customer" else "Discount Received"
+
+ columns += [
+ {
+ "label": _("Opening Balance"),
+ "fieldname": "opening_balance",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _("Invoiced Amount"),
+ "fieldname": "invoiced_amount",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _("Paid Amount"),
+ "fieldname": "paid_amount",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _(credit_or_debit_note),
+ "fieldname": "return_amount",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _(discount_allowed_or_received),
+ "fieldname": "discount_amount",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _("Write Off Amount"),
+ "fieldname": "write_off_amount",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _("Other Adjustments"),
+ "fieldname": "adjustment_amount",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _("Closing Balance"),
+ "fieldname": "closing_balance",
+ "fieldtype": "Currency",
+ "options": "currency",
+ "width": 120
+ },
+ {
+ "label": _("Currency"),
+ "fieldname": "currency",
+ "fieldtype": "Link",
+ "options": "Currency",
+ "width": 50
+ }
+ ]
+
+ return columns
+
+ def get_data(self):
+ if not self.filters.get("company"):
+ self.filters["company"] = frappe.db.get_single_value('Global Defaults', 'default_company')
+
+ company_currency = frappe.get_cached_value('Company', self.filters.get("company"), "default_currency")
+ invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit"
+ reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit"
+
+ self.get_gl_entries()
+ self.get_return_invoices()
+ self.get_party_adjustment_amounts()
+
+ self.party_data = frappe._dict({})
+ for gle in self.gl_entries:
+ self.party_data.setdefault(gle.party, frappe._dict({
+ "party": gle.party,
+ "party_name": gle.party_name,
+ "opening_balance": 0,
+ "invoiced_amount": 0,
+ "paid_amount": 0,
+ "return_amount": 0,
+ "closing_balance": 0,
+ "currency": company_currency
+ }))
+
+ amount = gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr)
+ self.party_data[gle.party].closing_balance += amount
+
+ if gle.posting_date < self.filters.from_date:
+ self.party_data[gle.party].opening_balance += amount
+ else:
+ if amount > 0:
+ self.party_data[gle.party].invoiced_amount += amount
+ elif gle.voucher_no in self.return_invoices:
+ self.party_data[gle.party].return_amount -= amount
+ else:
+ self.party_data[gle.party].paid_amount -= amount
+
+ out = []
+ for party, row in iteritems(self.party_data):
+ if row.opening_balance or row.invoiced_amount or row.paid_amount or row.return_amount or row.closing_amount:
+ total_party_adjustment = sum([amount for amount in itervalues(self.party_adjustment_details.get(party, {}))])
+ row.paid_amount -= total_party_adjustment
+ row.discount_amount = self.party_adjustment_details.get(party, {}).get(self.discount_account, 0)
+ row.write_off_amount = self.party_adjustment_details.get(party, {}).get(self.write_off_account, 0)
+ row.adjustment_amount = total_party_adjustment - row.discount_amount - row.write_off_amount
+
+ out.append(row)
+
+ return out
+
+ def get_gl_entries(self):
+ conditions = self.prepare_conditions()
+ join = join_field = ""
+ if self.filters.party_type == "Customer":
+ join_field = ", p.customer_name as party_name"
+ join = "left join `tabCustomer` p on gle.party = p.name"
+ elif self.filters.party_type == "Supplier":
+ join_field = ", p.supplier_name as party_name"
+ join = "left join `tabSupplier` p on gle.party = p.name"
+
+ self.gl_entries = frappe.db.sql("""
+ select
+ gle.posting_date, gle.party, gle.voucher_type, gle.voucher_no, gle.against_voucher_type,
+ gle.against_voucher, gle.debit, gle.credit {join_field}
+ from `tabGL Entry` gle
+ {join}
+ where
+ gle.docstatus < 2 and gle.party_type=%(party_type)s and ifnull(gle.party, '') != ''
+ and gle.posting_date <= %(to_date)s {conditions}
+ order by gle.posting_date
+ """.format(join=join, join_field=join_field, conditions=conditions), self.filters, as_dict=True)
+
+ def prepare_conditions(self):
+ conditions = [""]
+
+ if self.filters.company:
+ conditions.append("company=%(company)s")
+
+ self.filters.company_finance_book = erpnext.get_default_finance_book(self.filters.company)
+
+ if not self.filters.finance_book or (self.filters.finance_book == self.filters.company_finance_book):
+ conditions.append("ifnull(finance_book,'') in (%(company_finance_book)s, '')")
+ elif self.filters.finance_book:
+ conditions.append("ifnull(finance_book,'') = %(finance_book)s")
+
+ if self.filters.get("party"):
+ conditions.append("party=%(party)s")
+
+ if self.filters.party_type == "Customer":
+ if self.filters.get("customer_group"):
+ lft, rgt = frappe.db.get_value("Customer Group",
+ self.filters.get("customer_group"), ["lft", "rgt"])
+
+ conditions.append("""party in (select name from tabCustomer
+ where exists(select name from `tabCustomer Group` where lft >= {0} and rgt <= {1}
+ and name=tabCustomer.customer_group))""".format(lft, rgt))
+
+ if self.filters.get("territory"):
+ lft, rgt = frappe.db.get_value("Territory",
+ self.filters.get("territory"), ["lft", "rgt"])
+
+ conditions.append("""party in (select name from tabCustomer
+ where exists(select name from `tabTerritory` where lft >= {0} and rgt <= {1}
+ and name=tabCustomer.territory))""".format(lft, rgt))
+
+ if self.filters.get("payment_terms_template"):
+ conditions.append("party in (select name from tabCustomer where payment_terms=%(payment_terms_template)s)")
+
+ if self.filters.get("sales_partner"):
+ conditions.append("party in (select name from tabCustomer where default_sales_partner=%(sales_partner)s)")
+
+ if self.filters.get("sales_person"):
+ lft, rgt = frappe.db.get_value("Sales Person",
+ self.filters.get("sales_person"), ["lft", "rgt"])
+
+ conditions.append("""exists(select name from `tabSales Team` steam where
+ steam.sales_person in (select name from `tabSales Person` where lft >= {0} and rgt <= {1})
+ and ((steam.parent = voucher_no and steam.parenttype = voucher_type)
+ or (steam.parent = against_voucher and steam.parenttype = against_voucher_type)
+ or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt))
+
+ if self.filters.party_type == "Supplier":
+ if self.filters.get("supplier_group"):
+ conditions.append("""party in (select name from tabSupplier
+ where supplier_group=%(supplier_group)s)""")
+
+ return " and ".join(conditions)
+
+ def get_return_invoices(self):
+ doctype = "Sales Invoice" if self.filters.party_type == "Customer" else "Purchase Invoice"
+ self.return_invoices = [d.name for d in frappe.get_all(doctype, filters={"is_return": 1, "docstatus": 1,
+ "posting_date": ["between", [self.filters.from_date, self.filters.to_date]]})]
+
+ def get_party_adjustment_amounts(self):
+ conditions = self.prepare_conditions()
+ income_or_expense = "Expense" if self.filters.party_type == "Customer" else "Income"
+ invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit"
+ reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit"
+
+ gl_entries = frappe.db.sql("""
+ select
+ posting_date, account, party, voucher_type, voucher_no, debit, credit
+ from
+ `tabGL Entry`
+ where
+ docstatus < 2
+ and (voucher_type, voucher_no) in (
+ select voucher_type, voucher_no from `tabGL Entry` gle, `tabAccount` acc
+ where acc.name = gle.account and acc.root_type = '{income_or_expense}'
+ and gle.posting_date between %(from_date)s and %(to_date)s and gle.docstatus < 2
+ ) and (voucher_type, voucher_no) in (
+ select voucher_type, voucher_no from `tabGL Entry` gle
+ where gle.party_type=%(party_type)s and ifnull(party, '') != ''
+ and gle.posting_date between %(from_date)s and %(to_date)s and gle.docstatus < 2 {conditions}
+ )
+ """.format(conditions=conditions, income_or_expense=income_or_expense), self.filters, as_dict=True)
+
+ self.party_adjustment_details = {}
+ adjustment_voucher_entries = {}
+ for gle in gl_entries:
+ adjustment_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), [])
+ adjustment_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle)
+
+ for voucher_gl_entries in itervalues(adjustment_voucher_entries):
+ parties = {}
+ accounts = {}
+ has_irrelevant_entry = False
+
+ for gle in voucher_gl_entries:
+ if gle.account == self.round_off_account:
+ continue
+ elif gle.party:
+ parties.setdefault(gle.party, 0)
+ parties[gle.party] += gle.get(reverse_dr_or_cr) - gle.get(invoice_dr_or_cr)
+ elif frappe.get_cached_value("Account", gle.account, "root_type") == income_or_expense:
+ accounts.setdefault(gle.account, 0)
+ accounts[gle.account] += gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr)
+ else:
+ has_irrelevant_entry = True
+
+ if parties and accounts:
+ if len(parties) == 1:
+ party = parties.keys()[0]
+ for account, amount in iteritems(accounts):
+ self.party_adjustment_details.setdefault(party, {})
+ self.party_adjustment_details[party].setdefault(account, 0)
+ self.party_adjustment_details[party][account] += amount
+ elif len(accounts) == 1 and not has_irrelevant_entry:
+ account = accounts.keys()[0]
+ for party, amount in iteritems(parties):
+ self.party_adjustment_details.setdefault(party, {})
+ self.party_adjustment_details[party].setdefault(account, 0)
+ self.party_adjustment_details[party][account] += amount
+
+def execute(filters=None):
+ args = {
+ "party_type": "Customer",
+ "naming_by": ["Selling Settings", "cust_master_name"],
+ }
+ return PartyLedgerSummaryReport(filters).run(args)
diff --git a/erpnext/accounts/report/supplier_ledger_summary/__init__.py b/erpnext/accounts/report/supplier_ledger_summary/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/accounts/report/supplier_ledger_summary/__init__.py
diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js
new file mode 100644
index 0000000..6fd16f2
--- /dev/null
+++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js
@@ -0,0 +1,97 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+/* eslint-disable */
+
+frappe.query_reports["Supplier Ledger Summary"] = {
+ "filters": [
+ {
+ "fieldname":"company",
+ "label": __("Company"),
+ "fieldtype": "Link",
+ "options": "Company",
+ "default": frappe.defaults.get_user_default("Company")
+ },
+ {
+ "fieldname":"from_date",
+ "label": __("From Date"),
+ "fieldtype": "Date",
+ "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
+ "reqd": 1,
+ "width": "60px"
+ },
+ {
+ "fieldname":"to_date",
+ "label": __("To Date"),
+ "fieldtype": "Date",
+ "default": frappe.datetime.get_today(),
+ "reqd": 1,
+ "width": "60px"
+ },
+ {
+ "fieldname":"finance_book",
+ "label": __("Finance Book"),
+ "fieldtype": "Link",
+ "options": "Finance Book"
+ },
+ {
+ "fieldname":"party",
+ "label": __("Customer"),
+ "fieldtype": "Link",
+ "options": "Customer",
+ on_change: () => {
+ var party = frappe.query_report.get_filter_value('party');
+ if (party) {
+ frappe.db.get_value('Supplier', party, ["tax_id", "supplier_name"], function(value) {
+ frappe.query_report.set_filter_value('tax_id', value["tax_id"]);
+ frappe.query_report.set_filter_value('supplier_name', value["supplier_name"]);
+ });
+ } else {
+ frappe.query_report.set_filter_value('tax_id', "");
+ frappe.query_report.set_filter_value('supplier_name', "");
+ }
+ }
+ },
+ {
+ "fieldname":"supplier_group",
+ "label": __("Supplier Group"),
+ "fieldtype": "Link",
+ "options": "Supplier Group"
+ },
+ {
+ "fieldname":"payment_terms_template",
+ "label": __("Payment Terms Template"),
+ "fieldtype": "Link",
+ "options": "Payment Terms Template"
+ },
+ {
+ "fieldname":"territory",
+ "label": __("Territory"),
+ "fieldtype": "Link",
+ "options": "Territory"
+ },
+ {
+ "fieldname":"sales_partner",
+ "label": __("Sales Partner"),
+ "fieldtype": "Link",
+ "options": "Sales Partner"
+ },
+ {
+ "fieldname":"sales_person",
+ "label": __("Sales Person"),
+ "fieldtype": "Link",
+ "options": "Sales Person"
+ },
+ {
+ "fieldname":"tax_id",
+ "label": __("Tax Id"),
+ "fieldtype": "Data",
+ "hidden": 1
+ },
+ {
+ "fieldname":"supplier_name",
+ "label": __("Supplier Name"),
+ "fieldtype": "Data",
+ "hidden": 1
+ }
+ ]
+};
diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json
new file mode 100644
index 0000000..eb3b412
--- /dev/null
+++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json
@@ -0,0 +1,27 @@
+{
+ "add_total_row": 1,
+ "creation": "2018-12-12 05:10:02.987274",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "letter_head": "Capital Traders",
+ "modified": "2018-12-12 05:10:02.987274",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Supplier Ledger Summary",
+ "owner": "Administrator",
+ "prepared_report": 0,
+ "ref_doctype": "Purchase Invoice",
+ "report_name": "Supplier Ledger Summary",
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py
new file mode 100644
index 0000000..d2c23ee
--- /dev/null
+++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py
@@ -0,0 +1,13 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from erpnext.accounts.report.customer_ledger_summary.customer_ledger_summary import PartyLedgerSummaryReport
+
+def execute(filters=None):
+ args = {
+ "party_type": "Supplier",
+ "naming_by": ["Buying Settings", "supp_master_name"],
+ }
+ return PartyLedgerSummaryReport(filters).run(args)
\ No newline at end of file
diff --git a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py
index d81a8f3..2e805f8 100644
--- a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py
+++ b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
@@ -8,7 +9,9 @@
def execute(filters=None):
validate_filters(filters)
- columns = get_columns()
+ filters.naming_series = frappe.db.get_single_value('Buying Settings', 'supp_master_name')
+
+ columns = get_columns(filters)
res = get_result(filters)
return columns, res
@@ -29,7 +32,8 @@
# if no supplier selected, fetch data for all tds applicable supplier
# else fetch relevant data for selected supplier
pan = "pan" if frappe.db.has_column("Supplier", "pan") else "tax_id"
- fields = ["name", pan+" as pan", "tax_withholding_category", "supplier_type"]
+ fields = ["name", pan+" as pan", "tax_withholding_category", "supplier_type", "supplier_name"]
+
if filters.supplier:
filters.supplier = frappe.db.get_list('Supplier',
{"name": filters.supplier}, fields)
@@ -49,8 +53,13 @@
filters.company, filters.from_date, filters.to_date)
if total_invoiced_amount or tds_deducted:
- out.append([supplier.pan, supplier.name, tds.name, supplier.supplier_type,
- rate, total_invoiced_amount, tds_deducted])
+ row = [supplier.pan, supplier.name]
+
+ if filters.naming_series == 'Naming Series':
+ row.append(supplier.supplier_name)
+
+ row.extend([tds.name, supplier.supplier_type, rate, total_invoiced_amount, tds_deducted])
+ out.append(row)
return out
@@ -86,7 +95,7 @@
return total_invoiced_amount, tds_deducted
-def get_columns():
+def get_columns(filters):
columns = [
{
"label": _("PAN"),
@@ -100,7 +109,17 @@
"fieldname": "supplier",
"fieldtype": "Link",
"width": 180
- },
+ }]
+
+ if filters.naming_series == 'Naming Series':
+ columns.append({
+ "label": _("Supplier Name"),
+ "fieldname": "supplier_name",
+ "fieldtype": "Data",
+ "width": 180
+ })
+
+ columns.extend([
{
"label": _("Section Code"),
"options": "Tax Withholding Category",
@@ -132,6 +151,6 @@
"fieldtype": "Float",
"width": 90
}
- ]
+ ])
return columns
diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py
index 843b58f..e55c022 100644
--- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py
+++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py
@@ -11,7 +11,7 @@
validate_filters(filters)
set_filters(filters)
- columns = get_columns()
+ columns = get_columns(filters)
if not filters["invoices"]:
return columns, []
@@ -43,6 +43,7 @@
invoices.append(d)
filters["invoices"] = invoices if invoices else filters["invoices"]
+ filters.naming_series = frappe.db.get_single_value('Buying Settings', 'supp_master_name')
def get_result(filters):
supplier_map, tds_docs = get_supplier_map(filters)
@@ -71,9 +72,14 @@
if getdate(filters.from_date) <= gle_map[d][0].posting_date \
and getdate(filters.to_date) >= gle_map[d][0].posting_date:
- out.append([supplier.pan, supplier.name, tds_doc.name,
- supplier.supplier_type, rate, total_amount_credited, tds_deducted,
- gle_map[d][0].posting_date, "Purchase Invoice", d])
+ row = [supplier.pan, supplier.name]
+
+ if filters.naming_series == 'Naming Series':
+ row.append(supplier.supplier_name)
+
+ row.extend([tds_doc.name, supplier.supplier_type, rate, total_amount_credited,
+ tds_deducted, gle_map[d][0].posting_date, "Purchase Invoice", d])
+ out.append(row)
return out
@@ -84,7 +90,7 @@
pan = "pan" if frappe.db.has_column("Supplier", "pan") else "tax_id"
supplier_detail = frappe.db.get_all('Supplier',
{"name": ["in", [d.supplier for d in filters["invoices"]]]},
- ["tax_withholding_category", "name", pan+" as pan", "supplier_type"])
+ ["tax_withholding_category", "name", pan+" as pan", "supplier_type", "supplier_name"])
for d in filters["invoices"]:
supplier_map[d.get("name")] = [k for k in supplier_detail
@@ -113,7 +119,7 @@
return gle_map
-def get_columns():
+def get_columns(filters):
pan = "pan" if frappe.db.has_column("Supplier", "pan") else "tax_id"
columns = [
{
@@ -128,7 +134,17 @@
"fieldname": "supplier",
"fieldtype": "Link",
"width": 180
- },
+ }]
+
+ if filters.naming_series == 'Naming Series':
+ columns.append({
+ "label": _("Supplier Name"),
+ "fieldname": "supplier_name",
+ "fieldtype": "Data",
+ "width": 180
+ })
+
+ columns.extend([
{
"label": _("Section Code"),
"options": "Tax Withholding Category",
@@ -178,7 +194,7 @@
"options": "transaction_type",
"width": 90
}
- ]
+ ])
return columns
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.js b/erpnext/accounts/report/trial_balance/trial_balance.js
index c09fa71..cdc7745 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.js
+++ b/erpnext/accounts/report/trial_balance/trial_balance.js
@@ -13,21 +13,6 @@
"reqd": 1
},
{
- "fieldname":"cost_center",
- "label": __("Cost Center"),
- "fieldtype": "Link",
- "options": "Cost Center",
- "get_query": function() {
- var company = frappe.query_report.get_filter_value('company');
- return {
- "doctype": "Cost Center",
- "filters": {
- "company": company,
- }
- }
- }
- },
- {
"fieldname": "fiscal_year",
"label": __("Fiscal Year"),
"fieldtype": "Link",
@@ -61,6 +46,27 @@
"default": frappe.defaults.get_user_default("year_end_date"),
},
{
+ "fieldname":"cost_center",
+ "label": __("Cost Center"),
+ "fieldtype": "Link",
+ "options": "Cost Center",
+ "get_query": function() {
+ var company = frappe.query_report.get_filter_value('company');
+ return {
+ "doctype": "Cost Center",
+ "filters": {
+ "company": company,
+ }
+ }
+ }
+ },
+ {
+ "fieldname":"finance_book",
+ "label": __("Finance Book"),
+ "fieldtype": "Link",
+ "options": "Finance Book",
+ },
+ {
"fieldname": "with_period_closing_entry",
"label": __("Period Closing Entry"),
"fieldtype": "Check",
@@ -75,6 +81,11 @@
"fieldname": "show_unclosed_fy_pl_balances",
"label": __("Show unclosed fiscal year's P&L balances"),
"fieldtype": "Check"
+ },
+ {
+ "fieldname": "include_default_book_entries",
+ "label": __("Include Default Book Entries"),
+ "fieldtype": "Check"
}
],
"formatter": erpnext.financial_statements.formatter,
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py
index 07dcd4e..6b18c5d 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.py
+++ b/erpnext/accounts/report/trial_balance/trial_balance.py
@@ -67,11 +67,10 @@
gl_entries_by_account = {}
+ opening_balances = get_opening_balances(filters)
set_gl_entries_by_account(filters.company, filters.from_date,
filters.to_date, min_lft, max_rgt, filters, gl_entries_by_account, ignore_closing_entries=not flt(filters.with_period_closing_entry))
- opening_balances = get_opening_balances(filters)
-
total_row = calculate_values(accounts, gl_entries_by_account, opening_balances, filters, company_currency)
accumulate_values_into_parents(accounts, accounts_by_name)
@@ -98,6 +97,18 @@
if not flt(filters.with_period_closing_entry):
additional_conditions += " and ifnull(voucher_type, '')!='Period Closing Voucher'"
+ if filters.cost_center:
+ lft, rgt = frappe.db.get_value('Cost Center', filters.cost_center, ['lft', 'rgt'])
+ additional_conditions += """ and cost_center in (select name from `tabCost Center`
+ where lft >= %s and rgt <= %s)""" % (lft, rgt)
+
+ if filters.finance_book:
+ fb_conditions = " and finance_book = %(finance_book)s"
+ if filters.include_default_book_entries:
+ fb_conditions = " and (finance_book in (%(finance_book)s, %(company_fb)s) or finance_book is null)"
+
+ additional_conditions += fb_conditions
+
gle = frappe.db.sql("""
select
account, sum(debit) as opening_debit, sum(credit) as opening_credit
@@ -112,7 +123,9 @@
"company": filters.company,
"from_date": filters.from_date,
"report_type": report_type,
- "year_start_date": filters.year_start_date
+ "year_start_date": filters.year_start_date,
+ "finance_book": filters.finance_book,
+ "company_fb": frappe.db.get_value("Company", filters.company, 'default_finance_book')
},
as_dict=True)
diff --git a/erpnext/accounts/report/trial_balance_simple/__init__.py b/erpnext/accounts/report/trial_balance_simple/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/accounts/report/trial_balance_simple/__init__.py
diff --git a/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json b/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json
index ea5a97b..fab3a76 100644
--- a/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json
+++ b/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json
@@ -6,13 +6,13 @@
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
- "modified": "2018-11-22 17:40:11.317567",
+ "modified": "2019-01-17 17:20:42.374958",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Trial Balance (Simple)",
"owner": "Administrator",
"prepared_report": 0,
- "query": "select fiscal_year as \"Fiscal Year:Data:80\",\n\tcompany as \"Company:Data:220\",\n\tposting_date as \"Posting Date:Date:100\",\n\taccount as \"Account:Data:380\",\n\tsum(debit) as \"Debit:Currency:140\",\n\tsum(credit) as \"Credit:Currency:140\"\nfrom `tabGL Entry`\ngroup by fiscal_year, company, posting_date, account\norder by fiscal_year, company, posting_date, account",
+ "query": "select fiscal_year as \"Fiscal Year:Data:80\",\n\tcompany as \"Company:Data:220\",\n\tposting_date as \"Posting Date:Date:100\",\n\taccount as \"Account:Data:380\",\n\tsum(debit) as \"Debit:Currency:140\",\n\tsum(credit) as \"Credit:Currency:140\",\n\tfinance_book as \"Finance Book:Link/Finance Book:140\"\nfrom `tabGL Entry`\ngroup by fiscal_year, company, posting_date, account\norder by fiscal_year, company, posting_date, account",
"ref_doctype": "GL Entry",
"report_name": "Trial Balance (Simple)",
"report_type": "Query Report",
diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py
index e33bd83..a8ae94f 100644
--- a/erpnext/accounts/report/utils.py
+++ b/erpnext/accounts/report/utils.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext import get_company_currency, get_default_company
from erpnext.setup.utils import get_exchange_rate
diff --git a/erpnext/accounts/test/test_utils.py b/erpnext/accounts/test/test_utils.py
index 0fca470..628c8ce 100644
--- a/erpnext/accounts/test/test_utils.py
+++ b/erpnext/accounts/test/test_utils.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import unittest
from erpnext.accounts.party import get_party_shipping_address
from frappe.test_runner import make_test_objects
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 6fbe97d..e145a35 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -615,7 +615,7 @@
return held_invoices
-def get_outstanding_invoices(party_type, party, account, condition=None):
+def get_outstanding_invoices(party_type, party, account, condition=None, limit=1000):
outstanding_invoices = []
precision = frappe.get_precision("Sales Invoice", "outstanding_amount")
@@ -628,6 +628,7 @@
invoice = 'Sales Invoice' if erpnext.get_party_account_type(party_type) == 'Receivable' else 'Purchase Invoice'
held_invoices = get_held_invoices(party_type, party)
+ limit_cond = "limit %s" % (limit or 1000)
invoice_list = frappe.db.sql("""
select
@@ -655,11 +656,12 @@
or (voucher_type not in ('Journal Entry', 'Payment Entry')))
group by voucher_type, voucher_no
having (invoice_amount - payment_amount) > 0.005
- order by posting_date, name""".format(
+ order by posting_date, name {limit_cond}""".format(
dr_or_cr=dr_or_cr,
invoice = invoice,
payment_dr_or_cr=payment_dr_or_cr,
- condition=condition or ""
+ condition=condition or "",
+ limit_cond = limit_cond
), {
"party_type": party_type,
"party": party,
diff --git a/erpnext/agriculture/doctype/crop/crop_dashboard.py b/erpnext/agriculture/doctype/crop/crop_dashboard.py
index 715f92b..9a8f26f 100644
--- a/erpnext/agriculture/doctype/crop/crop_dashboard.py
+++ b/erpnext/agriculture/doctype/crop/crop_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/assets/doctype/asset/asset_dashboard.py b/erpnext/assets/doctype/asset/asset_dashboard.py
index 89699f3..b489899 100644
--- a/erpnext/assets/doctype/asset/asset_dashboard.py
+++ b/erpnext/assets/doctype/asset/asset_dashboard.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def get_data():
return {
'fieldname': 'asset_name',
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py
index cce4b27..ab514da 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py
index 9582523..6efbc78 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 3b1f4e0..4586c64 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -156,6 +156,39 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "default_bank_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Bank Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Bank Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "tax_id",
"fieldtype": "Data",
"hidden": 0,
@@ -1463,7 +1496,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2019-01-07 16:52:04.660271",
+ "modified": "2019-01-17 13:58:08.597792",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",
diff --git a/erpnext/buying/doctype/supplier/supplier_dashboard.py b/erpnext/buying/doctype/supplier/supplier_dashboard.py
index f971776..aea1e2d 100644
--- a/erpnext/buying/doctype/supplier/supplier_dashboard.py
+++ b/erpnext/buying/doctype/supplier/supplier_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py
index 0387437..6b40305 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py
index ff7f119..3d2305e 100644
--- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py
+++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py
index 9d8e1bf..42d0df0 100644
--- a/erpnext/config/accounts.py
+++ b/erpnext/config/accounts.py
@@ -351,6 +351,36 @@
"is_query_report": True,
"doctype": "Sales Invoice"
},
+ {
+ "type": "report",
+ "name": "Item-wise Sales Register",
+ "is_query_report": True,
+ "doctype": "Sales Invoice"
+ },
+ {
+ "type": "report",
+ "name": "Item-wise Purchase Register",
+ "is_query_report": True,
+ "doctype": "Purchase Invoice"
+ },
+ {
+ "type": "report",
+ "name": "Profitability Analysis",
+ "doctype": "GL Entry",
+ "is_query_report": True,
+ },
+ {
+ "type": "report",
+ "name": "Customer Ledger Summary",
+ "doctype": "Sales Invoice",
+ "is_query_report": True,
+ },
+ {
+ "type": "report",
+ "name": "Supplier Ledger Summary",
+ "doctype": "Sales Invoice",
+ "is_query_report": True,
+ }
]
},
{
@@ -365,12 +395,6 @@
},
{
"type": "report",
- "name": "Profitability Analysis",
- "doctype": "GL Entry",
- "is_query_report": True,
- },
- {
- "type": "report",
"name": "Payment Period Based On Invoice Date",
"is_query_report": True,
"doctype": "Journal Entry"
@@ -383,18 +407,6 @@
},
{
"type": "report",
- "name": "Item-wise Sales Register",
- "is_query_report": True,
- "doctype": "Sales Invoice"
- },
- {
- "type": "report",
- "name": "Item-wise Purchase Register",
- "is_query_report": True,
- "doctype": "Purchase Invoice"
- },
- {
- "type": "report",
"name": "Accounts Receivable Summary",
"doctype": "Sales Invoice",
"is_query_report": True
diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py
index dd67005..5ac46bd 100644
--- a/erpnext/config/crm.py
+++ b/erpnext/config/crm.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/config/maintenance.py b/erpnext/config/maintenance.py
index 7a44f55..97be47c 100644
--- a/erpnext/config/maintenance.py
+++ b/erpnext/config/maintenance.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/config/website.py b/erpnext/config/website.py
index 237c49c..59e7d40 100644
--- a/erpnext/config/website.py
+++ b/erpnext/config/website.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index cd373b8..197b955 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -248,7 +248,6 @@
if self.get("is_subcontracted"):
args["is_subcontracted"] = self.is_subcontracted
ret = get_item_details(args)
-
for fieldname, value in ret.items():
if item.meta.get_field(fieldname) and value is not None:
if (item.get(fieldname) is None or fieldname in force_item_fields):
@@ -267,9 +266,10 @@
if ret.get("pricing_rule"):
# if user changed the discount percentage then set user's discount percentage ?
+ item.set("pricing_rule", ret.get("pricing_rule"))
item.set("discount_percentage", ret.get("discount_percentage"))
- if ret.get("pricing_rule_for") == "Price":
- item.set("pricing_list_rate", ret.get("pricing_list_rate"))
+ if ret.get("pricing_rule_for") == "Rate":
+ item.set("price_list_rate", ret.get("price_list_rate"))
if item.price_list_rate:
item.rate = flt(item.price_list_rate *
@@ -953,11 +953,12 @@
return list(journal_entries)
-def get_advance_payment_entries(party_type, party, party_account,
- order_doctype, order_list=None, include_unallocated=True, against_all_orders=False):
+def get_advance_payment_entries(party_type, party, party_account, order_doctype,
+ order_list=None, include_unallocated=True, against_all_orders=False, limit=1000):
party_account_field = "paid_from" if party_type == "Customer" else "paid_to"
payment_type = "Receive" if party_type == "Customer" else "Pay"
payment_entries_against_order, unallocated_payment_entries = [], []
+ limit_cond = "limit %s" % (limit or 1000)
if order_list or against_all_orders:
if order_list:
@@ -977,8 +978,8 @@
t1.name = t2.parent and t1.{0} = %s and t1.payment_type = %s
and t1.party_type = %s and t1.party = %s and t1.docstatus = 1
and t2.reference_doctype = %s {1}
- order by t1.posting_date
- """.format(party_account_field, reference_condition),
+ order by t1.posting_date {2}
+ """.format(party_account_field, reference_condition, limit_cond),
[party_account, payment_type, party_type, party,
order_doctype] + order_list, as_dict=1)
@@ -990,8 +991,8 @@
where
{0} = %s and party_type = %s and party = %s and payment_type = %s
and docstatus = 1 and unallocated_amount > 0
- order by posting_date
- """.format(party_account_field), (party_account, party_type, party, payment_type), as_dict=1)
+ order by posting_date {1}
+ """.format(party_account_field, limit_cond), (party_account, party_type, party, payment_type), as_dict=1)
return list(payment_entries_against_order) + list(unallocated_payment_entries)
diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py
index 24726ad..646f238 100644
--- a/erpnext/controllers/item_variant.py
+++ b/erpnext/controllers/item_variant.py
@@ -260,8 +260,6 @@
return results
def copy_attributes_to_variant(item, variant):
- from frappe.model import no_value_fields
-
# copy non no-copy fields
exclude_fields = ["naming_series", "item_code", "item_name", "show_in_website",
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 684a2cd..a988301 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -8,7 +8,7 @@
from erpnext.stock.get_item_details import get_bin_details
from erpnext.stock.utils import get_incoming_rate
from erpnext.stock.get_item_details import get_conversion_factor
-from erpnext.stock.doctype.item.item import get_item_defaults, set_item_default
+from erpnext.stock.doctype.item.item import set_item_default
from frappe.contacts.doctype.address.address import get_address_display
from erpnext.controllers.stock_controller import StockController
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index 63e89ab..0a3cd34 100644
--- a/erpnext/controllers/stock_controller.py
+++ b/erpnext/controllers/stock_controller.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import cint, flt, cstr
-from frappe import msgprint, _
+from frappe import _
import frappe.defaults
from erpnext.accounts.utils import get_fiscal_year
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries, process_gl_map
@@ -14,6 +14,7 @@
class QualityInspectionRequiredError(frappe.ValidationError): pass
class QualityInspectionRejectedError(frappe.ValidationError): pass
+class QualityInspectionNotSubmittedError(frappe.ValidationError): pass
class StockController(AccountsController):
def validate(self):
@@ -338,18 +339,20 @@
qa_required = True
elif self.doctype == "Stock Entry" and not d.quality_inspection and d.t_warehouse:
qa_required = True
+ if self.docstatus == 1 and d.quality_inspection:
+ qa_doc = frappe.get_doc("Quality Inspection", d.quality_inspection)
+ if qa_doc.docstatus == 0:
+ link = frappe.utils.get_link_to_form('Quality Inspection', d.quality_inspection)
+ frappe.throw(_("Quality Inspection: {0} is not submitted for the item: {1} in row {2}").format(link, d.item_code, d.idx), QualityInspectionNotSubmittedError)
- if qa_required:
+ qa_failed = any([r.status=="Rejected" for r in qa_doc.readings])
+ if qa_failed:
+ frappe.throw(_("Row {0}: Quality Inspection rejected for item {1}")
+ .format(d.idx, d.item_code), QualityInspectionRejectedError)
+ elif qa_required :
frappe.msgprint(_("Quality Inspection required for Item {0}").format(d.item_code))
if self.docstatus==1:
raise QualityInspectionRequiredError
- elif self.docstatus == 1:
- if d.quality_inspection:
- qa_doc = frappe.get_doc("Quality Inspection", d.quality_inspection)
- qa_failed = any([r.status=="Rejected" for r in qa_doc.readings])
- if qa_failed:
- frappe.throw(_("Row {0}: Quality Inspection rejected for item {1}")
- .format(d.idx, d.item_code), QualityInspectionRejectedError)
def update_blanket_order(self):
@@ -428,4 +431,4 @@
tuple([posting_date] + [d[1] for d in future_stock_vouchers]), as_dict=1):
gl_entries.setdefault((d.voucher_type, d.voucher_no), []).append(d)
- return gl_entries
\ No newline at end of file
+ return gl_entries
diff --git a/erpnext/crm/doctype/lead/.py b/erpnext/crm/doctype/lead/.py
deleted file mode 100644
index 70a6b22..0000000
--- a/erpnext/crm/doctype/lead/.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.model.document import Document
-
-class Lead(Document):
- pass
diff --git a/erpnext/crm/doctype/lead/lead_dashboard.py b/erpnext/crm/doctype/lead/lead_dashboard.py
index b87fc0e..e8472aa 100644
--- a/erpnext/crm/doctype/lead/lead_dashboard.py
+++ b/erpnext/crm/doctype/lead/lead_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
index bd4a6a2..9ed616a 100644
--- a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
+++ b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/demo/setup/education.py b/erpnext/demo/setup/education.py
index 0403c06..cf9451d 100644
--- a/erpnext/demo/setup/education.py
+++ b/erpnext/demo/setup/education.py
@@ -1,5 +1,6 @@
# 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, json
from frappe.utils.make_random import get_random
@@ -162,7 +163,7 @@
def get_json_path(doctype):
return frappe.get_app_path('erpnext', 'demo', 'data', frappe.scrub(doctype) + '.json')
-
+
def weighted_choice(weights):
totals = []
running_total = 0
diff --git a/erpnext/demo/setup/healthcare.py b/erpnext/demo/setup/healthcare.py
index 3ddb2ae..aa389e5 100644
--- a/erpnext/demo/setup/healthcare.py
+++ b/erpnext/demo/setup/healthcare.py
@@ -1,5 +1,6 @@
# 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, json
from frappe.utils.make_random import get_random
diff --git a/erpnext/domains/agriculture.py b/erpnext/domains/agriculture.py
index 5946247..8c7427a 100644
--- a/erpnext/domains/agriculture.py
+++ b/erpnext/domains/agriculture.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Agriculture Task',
diff --git a/erpnext/domains/distribution.py b/erpnext/domains/distribution.py
index 020ab3b..3661260 100644
--- a/erpnext/domains/distribution.py
+++ b/erpnext/domains/distribution.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Item',
diff --git a/erpnext/domains/education.py b/erpnext/domains/education.py
index 0631f29..c640576 100644
--- a/erpnext/domains/education.py
+++ b/erpnext/domains/education.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Student',
diff --git a/erpnext/domains/healthcare.py b/erpnext/domains/healthcare.py
index 4e783c7..8bd4c76 100644
--- a/erpnext/domains/healthcare.py
+++ b/erpnext/domains/healthcare.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Patient',
diff --git a/erpnext/domains/hospitality.py b/erpnext/domains/hospitality.py
index 09b98c2..2a2d0c6 100644
--- a/erpnext/domains/hospitality.py
+++ b/erpnext/domains/hospitality.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Restaurant',
diff --git a/erpnext/domains/manufacturing.py b/erpnext/domains/manufacturing.py
index 7f328b1..259ee92 100644
--- a/erpnext/domains/manufacturing.py
+++ b/erpnext/domains/manufacturing.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Item',
diff --git a/erpnext/domains/non_profit.py b/erpnext/domains/non_profit.py
index 81aff02..b6772c5 100644
--- a/erpnext/domains/non_profit.py
+++ b/erpnext/domains/non_profit.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Non Profit',
diff --git a/erpnext/domains/retail.py b/erpnext/domains/retail.py
index 07b2e27..7360761 100644
--- a/erpnext/domains/retail.py
+++ b/erpnext/domains/retail.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'POS',
diff --git a/erpnext/domains/services.py b/erpnext/domains/services.py
index 1fb0e19..7a4ffc4 100644
--- a/erpnext/domains/services.py
+++ b/erpnext/domains/services.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
data = {
'desktop_icons': [
'Project',
diff --git a/erpnext/education/__init__.py b/erpnext/education/__init__.py
index 13bc12d..c0589bb 100644
--- a/erpnext/education/__init__.py
+++ b/erpnext/education/__init__.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/education/doctype/student/student_dashboard.py b/erpnext/education/doctype/student/student_dashboard.py
index b36599c..d86f4f2 100644
--- a/erpnext/education/doctype/student/student_dashboard.py
+++ b/erpnext/education/doctype/student/student_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py
index 23acd28..aeb5352 100644
--- a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py
+++ b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def pre_process(issue):
diff --git a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py
index 212f81b..9d3f02e 100644
--- a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py
+++ b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def pre_process(milestone):
return {
'title': milestone.title,
diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
index bf6d85b..fd364e8 100755
--- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
+++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
@@ -4,6 +4,7 @@
# Basic interface to Amazon MWS
# Based on http://code.google.com/p/amazon-mws-python
# Extended to include finances object
+from __future__ import unicode_literals
import urllib
import hashlib
diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py
index 985ac08..58db669 100644
--- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py
+++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py
@@ -6,6 +6,7 @@
@author: pierre
"""
+from __future__ import unicode_literals
import xml.etree.ElementTree as ET
import re
diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py
index 02e1fc9..4b284b2 100644
--- a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py
+++ b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py
index ff1edea..5570e69 100644
--- a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py
+++ b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cstr, cint, get_request_session
diff --git a/erpnext/erpnext_integrations/utils.py b/erpnext/erpnext_integrations/utils.py
index 2c03686..9065779 100644
--- a/erpnext/erpnext_integrations/utils.py
+++ b/erpnext/erpnext_integrations/utils.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
import base64, hashlib, hmac
diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py
index 635464e..70c0b3c 100644
--- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py
+++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py b/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py
index 0dc8970..92cc610 100644
--- a/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py
+++ b/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/healthcare/doctype/patient/patient_dashboard.py b/erpnext/healthcare/doctype/patient/patient_dashboard.py
index 46b1013..e3def72 100644
--- a/erpnext/healthcare/doctype/patient/patient_dashboard.py
+++ b/erpnext/healthcare/doctype/patient/patient_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py
index a030f19..085c4f6 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py b/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py
index ec35211..b08b172 100644
--- a/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py
+++ b/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index e4f90dc..86c230f 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -12,7 +12,7 @@
source_link = "https://github.com/frappe/erpnext"
develop_version = '12.x.x-develop'
-staging_version = '11.0.3-beta.34'
+staging_version = '11.0.3-beta.37'
error_report_email = "support@erpnext.com"
@@ -221,10 +221,15 @@
}
scheduler_events = {
+ "all": [
+ "erpnext.projects.doctype.project.project.project_status_update_reminder"
+ ],
"hourly": [
'erpnext.hr.doctype.daily_work_summary_group.daily_work_summary_group.trigger_emails',
"erpnext.accounts.doctype.subscription.subscription.process_all",
- "erpnext.erpnext_integrations.doctype.amazon_mws_settings.amazon_mws_settings.schedule_get_order_details"
+ "erpnext.erpnext_integrations.doctype.amazon_mws_settings.amazon_mws_settings.schedule_get_order_details",
+ "erpnext.projects.doctype.project.project.hourly_reminder",
+ "erpnext.projects.doctype.project.project.collect_project_status"
],
"daily": [
"erpnext.stock.reorder_item.reorder_item",
@@ -243,7 +248,8 @@
"erpnext.assets.doctype.asset.asset.update_maintenance_status",
"erpnext.assets.doctype.asset.asset.make_post_gl_entry",
"erpnext.crm.doctype.contract.contract.update_status_for_contracts",
- "erpnext.projects.doctype.project.project.update_project_sales_billing"
+ "erpnext.projects.doctype.project.project.update_project_sales_billing",
+ "erpnext.projects.doctype.project.project.send_project_status_email_to_users"
],
"daily_long": [
"erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_latest_price_in_all_boms"
diff --git a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py
index cc5f629..cfdd6d3 100644
--- a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py
+++ b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def get_data():
return {
'fieldname': 'attendance_request',
diff --git a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py
index a404b5a..25cda44 100644
--- a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py
+++ b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py
@@ -112,6 +112,10 @@
if isinstance(group_doc, string_types):
group_doc = frappe.get_doc('Daily Work Summary Group', group)
- emails = [d.email for d in group_doc.users if frappe.db.get_value("User", d.user, "enabled")]
+ emails = get_users_email(group_doc)
return emails
+
+def get_users_email(doc):
+ return [d.email for d in doc.users
+ if frappe.db.get_value("User", d.user, "enabled")]
diff --git a/erpnext/hr/doctype/employee/employee_dashboard.py b/erpnext/hr/doctype/employee/employee_dashboard.py
index e62f59f..46461da 100644
--- a/erpnext/hr/doctype/employee/employee_dashboard.py
+++ b/erpnext/hr/doctype/employee/employee_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py
index 2ac6698..f2656e9 100644
--- a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py
+++ b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def get_data():
return {
'transactions': [
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py
index 30828a3..d1599a4 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py
+++ b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def get_data():
return {
'fieldname': 'holiday_list',
diff --git a/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py b/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py
index 37a3474..2aa5498 100644
--- a/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py
+++ b/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def get_data():
return {
'fieldname': 'leave_block_list',
diff --git a/erpnext/hr/doctype/leave_period/leave_period_dashboard.py b/erpnext/hr/doctype/leave_period/leave_period_dashboard.py
index 5214a58..1572de3 100644
--- a/erpnext/hr/doctype/leave_period/leave_period_dashboard.py
+++ b/erpnext/hr/doctype/leave_period/leave_period_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py
index a12ba7f..f97d285 100644
--- a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py
+++ b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def get_data():
return {
'fieldname': 'leave_policy',
diff --git a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py
index 75e0c08..5cae9a8 100644
--- a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py
+++ b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
def get_data():
return {
'fieldname': 'leave_type',
diff --git a/erpnext/hr/doctype/loan/loan_dashboard.py b/erpnext/hr/doctype/loan/loan_dashboard.py
index c621a7f..7256d94 100644
--- a/erpnext/hr/doctype/loan/loan_dashboard.py
+++ b/erpnext/hr/doctype/loan/loan_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py b/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py
index c4fa7f6..7af507d 100644
--- a/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py
+++ b/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py b/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py
index 7a29878..3803c1d 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py
+++ b/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/hr/doctype/training_program/training_program_dashboard.py b/erpnext/hr/doctype/training_program/training_program_dashboard.py
index a314081..441a71b 100644
--- a/erpnext/hr/doctype/training_program/training_program_dashboard.py
+++ b/erpnext/hr/doctype/training_program/training_program_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
index 2c1c4c3..d27c7ac 100644
--- a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
+++ b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
data = {
diff --git a/erpnext/hub_node/api.py b/erpnext/hub_node/api.py
index c236822..0c94df3 100644
--- a/erpnext/hub_node/api.py
+++ b/erpnext/hub_node/api.py
@@ -2,10 +2,6 @@
import frappe
import json
-import io
-import base64
-import os
-import requests
from frappe import _
from frappe.frappeclient import FrappeClient
diff --git a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py
index a9811fc..d48bccf 100644
--- a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py
+++ b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/manufacturing/doctype/operation/test_operation.py b/erpnext/manufacturing/doctype/operation/test_operation.py
index 401ac74..17d206a 100644
--- a/erpnext/manufacturing/doctype/operation/test_operation.py
+++ b/erpnext/manufacturing/doctype/operation/test_operation.py
@@ -1,5 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
+from __future__ import unicode_literals
import frappe
import unittest
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py
index 8611372..91c2855 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/manufacturing/doctype/work_order/.py b/erpnext/manufacturing/doctype/work_order/.py
deleted file mode 100644
index 4476b16..0000000
--- a/erpnext/manufacturing/doctype/work_order/.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import frappe
-
-def set_required_items(production_order):
- pass
-
-def reserve_for_production(production_order):
- '''Reserve pending raw materials for production'''
- pass
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js
index 7b2f9a4..22d74e8 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.js
+++ b/erpnext/manufacturing/doctype/work_order/work_order.js
@@ -349,7 +349,8 @@
before_submit: function(frm) {
frm.toggle_reqd(["fg_warehouse", "wip_warehouse"], true);
frm.fields_dict.required_items.grid.toggle_reqd("source_warehouse", true);
- frm.toggle_reqd("transfer_material_against", frm.doc.operations);
+ frm.toggle_reqd("transfer_material_against",
+ frm.doc.operations && frm.doc.operations.length > 0);
frm.fields_dict.operations.grid.toggle_reqd("workstation", frm.doc.operations);
},
diff --git a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py
index 02fbfcd..3fe5282 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py
+++ b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/non_profit/doctype/member/member_dashboard.py b/erpnext/non_profit/doctype/member/member_dashboard.py
index c44a9a8..945fb7b 100644
--- a/erpnext/non_profit/doctype/member/member_dashboard.py
+++ b/erpnext/non_profit/doctype/member/member_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 082f887..69ad5d1 100755
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -1,5 +1,6 @@
execute:import unidecode # new requirement
erpnext.patches.v8_0.move_perpetual_inventory_setting
+erpnext.patches.v8_9.set_print_zero_amount_taxes
erpnext.patches.v11_0.rename_production_order_to_work_order
erpnext.patches.v11_0.refactor_naming_series
erpnext.patches.v11_0.refactor_autoname_naming
@@ -442,7 +443,6 @@
erpnext.patches.v8_9.rename_company_sales_target_field
erpnext.patches.v8_8.set_bom_rate_as_per_uom
erpnext.patches.v8_8.add_new_fields_in_accounts_settings
-erpnext.patches.v8_9.set_print_zero_amount_taxes
erpnext.patches.v8_9.set_default_customer_group
erpnext.patches.v8_9.delete_gst_doctypes_for_outside_india_accounts
erpnext.patches.v8_9.set_default_fields_in_variant_settings
@@ -580,4 +580,5 @@
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
erpnext.patches.v11_0.set_missing_gst_hsn_code
erpnext.patches.v11_0.rename_bom_wo_fields
-erpnext.patches.v11_0.rename_additional_salary_component_additional_salary
\ No newline at end of file
+erpnext.patches.v11_0.rename_additional_salary_component_additional_salary
+erpnext.patches.v11_0.renamed_from_to_fields_in_project
\ No newline at end of file
diff --git a/erpnext/patches/v10_0/copy_projects_renamed_fields.py b/erpnext/patches/v10_0/copy_projects_renamed_fields.py
index 58e32b0..80db3bd 100644
--- a/erpnext/patches/v10_0/copy_projects_renamed_fields.py
+++ b/erpnext/patches/v10_0/copy_projects_renamed_fields.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v10_0/delete_hub_documents.py b/erpnext/patches/v10_0/delete_hub_documents.py
index 6dcfec7..f6a1499 100644
--- a/erpnext/patches/v10_0/delete_hub_documents.py
+++ b/erpnext/patches/v10_0/delete_hub_documents.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py b/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py
index f888ef6..2e30951 100644
--- a/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py
+++ b/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v10_0/set_discount_amount.py b/erpnext/patches/v10_0/set_discount_amount.py
index eb8bb2d..d5e2c5a 100644
--- a/erpnext/patches/v10_0/set_discount_amount.py
+++ b/erpnext/patches/v10_0/set_discount_amount.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
diff --git a/erpnext/patches/v10_0/set_student_party_type.py b/erpnext/patches/v10_0/set_student_party_type.py
index 6ac1451..08376ae 100644
--- a/erpnext/patches/v10_0/set_student_party_type.py
+++ b/erpnext/patches/v10_0/set_student_party_type.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py b/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py
index 1ae8b4a..7e2ff7a 100644
--- a/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py
+++ b/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v10_0/update_asset_calculate_depreciation.py b/erpnext/patches/v10_0/update_asset_calculate_depreciation.py
index 44b8c7f..b947a40 100644
--- a/erpnext/patches/v10_0/update_asset_calculate_depreciation.py
+++ b/erpnext/patches/v10_0/update_asset_calculate_depreciation.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v10_0/update_hub_connector_domain.py b/erpnext/patches/v10_0/update_hub_connector_domain.py
index 808ae77..baf580a 100644
--- a/erpnext/patches/v10_0/update_hub_connector_domain.py
+++ b/erpnext/patches/v10_0/update_hub_connector_domain.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v10_0/update_lft_rgt_for_employee.py b/erpnext/patches/v10_0/update_lft_rgt_for_employee.py
index 82fbeaa..46ca786 100644
--- a/erpnext/patches/v10_0/update_lft_rgt_for_employee.py
+++ b/erpnext/patches/v10_0/update_lft_rgt_for_employee.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.utils.nestedset import rebuild_tree
diff --git a/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py b/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py
index b0df918..7b2c366 100644
--- a/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py
+++ b/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.stock.utils import get_bin
diff --git a/erpnext/patches/v10_0/update_status_in_purchase_receipt.py b/erpnext/patches/v10_0/update_status_in_purchase_receipt.py
index 69e2bb8..a0bdd9e 100644
--- a/erpnext/patches/v10_0/update_status_in_purchase_receipt.py
+++ b/erpnext/patches/v10_0/update_status_in_purchase_receipt.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v10_0/update_territory_and_customer_group.py b/erpnext/patches/v10_0/update_territory_and_customer_group.py
index c02d327..8f0c230 100644
--- a/erpnext/patches/v10_0/update_territory_and_customer_group.py
+++ b/erpnext/patches/v10_0/update_territory_and_customer_group.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.rename_doc import get_fetch_fields
diff --git a/erpnext/patches/v11_0/add_default_dispatch_notification_template.py b/erpnext/patches/v11_0/add_default_dispatch_notification_template.py
index 08006ad..f4c1895 100644
--- a/erpnext/patches/v11_0/add_default_dispatch_notification_template.py
+++ b/erpnext/patches/v11_0/add_default_dispatch_notification_template.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import os
import frappe
diff --git a/erpnext/patches/v11_0/add_default_email_template_for_leave.py b/erpnext/patches/v11_0/add_default_email_template_for_leave.py
index bd86ae2..f722be2 100644
--- a/erpnext/patches/v11_0/add_default_email_template_for_leave.py
+++ b/erpnext/patches/v11_0/add_default_email_template_for_leave.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe, os
from frappe import _
diff --git a/erpnext/patches/v11_0/add_expense_claim_default_account.py b/erpnext/patches/v11_0/add_expense_claim_default_account.py
index 6850202..eecf755 100644
--- a/erpnext/patches/v11_0/add_expense_claim_default_account.py
+++ b/erpnext/patches/v11_0/add_expense_claim_default_account.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py b/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py
index 029ea87..d956052 100644
--- a/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py
+++ b/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py b/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py
index 064e036..5a30c78 100644
--- a/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py
+++ b/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py
@@ -1,6 +1,7 @@
# 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
def execute():
diff --git a/erpnext/patches/v11_0/add_market_segments.py b/erpnext/patches/v11_0/add_market_segments.py
index 0e7a23a..ed47d42 100644
--- a/erpnext/patches/v11_0/add_market_segments.py
+++ b/erpnext/patches/v11_0/add_market_segments.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/patches/v11_0/add_sales_stages.py b/erpnext/patches/v11_0/add_sales_stages.py
index 69182c2..ac2ae15 100644
--- a/erpnext/patches/v11_0/add_sales_stages.py
+++ b/erpnext/patches/v11_0/add_sales_stages.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.setup.setup_wizard.operations.install_fixtures import add_sale_stages
diff --git a/erpnext/patches/v11_0/change_healthcare_desktop_icons.py b/erpnext/patches/v11_0/change_healthcare_desktop_icons.py
index ed7df50..0b77395 100644
--- a/erpnext/patches/v11_0/change_healthcare_desktop_icons.py
+++ b/erpnext/patches/v11_0/change_healthcare_desktop_icons.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py
index ee336be..462f830 100644
--- a/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py
+++ b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/create_default_success_action.py b/erpnext/patches/v11_0/create_default_success_action.py
index 29687d2..31feff2 100644
--- a/erpnext/patches/v11_0/create_default_success_action.py
+++ b/erpnext/patches/v11_0/create_default_success_action.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.setup.install import create_default_success_action
diff --git a/erpnext/patches/v11_0/create_department_records_for_each_company.py b/erpnext/patches/v11_0/create_department_records_for_each_company.py
index eb48eed..1257f19 100644
--- a/erpnext/patches/v11_0/create_department_records_for_each_company.py
+++ b/erpnext/patches/v11_0/create_department_records_for_each_company.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils.nestedset import rebuild_tree
diff --git a/erpnext/patches/v11_0/drop_column_max_days_allowed.py b/erpnext/patches/v11_0/drop_column_max_days_allowed.py
index f663674..591c521 100644
--- a/erpnext/patches/v11_0/drop_column_max_days_allowed.py
+++ b/erpnext/patches/v11_0/drop_column_max_days_allowed.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py
index fc552a9..9925b70 100644
--- a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py
+++ b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.regional.india.setup import make_custom_fields
diff --git a/erpnext/patches/v11_0/hr_ux_cleanups.py b/erpnext/patches/v11_0/hr_ux_cleanups.py
index acaf83d..80476c8 100644
--- a/erpnext/patches/v11_0/hr_ux_cleanups.py
+++ b/erpnext/patches/v11_0/hr_ux_cleanups.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/inter_state_field_for_gst.py b/erpnext/patches/v11_0/inter_state_field_for_gst.py
index 7f5c3aa..232d442 100644
--- a/erpnext/patches/v11_0/inter_state_field_for_gst.py
+++ b/erpnext/patches/v11_0/inter_state_field_for_gst.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.regional.india.setup import make_custom_fields
diff --git a/erpnext/patches/v11_0/move_leave_approvers_from_employee.py b/erpnext/patches/v11_0/move_leave_approvers_from_employee.py
index 304bf7d..edab34c 100644
--- a/erpnext/patches/v11_0/move_leave_approvers_from_employee.py
+++ b/erpnext/patches/v11_0/move_leave_approvers_from_employee.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v11_0/rebuild_tree_for_company.py b/erpnext/patches/v11_0/rebuild_tree_for_company.py
index 0fc4780..4cb74c7 100644
--- a/erpnext/patches/v11_0/rebuild_tree_for_company.py
+++ b/erpnext/patches/v11_0/rebuild_tree_for_company.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.utils.nestedset import rebuild_tree
diff --git a/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py b/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py
index eef6722..7c8a822 100644
--- a/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py
+++ b/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from erpnext.domains.healthcare import data
diff --git a/erpnext/patches/v11_0/remove_land_unit_icon.py b/erpnext/patches/v11_0/remove_land_unit_icon.py
index 98051cc..f28c16f 100644
--- a/erpnext/patches/v11_0/remove_land_unit_icon.py
+++ b/erpnext/patches/v11_0/remove_land_unit_icon.py
@@ -1,6 +1,8 @@
# Copyright (c) 2018, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
+from __future__ import unicode_literals
+
# imports - module imports
import frappe
diff --git a/erpnext/patches/v11_0/remove_subscriber_doctype.py b/erpnext/patches/v11_0/remove_subscriber_doctype.py
index 4e50c35..4839a20 100644
--- a/erpnext/patches/v11_0/remove_subscriber_doctype.py
+++ b/erpnext/patches/v11_0/remove_subscriber_doctype.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py
index 8fa876d..8eb7016 100644
--- a/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py
+++ b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
# this patch should have been included with this PR https://github.com/frappe/erpnext/pull/14302
diff --git a/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py b/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py
index e32149e..c03ab0b 100644
--- a/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py
+++ b/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py
@@ -1,6 +1,7 @@
# 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.model.rename_doc import rename_doc
diff --git a/erpnext/patches/v11_0/rename_employee_loan_to_loan.py b/erpnext/patches/v11_0/rename_employee_loan_to_loan.py
index e674137..b2ff6b8 100644
--- a/erpnext/patches/v11_0/rename_employee_loan_to_loan.py
+++ b/erpnext/patches/v11_0/rename_employee_loan_to_loan.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v11_0/rename_field_max_days_allowed.py b/erpnext/patches/v11_0/rename_field_max_days_allowed.py
index 730b271..4e99fac 100644
--- a/erpnext/patches/v11_0/rename_field_max_days_allowed.py
+++ b/erpnext/patches/v11_0/rename_field_max_days_allowed.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py b/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py
index ba18de8..8fdac07 100644
--- a/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py
+++ b/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.rename_doc import rename_doc
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v11_0/rename_healthcare_fields.py b/erpnext/patches/v11_0/rename_healthcare_fields.py
index d47a3c3..9aeb433 100644
--- a/erpnext/patches/v11_0/rename_healthcare_fields.py
+++ b/erpnext/patches/v11_0/rename_healthcare_fields.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
from frappe.modules import scrub, get_doctype_module
diff --git a/erpnext/patches/v11_0/rename_members_with_naming_series.py b/erpnext/patches/v11_0/rename_members_with_naming_series.py
index 7fa1b09..84f5518 100644
--- a/erpnext/patches/v11_0/rename_members_with_naming_series.py
+++ b/erpnext/patches/v11_0/rename_members_with_naming_series.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py b/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py
new file mode 100644
index 0000000..4f68440
--- /dev/null
+++ b/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py
@@ -0,0 +1,13 @@
+# 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.model.utils.rename_field import rename_field
+
+def execute():
+ frappe.reload_doc('projects', 'doctype', 'project')
+
+ if frappe.db.has_column('Project', 'from'):
+ rename_field('Project', 'from', 'from_time')
+ rename_field('Project', 'to', 'to_time')
\ No newline at end of file
diff --git a/erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py b/erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py
index fac772c..56e95e0 100644
--- a/erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py
+++ b/erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/set_default_email_template_in_hr.py b/erpnext/patches/v11_0/set_default_email_template_in_hr.py
index a4bc355..e895eae 100644
--- a/erpnext/patches/v11_0/set_default_email_template_in_hr.py
+++ b/erpnext/patches/v11_0/set_default_email_template_in_hr.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/set_department_for_doctypes.py b/erpnext/patches/v11_0/set_department_for_doctypes.py
index b1098ab..175d2a1 100644
--- a/erpnext/patches/v11_0/set_department_for_doctypes.py
+++ b/erpnext/patches/v11_0/set_department_for_doctypes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
# Set department value based on employee value
diff --git a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py
index 3c2cea2..4353ef8 100644
--- a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py
+++ b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_html
diff --git a/erpnext/patches/v11_0/set_salary_component_properties.py b/erpnext/patches/v11_0/set_salary_component_properties.py
index a45c38f..fa3605b 100644
--- a/erpnext/patches/v11_0/set_salary_component_properties.py
+++ b/erpnext/patches/v11_0/set_salary_component_properties.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py b/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py
index ca8f0dc..d0cabb3 100644
--- a/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py
+++ b/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.workflow import get_workflow_name
diff --git a/erpnext/patches/v11_0/set_user_permissions_for_department.py b/erpnext/patches/v11_0/set_user_permissions_for_department.py
index a18f3ff..7bd8577 100644
--- a/erpnext/patches/v11_0/set_user_permissions_for_department.py
+++ b/erpnext/patches/v11_0/set_user_permissions_for_department.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/skip_user_permission_check_for_department.py b/erpnext/patches/v11_0/skip_user_permission_check_for_department.py
index 7f7cfc1..0f7fad7 100644
--- a/erpnext/patches/v11_0/skip_user_permission_check_for_department.py
+++ b/erpnext/patches/v11_0/skip_user_permission_check_for_department.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.desk.form.linked_with import get_linked_doctypes
diff --git a/erpnext/patches/v11_0/uom_conversion_data.py b/erpnext/patches/v11_0/uom_conversion_data.py
index 9cd5743..91470b3 100644
--- a/erpnext/patches/v11_0/uom_conversion_data.py
+++ b/erpnext/patches/v11_0/uom_conversion_data.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe, json
def execute():
diff --git a/erpnext/patches/v11_0/update_brand_in_item_price.py b/erpnext/patches/v11_0/update_brand_in_item_price.py
index a19a6c4..a8d3fab 100644
--- a/erpnext/patches/v11_0/update_brand_in_item_price.py
+++ b/erpnext/patches/v11_0/update_brand_in_item_price.py
@@ -1,6 +1,7 @@
# 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
def execute():
@@ -10,5 +11,5 @@
set
`tabItem Price`.brand = `tabItem`.brand
where
- `tabItem Price`.item_code = `tabItem`.name
+ `tabItem Price`.item_code = `tabItem`.name
and `tabItem`.brand is not null and `tabItem`.brand != ''""")
\ No newline at end of file
diff --git a/erpnext/patches/v11_0/update_hub_url.py b/erpnext/patches/v11_0/update_hub_url.py
index 40181a2..6c6ca3c 100644
--- a/erpnext/patches/v11_0/update_hub_url.py
+++ b/erpnext/patches/v11_0/update_hub_url.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v11_0/update_sales_partner_type.py b/erpnext/patches/v11_0/update_sales_partner_type.py
index 508c51a..b393926 100644
--- a/erpnext/patches/v11_0/update_sales_partner_type.py
+++ b/erpnext/patches/v11_0/update_sales_partner_type.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py
index 8f08699..fcb76af 100644
--- a/erpnext/patches/v11_0/update_total_qty_field.py
+++ b/erpnext/patches/v11_0/update_total_qty_field.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v4_4/make_email_accounts.py b/erpnext/patches/v4_4/make_email_accounts.py
index d055fce..57df1ae 100644
--- a/erpnext/patches/v4_4/make_email_accounts.py
+++ b/erpnext/patches/v4_4/make_email_accounts.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model import default_fields
diff --git a/erpnext/patches/v5_0/convert_stock_reconciliation.py b/erpnext/patches/v5_0/convert_stock_reconciliation.py
index 8a0b93d..75d1da7 100644
--- a/erpnext/patches/v5_0/convert_stock_reconciliation.py
+++ b/erpnext/patches/v5_0/convert_stock_reconciliation.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe, json
def execute():
diff --git a/erpnext/patches/v5_0/execute_on_doctype_update.py b/erpnext/patches/v5_0/execute_on_doctype_update.py
index 9641320..70b1d8d 100644
--- a/erpnext/patches/v5_0/execute_on_doctype_update.py
+++ b/erpnext/patches/v5_0/execute_on_doctype_update.py
@@ -1,6 +1,7 @@
# 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
def execute():
diff --git a/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py b/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py
index 062159b..30dc0f8 100644
--- a/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py
+++ b/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py
@@ -1,27 +1,27 @@
-
# 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.model.meta import get_field_precision
def execute():
- if not frappe.db.sql("""select name from `tabPatch Log`
+ if not frappe.db.sql("""select name from `tabPatch Log`
where patch = 'erpnext.patches.v5_0.taxes_and_totals_in_party_currency'"""):
return
selling_doctypes = ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice"]
buying_doctypes = ["Supplier Quotation", "Purchase Order", "Purchase Receipt", "Purchase Invoice"]
-
+
for dt in selling_doctypes:
update_values(dt, "Sales Taxes and Charges")
for dt in buying_doctypes:
update_values(dt, "Purchase Taxes and Charges")
-
+
def update_values(dt, tax_table):
rate_field_precision = get_field_precision(frappe.get_meta(dt + " Item").get_field("rate"))
tax_amount_precision = get_field_precision(frappe.get_meta(tax_table).get_field("tax_amount"))
-
+
# update net_total, discount_on
frappe.db.sql("""
UPDATE
@@ -33,7 +33,7 @@
and ifnull(base_total_taxes_and_charges, 0) != 0
and ifnull(total_taxes_and_charges, 0) = 0
""".format(dt, tax_amount_precision))
-
+
# update net_amount
frappe.db.sql("""
UPDATE
@@ -61,6 +61,6 @@
and par.docstatus < 2
and ((ifnull(tax.base_tax_amount, 0) != 0 and ifnull(tax.tax_amount, 0) = 0)
or (ifnull(tax.base_total, 0) != 0 and ifnull(tax.total, 0) = 0)
- or (ifnull(tax.base_tax_amount_after_discount_amount, 0) != 0 and
+ or (ifnull(tax.base_tax_amount_after_discount_amount, 0) != 0 and
ifnull(tax.tax_amount_after_discount_amount, 0) = 0))
""".format(dt, tax_table, tax_amount_precision))
\ No newline at end of file
diff --git a/erpnext/patches/v5_0/item_patches.py b/erpnext/patches/v5_0/item_patches.py
index 37992ad..e223e09 100644
--- a/erpnext/patches/v5_0/item_patches.py
+++ b/erpnext/patches/v5_0/item_patches.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/new_crm_module.py b/erpnext/patches/v5_0/new_crm_module.py
index f7e0793..f5dda1f 100644
--- a/erpnext/patches/v5_0/new_crm_module.py
+++ b/erpnext/patches/v5_0/new_crm_module.py
@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
+from __future__ import unicode_literals
import json
import frappe
diff --git a/erpnext/patches/v5_0/newsletter.py b/erpnext/patches/v5_0/newsletter.py
index fcf95ca..63e3312 100644
--- a/erpnext/patches/v5_0/newsletter.py
+++ b/erpnext/patches/v5_0/newsletter.py
@@ -1,6 +1,7 @@
# 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
import frappe.permissions
diff --git a/erpnext/patches/v5_0/portal_fixes.py b/erpnext/patches/v5_0/portal_fixes.py
index 260222e..1fefd99 100644
--- a/erpnext/patches/v5_0/portal_fixes.py
+++ b/erpnext/patches/v5_0/portal_fixes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
import erpnext.setup.install
diff --git a/erpnext/patches/v5_0/project_costing.py b/erpnext/patches/v5_0/project_costing.py
index 33bb9c1..e2d65d0 100644
--- a/erpnext/patches/v5_0/project_costing.py
+++ b/erpnext/patches/v5_0/project_costing.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py b/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py
index 89bd580..d5af43c 100644
--- a/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py
+++ b/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py
@@ -1,6 +1,7 @@
# 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 money_in_words
diff --git a/erpnext/patches/v5_0/remove_birthday_events.py b/erpnext/patches/v5_0/remove_birthday_events.py
index 589792a..3ead866 100644
--- a/erpnext/patches/v5_0/remove_birthday_events.py
+++ b/erpnext/patches/v5_0/remove_birthday_events.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/rename_customer_issue.py b/erpnext/patches/v5_0/rename_customer_issue.py
index 5b16fd2..1bd69ce 100644
--- a/erpnext/patches/v5_0/rename_customer_issue.py
+++ b/erpnext/patches/v5_0/rename_customer_issue.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/rename_pos_setting.py b/erpnext/patches/v5_0/rename_pos_setting.py
index ad579b6..bf10333 100644
--- a/erpnext/patches/v5_0/rename_pos_setting.py
+++ b/erpnext/patches/v5_0/rename_pos_setting.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/rename_table_fieldnames.py b/erpnext/patches/v5_0/rename_table_fieldnames.py
index e93070f..59f5343 100644
--- a/erpnext/patches/v5_0/rename_table_fieldnames.py
+++ b/erpnext/patches/v5_0/rename_table_fieldnames.py
@@ -1,6 +1,7 @@
# 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.model.utils.rename_field import rename_field
from frappe.modules import scrub, get_doctype_module
diff --git a/erpnext/patches/v5_0/rename_taxes_and_charges_master.py b/erpnext/patches/v5_0/rename_taxes_and_charges_master.py
index f5fcb3a..e26f48c 100644
--- a/erpnext/patches/v5_0/rename_taxes_and_charges_master.py
+++ b/erpnext/patches/v5_0/rename_taxes_and_charges_master.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
diff --git a/erpnext/patches/v5_0/set_default_company_in_bom.py b/erpnext/patches/v5_0/set_default_company_in_bom.py
index 0b2c921..a5cd761 100644
--- a/erpnext/patches/v5_0/set_default_company_in_bom.py
+++ b/erpnext/patches/v5_0/set_default_company_in_bom.py
@@ -1,6 +1,7 @@
# 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
def execute():
diff --git a/erpnext/patches/v5_0/set_footer_address.py b/erpnext/patches/v5_0/set_footer_address.py
index a3324a0..8120d83 100644
--- a/erpnext/patches/v5_0/set_footer_address.py
+++ b/erpnext/patches/v5_0/set_footer_address.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/stock_entry_update_value.py b/erpnext/patches/v5_0/stock_entry_update_value.py
index 9abd315..ba1af31 100644
--- a/erpnext/patches/v5_0/stock_entry_update_value.py
+++ b/erpnext/patches/v5_0/stock_entry_update_value.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py b/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py
index f4ed66b..76d1082 100644
--- a/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py
+++ b/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py
@@ -1,7 +1,7 @@
-
# 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.model.meta import get_field_precision
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
@@ -20,20 +20,20 @@
frappe.reload_doctype(dt)
frappe.reload_doctype(dt + " Item")
frappe.reload_doctype(tax_table)
-
+
net_total_precision = get_field_precision(frappe.get_meta(dt).get_field("net_total"))
for field in ("total", "base_total", "base_net_total"):
make_property_setter(dt, field, "precision", net_total_precision, "Select")
-
+
rate_field_precision = get_field_precision(frappe.get_meta(dt + " Item").get_field("rate"))
for field in ("net_rate", "base_net_rate", "net_amount", "base_net_amount", "base_rate", "base_amount"):
make_property_setter(dt + " Item", field, "precision", rate_field_precision, "Select")
-
+
tax_amount_precision = get_field_precision(frappe.get_meta(tax_table).get_field("tax_amount"))
- for field in ("base_tax_amount", "total", "base_total", "tax_amount_after_discount_amount",
+ for field in ("base_tax_amount", "total", "base_total", "tax_amount_after_discount_amount",
"base_tax_amount_after_discount_amount"):
make_property_setter(tax_table, field, "precision", tax_amount_precision, "Select")
-
+
# update net_total, discount_on
frappe.db.sql("""
UPDATE
@@ -46,7 +46,7 @@
WHERE
docstatus < 2
""".format(dt, net_total_precision))
-
+
# update net_amount
frappe.db.sql("""
UPDATE
diff --git a/erpnext/patches/v5_0/update_dn_against_doc_fields.py b/erpnext/patches/v5_0/update_dn_against_doc_fields.py
index 0fb5085..56f4f48 100644
--- a/erpnext/patches/v5_0/update_dn_against_doc_fields.py
+++ b/erpnext/patches/v5_0/update_dn_against_doc_fields.py
@@ -1,6 +1,7 @@
# 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
def execute():
diff --git a/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py b/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py
index 14426f5..b52785a 100644
--- a/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py
+++ b/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py
@@ -1,6 +1,7 @@
# 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
def execute():
diff --git a/erpnext/patches/v5_0/update_item_and_description_again.py b/erpnext/patches/v5_0/update_item_and_description_again.py
index 6222748..35dedcc 100644
--- a/erpnext/patches/v5_0/update_item_and_description_again.py
+++ b/erpnext/patches/v5_0/update_item_and_description_again.py
@@ -1,6 +1,7 @@
# 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 cstr
import re
diff --git a/erpnext/patches/v5_0/update_item_desc_in_invoice.py b/erpnext/patches/v5_0/update_item_desc_in_invoice.py
index 1f74184..dba35d5 100644
--- a/erpnext/patches/v5_0/update_item_desc_in_invoice.py
+++ b/erpnext/patches/v5_0/update_item_desc_in_invoice.py
@@ -1,6 +1,7 @@
# 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.website.utils import find_first_image
from frappe.utils import cstr
@@ -29,7 +30,7 @@
image = item_details.get(d.item_code).image
else:
desc, image = extract_image_and_description(cstr(d.description))
-
+
if not image:
item_detail = item_details.get(d.item_code)
if item_detail:
diff --git a/erpnext/patches/v5_0/update_item_description_and_image.py b/erpnext/patches/v5_0/update_item_description_and_image.py
index a18df2f..75df39e 100644
--- a/erpnext/patches/v5_0/update_item_description_and_image.py
+++ b/erpnext/patches/v5_0/update_item_description_and_image.py
@@ -1,6 +1,7 @@
# 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.website.utils import find_first_image
from frappe.utils import cstr
diff --git a/erpnext/patches/v5_0/update_item_name_in_bom.py b/erpnext/patches/v5_0/update_item_name_in_bom.py
index f4e2990..5781542 100644
--- a/erpnext/patches/v5_0/update_item_name_in_bom.py
+++ b/erpnext/patches/v5_0/update_item_name_in_bom.py
@@ -1,6 +1,7 @@
# 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
def execute():
diff --git a/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py b/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py
index b858bd8..f31c9fe 100644
--- a/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py
+++ b/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py
index 2133d1c..2a09aa2 100644
--- a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py
+++ b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py
index 187f4ea..5847c83 100644
--- a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py
+++ b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_0/update_operation_description.py b/erpnext/patches/v5_0/update_operation_description.py
index ae7b632..4ce32f3 100644
--- a/erpnext/patches/v5_0/update_operation_description.py
+++ b/erpnext/patches/v5_0/update_operation_description.py
@@ -1,10 +1,11 @@
# 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
import frappe.permissions
def execute():
if "opn_description" in frappe.db.get_table_columns("BOM Operation"):
- frappe.db.sql("""update `tabBOM Operation` set description = opn_description
+ frappe.db.sql("""update `tabBOM Operation` set description = opn_description
where ifnull(description, '') = ''""")
\ No newline at end of file
diff --git a/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py b/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py
index 987247c..53df942 100644
--- a/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py
+++ b/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py
@@ -1,16 +1,17 @@
# 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
def execute():
frappe.db.sql("""
- update
+ update
`tabPurchase Taxes and Charges`
set
tax_amount_after_discount_amount = tax_amount,
base_tax_amount_after_discount_amount = base_tax_amount
where
- ifnull(tax_amount_after_discount_amount, 0) = 0
- and ifnull(base_tax_amount_after_discount_amount, 0) = 0
+ ifnull(tax_amount_after_discount_amount, 0) = 0
+ and ifnull(base_tax_amount_after_discount_amount, 0) = 0
""")
\ No newline at end of file
diff --git a/erpnext/patches/v5_1/rename_roles.py b/erpnext/patches/v5_1/rename_roles.py
index 26208aa..e19c22a 100644
--- a/erpnext/patches/v5_1/rename_roles.py
+++ b/erpnext/patches/v5_1/rename_roles.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v5_4/cleanup_journal_entry.py b/erpnext/patches/v5_4/cleanup_journal_entry.py
index 9100b8f..6860e6a 100644
--- a/erpnext/patches/v5_4/cleanup_journal_entry.py
+++ b/erpnext/patches/v5_4/cleanup_journal_entry.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from pymysql import InternalError
diff --git a/erpnext/patches/v5_7/update_item_description_based_on_item_master.py b/erpnext/patches/v5_7/update_item_description_based_on_item_master.py
index 6851e67..2045358 100644
--- a/erpnext/patches/v5_7/update_item_description_based_on_item_master.py
+++ b/erpnext/patches/v5_7/update_item_description_based_on_item_master.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_0/default_activity_rate.py b/erpnext/patches/v6_0/default_activity_rate.py
index 44fda34..cfbfb72 100644
--- a/erpnext/patches/v6_0/default_activity_rate.py
+++ b/erpnext/patches/v6_0/default_activity_rate.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_0/set_default_title.py b/erpnext/patches/v6_0/set_default_title.py
index 83b6b59..cceff3f 100644
--- a/erpnext/patches/v6_0/set_default_title.py
+++ b/erpnext/patches/v6_0/set_default_title.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_10/email_digest_default_quote.py b/erpnext/patches/v6_10/email_digest_default_quote.py
index 003b317..6139f1a 100644
--- a/erpnext/patches/v6_10/email_digest_default_quote.py
+++ b/erpnext/patches/v6_10/email_digest_default_quote.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_10/fix_jv_total_amount.py b/erpnext/patches/v6_10/fix_jv_total_amount.py
index 3797ff4..42cb9e9 100644
--- a/erpnext/patches/v6_10/fix_jv_total_amount.py
+++ b/erpnext/patches/v6_10/fix_jv_total_amount.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
# patch all for-print field (total amount) in Journal Entry in 2015
diff --git a/erpnext/patches/v6_12/set_overdue_tasks.py b/erpnext/patches/v6_12/set_overdue_tasks.py
index 39d601a..7dbb8ba 100644
--- a/erpnext/patches/v6_12/set_overdue_tasks.py
+++ b/erpnext/patches/v6_12/set_overdue_tasks.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_2/remove_newsletter_duplicates.py b/erpnext/patches/v6_2/remove_newsletter_duplicates.py
index dc5b778..f9d1547 100644
--- a/erpnext/patches/v6_2/remove_newsletter_duplicates.py
+++ b/erpnext/patches/v6_2/remove_newsletter_duplicates.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_24/set_recurring_id.py b/erpnext/patches/v6_24/set_recurring_id.py
index 85a39e3..527a2fd 100644
--- a/erpnext/patches/v6_24/set_recurring_id.py
+++ b/erpnext/patches/v6_24/set_recurring_id.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_3/convert_applicable_territory.py b/erpnext/patches/v6_3/convert_applicable_territory.py
index b1793db..231a483 100644
--- a/erpnext/patches/v6_3/convert_applicable_territory.py
+++ b/erpnext/patches/v6_3/convert_applicable_territory.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_4/email_digest_update.py b/erpnext/patches/v6_4/email_digest_update.py
index a162427..8342b7f 100644
--- a/erpnext/patches/v6_4/email_digest_update.py
+++ b/erpnext/patches/v6_4/email_digest_update.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py b/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py
index dbd34d5..50aa9e5 100644
--- a/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py
+++ b/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py b/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py
index 867a5b2..746a990 100644
--- a/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py
+++ b/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_4/make_image_thumbnail.py b/erpnext/patches/v6_4/make_image_thumbnail.py
index 3315acc..2c86e8a 100644
--- a/erpnext/patches/v6_4/make_image_thumbnail.py
+++ b/erpnext/patches/v6_4/make_image_thumbnail.py
@@ -1,4 +1,4 @@
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_4/set_user_in_contact.py b/erpnext/patches/v6_4/set_user_in_contact.py
index 41f76af..7e8a6ee 100644
--- a/erpnext/patches/v6_4/set_user_in_contact.py
+++ b/erpnext/patches/v6_4/set_user_in_contact.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_8/make_webform_standard.py b/erpnext/patches/v6_8/make_webform_standard.py
index 8633ba6..2cc16a2 100644
--- a/erpnext/patches/v6_8/make_webform_standard.py
+++ b/erpnext/patches/v6_8/make_webform_standard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v6_8/move_drop_ship_to_po_items.py b/erpnext/patches/v6_8/move_drop_ship_to_po_items.py
index 06d158e..7184dee 100644
--- a/erpnext/patches/v6_8/move_drop_ship_to_po_items.py
+++ b/erpnext/patches/v6_8/move_drop_ship_to_po_items.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/calculate_total_costing_amount.py b/erpnext/patches/v7_0/calculate_total_costing_amount.py
index 11fdff9..8ed60a2 100644
--- a/erpnext/patches/v7_0/calculate_total_costing_amount.py
+++ b/erpnext/patches/v7_0/calculate_total_costing_amount.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.utils import flt
diff --git a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
index 4177e07..3af6622 100644
--- a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
+++ b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py b/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py
index 83c738e..e78f163 100644
--- a/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py
+++ b/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.utils import cint
diff --git a/erpnext/patches/v7_0/create_budget_record.py b/erpnext/patches/v7_0/create_budget_record.py
index 607ef690..fd8bec9 100644
--- a/erpnext/patches/v7_0/create_budget_record.py
+++ b/erpnext/patches/v7_0/create_budget_record.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.accounts.doctype.budget.budget import DuplicateBudgetError
diff --git a/erpnext/patches/v7_0/fix_duplicate_icons.py b/erpnext/patches/v7_0/fix_duplicate_icons.py
index f6d227d..9f44202 100644
--- a/erpnext/patches/v7_0/fix_duplicate_icons.py
+++ b/erpnext/patches/v7_0/fix_duplicate_icons.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.desk.doctype.desktop_icon.desktop_icon import (sync_desktop_icons,
diff --git a/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py b/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py
index 6141792..02808a7 100644
--- a/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py
+++ b/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py b/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py
index 727a44e..998c4b6 100644
--- a/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py
+++ b/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/re_route.py b/erpnext/patches/v7_0/re_route.py
index 1db4920..3cec6f3 100644
--- a/erpnext/patches/v7_0/re_route.py
+++ b/erpnext/patches/v7_0/re_route.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe.patches.v7_0.re_route import update_routes
def execute():
diff --git a/erpnext/patches/v7_0/remove_doctypes_and_reports.py b/erpnext/patches/v7_0/remove_doctypes_and_reports.py
index 03461de..746cae0 100644
--- a/erpnext/patches/v7_0/remove_doctypes_and_reports.py
+++ b/erpnext/patches/v7_0/remove_doctypes_and_reports.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/remove_features_setup.py b/erpnext/patches/v7_0/remove_features_setup.py
index 596f7a9..49393cc 100644
--- a/erpnext/patches/v7_0/remove_features_setup.py
+++ b/erpnext/patches/v7_0/remove_features_setup.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.setup.install import create_compact_item_print_custom_field
diff --git a/erpnext/patches/v7_0/rename_prevdoc_fields.py b/erpnext/patches/v7_0/rename_prevdoc_fields.py
index d189056..ded4ad4 100644
--- a/erpnext/patches/v7_0/rename_prevdoc_fields.py
+++ b/erpnext/patches/v7_0/rename_prevdoc_fields.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
import json
from frappe.model.utils.rename_field import update_reports, rename_field, update_property_setters
diff --git a/erpnext/patches/v7_0/rename_salary_components.py b/erpnext/patches/v7_0/rename_salary_components.py
index 8409ca8..de92fc6 100644
--- a/erpnext/patches/v7_0/rename_salary_components.py
+++ b/erpnext/patches/v7_0/rename_salary_components.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import update_property_setters
diff --git a/erpnext/patches/v7_0/rename_time_sheet_doctype.py b/erpnext/patches/v7_0/rename_time_sheet_doctype.py
index a008045..f80a830 100644
--- a/erpnext/patches/v7_0/rename_time_sheet_doctype.py
+++ b/erpnext/patches/v7_0/rename_time_sheet_doctype.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/set_is_group_for_warehouse.py b/erpnext/patches/v7_0/set_is_group_for_warehouse.py
index d3aca21..3e69616 100644
--- a/erpnext/patches/v7_0/set_is_group_for_warehouse.py
+++ b/erpnext/patches/v7_0/set_is_group_for_warehouse.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/update_home_page.py b/erpnext/patches/v7_0/update_home_page.py
index ed88e20..909825c 100644
--- a/erpnext/patches/v7_0/update_home_page.py
+++ b/erpnext/patches/v7_0/update_home_page.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
import erpnext
diff --git a/erpnext/patches/v7_0/update_mins_to_first_response.py b/erpnext/patches/v7_0/update_mins_to_first_response.py
index a89a9c8..1df4b42 100644
--- a/erpnext/patches/v7_0/update_mins_to_first_response.py
+++ b/erpnext/patches/v7_0/update_mins_to_first_response.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.core.doctype.communication.email import update_mins_to_first_communication
diff --git a/erpnext/patches/v7_0/update_party_status.py b/erpnext/patches/v7_0/update_party_status.py
index 9ca3d02..0c6b4ea 100644
--- a/erpnext/patches/v7_0/update_party_status.py
+++ b/erpnext/patches/v7_0/update_party_status.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py b/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py
index 1c41ec8..e90de50 100644
--- a/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py
+++ b/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_0/update_project_in_gl_entry.py b/erpnext/patches/v7_0/update_project_in_gl_entry.py
index 7f9923b..d99e9a4 100644
--- a/erpnext/patches/v7_0/update_project_in_gl_entry.py
+++ b/erpnext/patches/v7_0/update_project_in_gl_entry.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_1/add_field_for_task_dependent.py b/erpnext/patches/v7_1/add_field_for_task_dependent.py
index 96daa13..65b1c74 100644
--- a/erpnext/patches/v7_1/add_field_for_task_dependent.py
+++ b/erpnext/patches/v7_1/add_field_for_task_dependent.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py b/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py
index cbb3ea4..33f809f 100644
--- a/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py
+++ b/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_1/set_budget_against_as_cost_center.py b/erpnext/patches/v7_1/set_budget_against_as_cost_center.py
index 1d334a5..dd9a432 100644
--- a/erpnext/patches/v7_1/set_budget_against_as_cost_center.py
+++ b/erpnext/patches/v7_1/set_budget_against_as_cost_center.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_1/set_currency_exchange_date.py b/erpnext/patches/v7_1/set_currency_exchange_date.py
index 630b7d4..2a2d420 100644
--- a/erpnext/patches/v7_1/set_currency_exchange_date.py
+++ b/erpnext/patches/v7_1/set_currency_exchange_date.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_1/set_student_guardian.py b/erpnext/patches/v7_1/set_student_guardian.py
index 0942505..093c0bf 100644
--- a/erpnext/patches/v7_1/set_student_guardian.py
+++ b/erpnext/patches/v7_1/set_student_guardian.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_1/set_total_amount_currency_in_je.py b/erpnext/patches/v7_1/set_total_amount_currency_in_je.py
index eb4a347..8426ddcd 100644
--- a/erpnext/patches/v7_1/set_total_amount_currency_in_je.py
+++ b/erpnext/patches/v7_1/set_total_amount_currency_in_je.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext import get_default_currency
diff --git a/erpnext/patches/v7_1/update_bom_base_currency.py b/erpnext/patches/v7_1/update_bom_base_currency.py
index c8af033..9a59209 100644
--- a/erpnext/patches/v7_1/update_bom_base_currency.py
+++ b/erpnext/patches/v7_1/update_bom_base_currency.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext import get_default_currency
diff --git a/erpnext/patches/v7_1/update_component_type.py b/erpnext/patches/v7_1/update_component_type.py
index aecbc9f..552fc89 100644
--- a/erpnext/patches/v7_1/update_component_type.py
+++ b/erpnext/patches/v7_1/update_component_type.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.utils import flt
diff --git a/erpnext/patches/v7_1/update_lead_source.py b/erpnext/patches/v7_1/update_lead_source.py
index 7fd4c14..517e66c 100644
--- a/erpnext/patches/v7_1/update_lead_source.py
+++ b/erpnext/patches/v7_1/update_lead_source.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/patches/v7_1/update_portal_roles.py b/erpnext/patches/v7_1/update_portal_roles.py
index 72e9434..482586b 100644
--- a/erpnext/patches/v7_1/update_portal_roles.py
+++ b/erpnext/patches/v7_1/update_portal_roles.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
index 13a2bb8..3b9642d 100644
--- a/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
+++ b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_2/contact_address_links.py b/erpnext/patches/v7_2/contact_address_links.py
index cf23e88..200434c 100644
--- a/erpnext/patches/v7_2/contact_address_links.py
+++ b/erpnext/patches/v7_2/contact_address_links.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.core.doctype.dynamic_link.dynamic_link import deduplicate_dynamic_links
from frappe.utils import update_progress_bar
diff --git a/erpnext/patches/v7_2/mark_students_active.py b/erpnext/patches/v7_2/mark_students_active.py
index 0a2f2d3..7289e4a 100644
--- a/erpnext/patches/v7_2/mark_students_active.py
+++ b/erpnext/patches/v7_2/mark_students_active.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_2/rename_att_date_attendance.py b/erpnext/patches/v7_2/rename_att_date_attendance.py
index b2658ba..7f06d8f 100644
--- a/erpnext/patches/v7_2/rename_att_date_attendance.py
+++ b/erpnext/patches/v7_2/rename_att_date_attendance.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import update_reports, update_users_report_view_settings, update_property_setters
diff --git a/erpnext/patches/v7_2/rename_evaluation_criteria.py b/erpnext/patches/v7_2/rename_evaluation_criteria.py
index d749760..c6520b1 100644
--- a/erpnext/patches/v7_2/rename_evaluation_criteria.py
+++ b/erpnext/patches/v7_2/rename_evaluation_criteria.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v7_2/stock_uom_in_selling.py b/erpnext/patches/v7_2/stock_uom_in_selling.py
index 875fc4e..d029555 100644
--- a/erpnext/patches/v7_2/stock_uom_in_selling.py
+++ b/erpnext/patches/v7_2/stock_uom_in_selling.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_2/update_abbr_in_salary_slips.py b/erpnext/patches/v7_2/update_abbr_in_salary_slips.py
index aa6965f..19dcb5e 100644
--- a/erpnext/patches/v7_2/update_abbr_in_salary_slips.py
+++ b/erpnext/patches/v7_2/update_abbr_in_salary_slips.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_2/update_assessment_modules.py b/erpnext/patches/v7_2/update_assessment_modules.py
index 37ae7c7..2b5e774 100644
--- a/erpnext/patches/v7_2/update_assessment_modules.py
+++ b/erpnext/patches/v7_2/update_assessment_modules.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v7_2/update_attendance_docstatus.py b/erpnext/patches/v7_2/update_attendance_docstatus.py
index 863c0c0..a690526 100644
--- a/erpnext/patches/v7_2/update_attendance_docstatus.py
+++ b/erpnext/patches/v7_2/update_attendance_docstatus.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v7_2/update_guardian_name_in_student_master.py b/erpnext/patches/v7_2/update_guardian_name_in_student_master.py
index 163e7c3..9f589ef 100644
--- a/erpnext/patches/v7_2/update_guardian_name_in_student_master.py
+++ b/erpnext/patches/v7_2/update_guardian_name_in_student_master.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
diff --git a/erpnext/patches/v7_2/update_salary_slips.py b/erpnext/patches/v7_2/update_salary_slips.py
index c6bca8e..11a52f9 100644
--- a/erpnext/patches/v7_2/update_salary_slips.py
+++ b/erpnext/patches/v7_2/update_salary_slips.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.hr.doctype.payroll_entry.payroll_entry import get_month_details
from frappe.utils import cint
diff --git a/erpnext/patches/v7_2/update_website_for_variant.py b/erpnext/patches/v7_2/update_website_for_variant.py
index 6395698..e8eef6e 100644
--- a/erpnext/patches/v7_2/update_website_for_variant.py
+++ b/erpnext/patches/v7_2/update_website_for_variant.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_0/addresses_linked_to_lead.py b/erpnext/patches/v8_0/addresses_linked_to_lead.py
index c485b5b..b5f2234 100644
--- a/erpnext/patches/v8_0/addresses_linked_to_lead.py
+++ b/erpnext/patches/v8_0/addresses_linked_to_lead.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_1/add_hsn_sac_codes.py b/erpnext/patches/v8_1/add_hsn_sac_codes.py
index 0b54f15..0fce96a 100644
--- a/erpnext/patches/v8_1/add_hsn_sac_codes.py
+++ b/erpnext/patches/v8_1/add_hsn_sac_codes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.regional.india.setup import setup
diff --git a/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py b/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py
index 2fa0221..4631602 100644
--- a/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py
+++ b/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py
@@ -1,6 +1,7 @@
# 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
def execute():
diff --git a/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py b/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py
index 1fb297f..4c606af 100644
--- a/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py
+++ b/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_1/gst_fixes.py b/erpnext/patches/v8_1/gst_fixes.py
index b47879c..22fa53b 100644
--- a/erpnext/patches/v8_1/gst_fixes.py
+++ b/erpnext/patches/v8_1/gst_fixes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from erpnext.regional.india.setup import update_address_template
diff --git a/erpnext/patches/v8_1/set_delivery_date_in_so_item.py b/erpnext/patches/v8_1/set_delivery_date_in_so_item.py
index 2e81571..af2d28b 100644
--- a/erpnext/patches/v8_1/set_delivery_date_in_so_item.py
+++ b/erpnext/patches/v8_1/set_delivery_date_in_so_item.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_1/setup_gst_india.py b/erpnext/patches/v8_1/setup_gst_india.py
index 5370fa2..e8b017d 100644
--- a/erpnext/patches/v8_1/setup_gst_india.py
+++ b/erpnext/patches/v8_1/setup_gst_india.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.email import sendmail_to_system_managers
diff --git a/erpnext/patches/v8_1/update_gst_state.py b/erpnext/patches/v8_1/update_gst_state.py
index 5fb9be0..7aaf2d5 100644
--- a/erpnext/patches/v8_1/update_gst_state.py
+++ b/erpnext/patches/v8_1/update_gst_state.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.regional.india import states
diff --git a/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py b/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py
index fe9befe..82beba3 100644
--- a/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py
+++ b/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.regional.india.setup import make_custom_fields
from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_html
diff --git a/erpnext/patches/v8_5/remove_project_type_property_setter.py b/erpnext/patches/v8_5/remove_project_type_property_setter.py
index 03d128d..70a08f5 100644
--- a/erpnext/patches/v8_5/remove_project_type_property_setter.py
+++ b/erpnext/patches/v8_5/remove_project_type_property_setter.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py b/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py
index 9a5fef9..2661914 100644
--- a/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py
+++ b/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_6/rename_bom_update_tool.py b/erpnext/patches/v8_6/rename_bom_update_tool.py
index 45a4ddc..ef5f335 100644
--- a/erpnext/patches/v8_6/rename_bom_update_tool.py
+++ b/erpnext/patches/v8_6/rename_bom_update_tool.py
@@ -1,4 +1,6 @@
+from __future__ import unicode_literals
import frappe
+
def execute():
frappe.delete_doc_if_exists("DocType", "BOM Replace Tool")
diff --git a/erpnext/patches/v8_7/fix_purchase_receipt_status.py b/erpnext/patches/v8_7/fix_purchase_receipt_status.py
index f7037dd..99ecb44 100644
--- a/erpnext/patches/v8_7/fix_purchase_receipt_status.py
+++ b/erpnext/patches/v8_7/fix_purchase_receipt_status.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_7/sync_india_custom_fields.py b/erpnext/patches/v8_7/sync_india_custom_fields.py
index 323b5bc..c684b24 100644
--- a/erpnext/patches/v8_7/sync_india_custom_fields.py
+++ b/erpnext/patches/v8_7/sync_india_custom_fields.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from erpnext.regional.india.setup import make_custom_fields
diff --git a/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py b/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py
index 2b4ac58..f67af90 100644
--- a/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py
+++ b/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py b/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py
index 4ab9cf3..808ae6d 100644
--- a/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py
+++ b/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_9/set_default_customer_group.py b/erpnext/patches/v8_9/set_default_customer_group.py
index e6351c4..cbbe09d 100644
--- a/erpnext/patches/v8_9/set_default_customer_group.py
+++ b/erpnext/patches/v8_9/set_default_customer_group.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v8_9/set_member_party_type.py b/erpnext/patches/v8_9/set_member_party_type.py
index 2934c70..33bbc11 100644
--- a/erpnext/patches/v8_9/set_member_party_type.py
+++ b/erpnext/patches/v8_9/set_member_party_type.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py b/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py
index 33dc519..c685bbc 100644
--- a/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py
+++ b/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v9_0/revert_manufacturing_user_role.py b/erpnext/patches/v9_0/revert_manufacturing_user_role.py
index 5bfa8c3..f38b7f2 100644
--- a/erpnext/patches/v9_0/revert_manufacturing_user_role.py
+++ b/erpnext/patches/v9_0/revert_manufacturing_user_role.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v9_0/set_variant_item_description.py b/erpnext/patches/v9_0/set_variant_item_description.py
index c844571..82d6148 100644
--- a/erpnext/patches/v9_0/set_variant_item_description.py
+++ b/erpnext/patches/v9_0/set_variant_item_description.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.utils import cstr
diff --git a/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py b/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py
index 187cbd3..54ae18b 100644
--- a/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py
+++ b/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe.utils import getdate
diff --git a/erpnext/patches/v9_2/delete_process_payroll.py b/erpnext/patches/v9_2/delete_process_payroll.py
index e9e1b99..91c49f5 100644
--- a/erpnext/patches/v9_2/delete_process_payroll.py
+++ b/erpnext/patches/v9_2/delete_process_payroll.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v9_2/remove_company_from_patient.py b/erpnext/patches/v9_2/remove_company_from_patient.py
index 1ce3445..1a50088 100644
--- a/erpnext/patches/v9_2/remove_company_from_patient.py
+++ b/erpnext/patches/v9_2/remove_company_from_patient.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v9_2/rename_translated_domains_in_en.py b/erpnext/patches/v9_2/rename_translated_domains_in_en.py
index fc3d01c..aec5d43 100644
--- a/erpnext/patches/v9_2/rename_translated_domains_in_en.py
+++ b/erpnext/patches/v9_2/rename_translated_domains_in_en.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
diff --git a/erpnext/patches/v9_2/repost_reserved_qty_for_production.py b/erpnext/patches/v9_2/repost_reserved_qty_for_production.py
index c4eab19..040e655 100644
--- a/erpnext/patches/v9_2/repost_reserved_qty_for_production.py
+++ b/erpnext/patches/v9_2/repost_reserved_qty_for_production.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/patches/v9_2/set_item_name_in_production_order.py b/erpnext/patches/v9_2/set_item_name_in_production_order.py
index 18b5b8c..1f490e6 100644
--- a/erpnext/patches/v9_2/set_item_name_in_production_order.py
+++ b/erpnext/patches/v9_2/set_item_name_in_production_order.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def execute():
diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py
index 93fe5da..2e710c7 100644
--- a/erpnext/portal/utils.py
+++ b/erpnext/portal/utils.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def set_default_role(doc, method):
diff --git a/erpnext/projects/doctype/project/project.json b/erpnext/projects/doctype/project/project.json
index 30e4c8a..5e6c6aa 100644
--- a/erpnext/projects/doctype/project/project.json
+++ b/erpnext/projects/doctype/project/project.json
@@ -1,1872 +1,1941 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:project_name",
- "beta": 0,
- "creation": "2013-03-07 11:55:07",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 0,
- "engine": "InnoDB",
+ "allow_copy": 0,
+ "allow_events_in_timeline": 0,
+ "allow_guest_to_view": 0,
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "field:project_name",
+ "beta": 0,
+ "creation": "2013-03-07 11:55:07",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
+ "editable_grid": 0,
+ "engine": "InnoDB",
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "project_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Project Name",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "",
+ "fieldname": "project_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Project Name",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 1
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Open",
- "fieldname": "status",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 1,
- "label": "Status",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "status",
- "oldfieldtype": "Select",
- "options": "Open\nCompleted\nCancelled",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 1,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "Open",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 1,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "status",
+ "oldfieldtype": "Select",
+ "options": "Open\nCompleted\nCancelled",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 1,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "project_type",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Project Type",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "project_type",
- "oldfieldtype": "Data",
- "options": "Project Type",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "project_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Project Type",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "project_type",
+ "oldfieldtype": "Data",
+ "options": "Project Type",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "is_active",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Is Active",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_active",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "is_active",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Is Active",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_active",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Task Completion",
- "fieldname": "percent_complete_method",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "% Complete Method",
- "length": 0,
- "no_copy": 0,
- "options": "Task Completion\nTask Progress\nTask Weight",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "Task Completion",
+ "fieldname": "percent_complete_method",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "% Complete Method",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Task Completion\nTask Progress\nTask Weight",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "percent_complete",
- "fieldtype": "Percent",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "% Completed",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "percent_complete",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "% Completed",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_5",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_5",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "department",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Department",
- "length": 0,
- "no_copy": 0,
- "options": "Department",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "department",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Department",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Department",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "priority",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 1,
- "label": "Priority",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "priority",
- "oldfieldtype": "Select",
- "options": "Medium\nLow\nHigh",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "priority",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 1,
+ "label": "Priority",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "priority",
+ "oldfieldtype": "Select",
+ "options": "Medium\nLow\nHigh",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "expected_start_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Expected Start Date",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "project_start_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "expected_start_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Expected Start Date",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "project_start_date",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "expected_end_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Expected End Date",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "completion_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "expected_end_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Expected End Date",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "completion_date",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "customer_details",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Customer Details",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "fa fa-user",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "customer_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Customer Details",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "fa fa-user",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "customer",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 1,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Customer",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "customer",
- "oldfieldtype": "Link",
- "options": "Customer",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "customer",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Customer",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "customer",
+ "oldfieldtype": "Link",
+ "options": "Customer",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 1,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_14",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_14",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "sales_order",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Sales Order",
- "length": 0,
- "no_copy": 0,
- "options": "Sales Order",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "sales_order",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Sales Order",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Sales Order",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "users_section",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Users",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "users_section",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Users",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Project will be accessible on the website to these users",
- "fieldname": "users",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Users",
- "length": 0,
- "no_copy": 0,
- "options": "Project User",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "Project will be accessible on the website to these users",
+ "fieldname": "users",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Users",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Project User",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "sb_milestones",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Tasks",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "fa fa-flag",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "sb_milestones",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Tasks",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "fa fa-flag",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "tasks",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Tasks",
- "length": 0,
- "no_copy": 0,
- "options": "Project Task",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "tasks",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Tasks",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Project Task",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "copied_from",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Copied From",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "copied_from",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Copied From",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "section_break0",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Notes",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "fa fa-list",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "section_break0",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Notes",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "fa fa-list",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "notes",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Notes",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "notes",
- "oldfieldtype": "Text Editor",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "notes",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Notes",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "notes",
+ "oldfieldtype": "Text Editor",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "section_break_18",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Start and End Dates",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "section_break_18",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Start and End Dates",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "actual_start_date",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Actual Start Date",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "actual_start_date",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Actual Start Date",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "actual_time",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Actual Time (in Hours)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "actual_time",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Actual Time (in Hours)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_20",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_20",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "actual_end_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Actual End Date",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "act_completion_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "actual_end_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Actual End Date",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "act_completion_date",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "project_details",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Costing and Billing",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "fa fa-money",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "project_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Costing and Billing",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "fa fa-money",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "estimated_costing",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Estimated Cost",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "project_value",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "estimated_costing",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Estimated Cost",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "project_value",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "total_costing_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Costing Amount (via Timesheets)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "",
+ "fieldname": "total_costing_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Costing Amount (via Timesheets)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "total_expense_claim",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Expense Claim (via Expense Claims)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "",
+ "fieldname": "total_expense_claim",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Expense Claim (via Expense Claims)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "total_purchase_cost",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Purchase Cost (via Purchase Invoice)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "total_purchase_cost",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Purchase Cost (via Purchase Invoice)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "company",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Company",
- "length": 0,
- "no_copy": 0,
- "options": "Company",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_28",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_28",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "total_sales_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Sales Amount (via Sales Order)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "total_sales_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Sales Amount (via Sales Order)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "total_billable_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Billable Amount (via Timesheets)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "",
+ "fieldname": "total_billable_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Billable Amount (via Timesheets)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "total_billed_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Billed Amount (via Sales Invoices)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "total_billed_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Billed Amount (via Sales Invoices)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "total_consumed_material_cost",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Consumed Material Cost (via Stock Entry)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "total_consumed_material_cost",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Consumed Material Cost (via Stock Entry)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "cost_center",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Default Cost Center",
- "length": 0,
- "no_copy": 0,
- "options": "Cost Center",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "cost_center",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Cost Center",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Cost Center",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "margin",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Margin",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "margin",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Margin",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0,
"width": "50%"
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "gross_margin",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Gross Margin",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "gross_margin_value",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "gross_margin",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Gross Margin",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "gross_margin_value",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_37",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_37",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "per_gross_margin",
- "fieldtype": "Percent",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Gross Margin %",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "per_gross_margin",
- "oldfieldtype": "Currency",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "per_gross_margin",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Gross Margin %",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "per_gross_margin",
+ "oldfieldtype": "Currency",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "monitor_progress",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Monitor Progress",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "monitor_progress",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Monitor Progress",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "collect_progress",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Collect Progress",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "collect_progress",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Collect Progress",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:doc.collect_progress == true",
- "fieldname": "frequency",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Frequency To Collect Progress",
- "length": 0,
- "no_copy": 0,
- "options": "Hourly\nTwice Daily\nDaily\nWeekly",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "collect_progress",
+ "fieldname": "holiday_list",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Holiday List",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Holiday List",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_45",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:doc.collect_progress == true",
+ "fieldname": "frequency",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Frequency To Collect Progress",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Hourly\nTwice Daily\nDaily\nWeekly",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:(doc.frequency == \"Hourly\" && doc.collect_progress == true)",
- "fieldname": "from",
- "fieldtype": "Time",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "From",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.frequency == \"Hourly\" && doc.collect_progress)",
+ "fieldname": "from_time",
+ "fieldtype": "Time",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "From Time",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:(doc.frequency == \"Hourly\" && doc.collect_progress == true)",
- "fieldname": "to",
- "fieldtype": "Time",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "To",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.frequency == \"Hourly\" && doc.collect_progress)",
+ "fieldname": "to_time",
+ "fieldtype": "Time",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "To Time",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:(doc.frequency == \"Twice Daily\" && doc.collect_progress == true)\n\n",
- "fieldname": "first_email",
- "fieldtype": "Time",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "First Email",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.frequency == \"Twice Daily\" && doc.collect_progress == true)\n\n",
+ "fieldname": "first_email",
+ "fieldtype": "Time",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "First Email",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:(doc.frequency == \"Twice Daily\" && doc.collect_progress == true)",
- "fieldname": "second_email",
- "fieldtype": "Time",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Second Email",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.frequency == \"Twice Daily\" && doc.collect_progress == true)",
+ "fieldname": "second_email",
+ "fieldtype": "Time",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Second Email",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:(doc.frequency == \"Daily\" && doc.collect_progress == true)",
- "fieldname": "daily_time_to_send",
- "fieldtype": "Time",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Time to send",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.frequency == \"Daily\" && doc.collect_progress == true)",
+ "fieldname": "daily_time_to_send",
+ "fieldtype": "Time",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Time to send",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:(doc.frequency == \"Weekly\" && doc.collect_progress == true)",
- "fieldname": "day_to_send",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Day to Send",
- "length": 0,
- "no_copy": 0,
- "options": "Monday\nTuesday\nWednesday\nThursday\nFriday\nSaturday\nSunday",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.frequency == \"Weekly\" && doc.collect_progress == true)",
+ "fieldname": "day_to_send",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Day to Send",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Monday\nTuesday\nWednesday\nThursday\nFriday\nSaturday\nSunday",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:(doc.frequency == \"Weekly\" && doc.collect_progress == true)",
- "fieldname": "weekly_time_to_send",
- "fieldtype": "Time",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Time to send",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.frequency == \"Weekly\" && doc.collect_progress == true)",
+ "fieldname": "weekly_time_to_send",
+ "fieldtype": "Time",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Time to send",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_45",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "collect_progress",
+ "description": "Message will sent to users to get their status on the project",
+ "fieldname": "message",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Message",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "fa fa-puzzle-piece",
- "idx": 29,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 4,
- "modified": "2018-08-30 00:12:09.649654",
- "modified_by": "Administrator",
- "module": "Projects",
- "name": "Project",
- "owner": "Administrator",
+ ],
+ "has_web_view": 0,
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "fa fa-puzzle-piece",
+ "idx": 29,
+ "image_view": 0,
+ "in_create": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 4,
+ "modified": "2019-01-16 23:26:57.376682",
+ "modified_by": "Administrator",
+ "module": "Projects",
+ "name": "Project",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Projects User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "amend": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Projects User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
"write": 1
- },
+ },
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 1,
- "print": 0,
- "read": 1,
- "report": 1,
- "role": "All",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 1,
+ "print": 0,
+ "read": 1,
+ "report": 1,
+ "role": "All",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Projects Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "amend": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Projects Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
"write": 1
}
- ],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "search_fields": "customer, status, priority, is_active",
- "show_name_in_global_search": 1,
- "sort_order": "DESC",
- "timeline_field": "customer",
- "track_changes": 0,
- "track_seen": 1,
+ ],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "customer, status, priority, is_active",
+ "show_name_in_global_search": 1,
+ "sort_order": "DESC",
+ "timeline_field": "customer",
+ "track_changes": 0,
+ "track_seen": 1,
"track_views": 0
}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index de45ec3..dcf485a 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -3,16 +3,16 @@
from __future__ import unicode_literals
import frappe
-
-from frappe.utils import flt, getdate, get_url, now
from frappe import _
-
-from frappe.model.document import Document
+from six import iteritems
+from email_reply_parser import EmailReplyParser
+from frappe.utils import (flt, getdate, get_url, now,
+ nowtime, get_time, today, get_datetime, add_days)
from erpnext.controllers.queries import get_filters_cond
from frappe.desk.reportview import get_match_cond
-import datetime
-
-from six import iteritems
+from erpnext.hr.doctype.daily_work_summary.daily_work_summary import get_users_email
+from erpnext.hr.doctype.daily_work_summary_group.daily_work_summary_group import is_holiday_today
+from frappe.model.document import Document
class Project(Document):
def get_feed(self):
@@ -162,7 +162,7 @@
def is_row_updated(self, row, existing_task_data, fields):
if self.get("__islocal") or not existing_task_data: return True
- d = existing_task_data.get(row.task_id)
+ d = existing_task_data.get(row.task_id, {})
for field in fields:
if row.get(field) != d.get(field):
@@ -406,56 +406,137 @@
def get_cost_center_name(project):
return frappe.db.get_value("Project", project, "cost_center")
-@frappe.whitelist()
def hourly_reminder():
- project = frappe.db.sql("""SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.frequency = "Hourly" and (CURTIME() BETWEEN `tabProject`.from and `tabProject`.to) AND `tabProject`.collect_progress = 1 ORDER BY `tabProject`.name;""")
- create_project_update(project)
+ fields = ["from_time", "to_time"]
+ projects = get_projects_for_collect_progress("Hourly", fields)
-@frappe.whitelist()
-def twice_daily_reminder():
- project = frappe.db.sql("""SELECT `tabProject User`.user FROM `tabProject User` INNER JOIN `tabProject` ON `tabProject`.project_name = `tabProject User`.parent WHERE (`tabProject`.frequency = "Twice Daily") AND ((`tabProject`.first_email BETWEEN DATE_ADD(curtime(), INTERVAL -15 MINUTE) AND DATE_ADD(curtime(), INTERVAL 15 MINUTE)) OR (`tabProject`.second_email BETWEEN DATE_ADD(curtime(), INTERVAL -15 MINUTE) AND DATE_ADD(curtime(), INTERVAL 15 MINUTE))) AND `tabProject`.collect_progress = 1;""")
- create_project_update(project)
+ for project in projects:
+ if (get_time(nowtime()) >= get_time(project.from_time) or
+ get_time(nowtime()) <= get_time(project.to_time)):
+ send_project_update_email_to_users(project.name)
-@frappe.whitelist()
+def project_status_update_reminder():
+ daily_reminder()
+ twice_daily_reminder()
+ weekly_reminder()
+
def daily_reminder():
- project = frappe.db.sql("""SELECT `tabProject User`.user FROM `tabProject User` INNER JOIN `tabProject` ON `tabProject`.project_name = `tabProject User`.parent WHERE (`tabProject`.frequency = "Daily") AND (`tabProject`.daily_time_to_send BETWEEN DATE_ADD(curtime(), INTERVAL -15 MINUTE) AND DATE_ADD(curtime(), INTERVAL 15 MINUTE)) AND `tabProject`.collect_progress = 1;""")
- create_project_update(project)
+ fields = ["daily_time_to_send"]
+ projects = get_projects_for_collect_progress("Daily", fields)
-@frappe.whitelist()
-def weekly():
- today = datetime.datetime.now().strftime("%A")
- project = frappe.db.sql("""SELECT `tabProject User`.user FROM `tabProject User` INNER JOIN `tabProject` ON `tabProject`.project_name = `tabProject User`.parent WHERE (`tabProject`.frequency = "Weekly") AND (`tabProject`.day_to_send = %s) AND (`tabProject`.weekly_time_to_send BETWEEN DATE_ADD(curtime(), INTERVAL -15 MINUTE) AND DATE_ADD(curtime(), INTERVAL 15 MINUTE)) AND `tabProject`.collect_progress = 1""", today)
- create_project_update(project)
+ for project in projects:
+ if not check_project_update_exists(project.name, project.get("daily_time_to_send")):
+ send_project_update_email_to_users(project.name)
-#Call this function in order to generate the Project Update for a specific project
-def create_project_update(project):
- data = []
- date_today = datetime.date.today()
- time_now = frappe.utils.now_datetime().strftime('%H:%M:%S')
- for projects in project:
- project_update_dict = {
- "doctype" : "Project Update",
- "project" : projects[0],
- "date": date_today,
- "time": time_now,
- "naming_series": "UPDATE-.project.-.YY.MM.DD.-"
+def twice_daily_reminder():
+ fields = ["first_email", "second_email"]
+ projects = get_projects_for_collect_progress("Twice Daily", fields)
+
+ for project in projects:
+ for d in fields:
+ if not check_project_update_exists(project.name, project.get(d)):
+ send_project_update_email_to_users(project.name)
+
+def weekly_reminder():
+ fields = ["day_to_send", "weekly_time_to_send"]
+ projects = get_projects_for_collect_progress("Weekly", fields)
+
+ current_day = get_datetime().strftime("%A")
+ for project in projects:
+ if current_day != project.day_to_send:
+ continue
+
+ if not check_project_update_exists(project.name, project.get("weekly_time_to_send")):
+ send_project_update_email_to_users(project.name)
+
+def check_project_update_exists(project, time):
+ data = frappe.db.sql(""" SELECT name from `tabProject Update`
+ WHERE project = %s and date = %s and time >= %s """, (project, today(), time))
+
+ return True if data and data[0][0] else False
+
+def get_projects_for_collect_progress(frequency, fields):
+ fields.extend(["name"])
+
+ return frappe.get_all("Project", fields = fields,
+ filters = {'collect_progress': 1, 'frequency': frequency})
+
+def send_project_update_email_to_users(project):
+ doc = frappe.get_doc('Project', project)
+
+ if is_holiday_today(doc.holiday_list) or not doc.users: return
+
+ project_update = frappe.get_doc({
+ "doctype" : "Project Update",
+ "project" : project,
+ "sent": 0,
+ "date": today(),
+ "time": nowtime(),
+ "naming_series": "UPDATE-.project.-.YY.MM.DD.-",
+ }).insert()
+
+ subject = "For project %s, update your status" % (project)
+
+ incoming_email_account = frappe.db.get_value('Email Account',
+ dict(enable_incoming=1, default_incoming=1), 'email_id')
+
+ frappe.sendmail(recipients=get_users_email(doc),
+ message=doc.message,
+ subject=_(subject),
+ reference_doctype=project_update.doctype,
+ reference_name=project_update.name,
+ reply_to=incoming_email_account
+ )
+
+def collect_project_status():
+ for data in frappe.get_all("Project Update",
+ {'date': today(), 'sent': 0}):
+ replies = frappe.get_all('Communication',
+ fields=['content', 'text_content', 'sender'],
+ filters=dict(reference_doctype="Project Update",
+ reference_name=data.name,
+ communication_type='Communication',
+ sent_or_received='Received'),
+ order_by='creation asc')
+
+ for d in replies:
+ doc = frappe.get_doc("Project Update", data.name)
+ user_data = frappe.db.get_values("User", {"email": d.sender},
+ ["full_name", "user_image", "name"], as_dict=True)[0]
+
+ doc.append("users", {
+ 'user': user_data.name,
+ 'full_name': user_data.full_name,
+ 'image': user_data.user_image,
+ 'project_status': frappe.utils.md_to_html(
+ EmailReplyParser.parse_reply(d.text_content) or d.content
+ )
+ })
+
+ doc.save(ignore_permissions=True)
+
+def send_project_status_email_to_users():
+ yesterday = add_days(today(), -1)
+
+ for d in frappe.get_all("Project Update",
+ {'date': yesterday, 'sent': 0}):
+ doc = frappe.get_doc("Project Update", d.name)
+
+ project_doc = frappe.get_doc('Project', doc.project)
+
+ args = {
+ "users": doc.users,
+ "title": _("Project Summary for {0}").format(yesterday)
}
- project_update = frappe.get_doc(project_update_dict)
- project_update.insert()
- #you can edit your local_host
- local_host = "http://localhost:8003"
- project_update_url = "<a class = 'btn btn-primary' href=%s target='_blank'>" % (local_host +"/desk#Form/Project%20Update/" + (project_update.name)) + ("CREATE PROJECT UPDATE" + "</a>")
- data.append(project_update_url)
- email = frappe.db.sql("""SELECT user from `tabProject User` WHERE parent = %s;""", project[0])
- for emails in email:
- frappe.sendmail(
- recipients=emails,
- subject=frappe._(projects[0]),
- header=[frappe._("Please Update your Project Status"), 'blue'],
- message= project_update_url
- )
- return data
+ frappe.sendmail(recipients=get_users_email(project_doc),
+ template='daily_project_summary',
+ args=args,
+ subject=_("Daily Project Summary for {0}").format(d.name),
+ reference_doctype="Project Update",
+ reference_name=d.name)
+
+ doc.db_set('sent', 1)
def update_project_sales_billing():
sales_update_frequency = frappe.db.get_single_value("Selling Settings", "sales_update_frequency")
diff --git a/erpnext/projects/doctype/project/project_dashboard.py b/erpnext/projects/doctype/project/project_dashboard.py
index 485aae7..39cf016 100644
--- a/erpnext/projects/doctype/project/project_dashboard.py
+++ b/erpnext/projects/doctype/project/project_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/projects/doctype/project_update/project_update.json b/erpnext/projects/doctype/project_update/project_update.json
index 8bcf397..497b2b7 100644
--- a/erpnext/projects/doctype/project_update/project_update.json
+++ b/erpnext/projects/doctype/project_update/project_update.json
@@ -1,5 +1,6 @@
{
"allow_copy": 0,
+ "allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@@ -20,6 +21,40 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "default": "",
+ "fieldname": "naming_series",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Series",
+ "length": 0,
+ "no_copy": 0,
+ "options": "PROJ-UPD-.YYYY.-",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
@@ -53,6 +88,39 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "default": "0",
+ "fieldname": "sent",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Sent",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
@@ -179,39 +247,6 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "progress",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "How is the Project Progressing Right Now?",
- "length": 0,
- "no_copy": 0,
- "options": "Not Updated\nGreat/Quickly\nGood/Steady\nChallenging/Slow\nProblematic/Stuck",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "users",
"fieldtype": "Table",
"hidden": 0,
@@ -245,38 +280,6 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "progress_details",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Progress Details",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -301,40 +304,6 @@
"set_only_once": 0,
"translatable": 0,
"unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "",
- "fieldname": "naming_series",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Series",
- "length": 0,
- "no_copy": 0,
- "options": "PROJ-UPD-.YYYY.-",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
}
],
"has_web_view": 0,
@@ -347,7 +316,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2018-08-21 14:44:21.287709",
+ "modified": "2019-01-16 19:31:05.210656",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project Update",
diff --git a/erpnext/projects/doctype/project_user/project_user.json b/erpnext/projects/doctype/project_user/project_user.json
index 5966816..458028f 100644
--- a/erpnext/projects/doctype/project_user/project_user.json
+++ b/erpnext/projects/doctype/project_user/project_user.json
@@ -1,5 +1,6 @@
{
"allow_copy": 0,
+ "allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@@ -51,6 +52,136 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_from": "user.email",
+ "fieldname": "email",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Email",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fetch_from": "user.user_image",
+ "fieldname": "image",
+ "fieldtype": "Read Only",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Image",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_2",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "user.full_name",
+ "fieldname": "full_name",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Full Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "welcome_email_sent",
"fieldtype": "Check",
"hidden": 0,
@@ -107,6 +238,70 @@
"set_only_once": 0,
"translatable": 0,
"unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "section_break_5",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:parent.doctype == 'Project Update'",
+ "fieldname": "project_status",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Project Status",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
}
],
"has_web_view": 0,
@@ -119,7 +314,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2018-09-09 12:39:38.376816",
+ "modified": "2019-01-17 17:10:05.339735",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project User",
diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js
index cefdbe7..cb9c23b 100644
--- a/erpnext/public/js/controllers/buying.js
+++ b/erpnext/public/js/controllers/buying.js
@@ -28,7 +28,10 @@
if (this.frm.doc.__islocal
&& frappe.meta.has_field(this.frm.doc.doctype, "disable_rounded_total")) {
- this.frm.set_value("disable_rounded_total", cint(frappe.sys_defaults.disable_rounded_total));
+
+ var df = frappe.meta.get_docfield(this.frm.doc.doctype, "disable_rounded_total");
+ var disable = df.default || cint(frappe.sys_defaults.disable_rounded_total);
+ this.frm.set_value("disable_rounded_total", disable);
}
/* eslint-disable */
@@ -119,7 +122,7 @@
if (doc.doctype == "Purchase Order" && item.blanket_order_rate) {
item_rate = item.blanket_order_rate;
}
- item.discount_amount = flt(item_rate) * flt(item.discount_percentage) / 100;
+ item.discount_amount = flt(item_rate) * flt(item.discount_percentage) / 100;
item.rate = flt((item.price_list_rate) - (item.discount_amount), precision('rate', item));
this.calculate_taxes_and_totals();
@@ -266,26 +269,26 @@
d.qty = d.qty - my_qty;
cur_frm.doc.items[i].stock_qty = my_qty*cur_frm.doc.items[i].conversion_factor;
cur_frm.doc.items[i].qty = my_qty;
-
+
frappe.msgprint("Assigning " + d.mr_name + " to " + d.item_code + " (row " + cur_frm.doc.items[i].idx + ")");
if (qty > 0)
{
frappe.msgprint("Splitting " + qty + " units of " + d.item_code);
var newrow = frappe.model.add_child(cur_frm.doc, cur_frm.doc.items[i].doctype, "items");
item_length++;
-
+
for (var key in cur_frm.doc.items[i])
{
newrow[key] = cur_frm.doc.items[i][key];
}
-
+
newrow.idx = item_length;
newrow["stock_qty"] = newrow.conversion_factor*qty;
newrow["qty"] = qty;
-
+
newrow["material_request"] = "";
newrow["material_request_item"] = "";
-
+
}
}
});
@@ -302,7 +305,7 @@
if (doc.auto_repeat) {
frappe.call({
method:"frappe.desk.doctype.auto_repeat.auto_repeat.update_reference",
- args:{
+ args:{
docname: doc.auto_repeat,
reference:doc.name
},
@@ -427,4 +430,3 @@
});
dialog.show();
}
-
diff --git a/erpnext/regional/__init__.py b/erpnext/regional/__init__.py
index 510ed58..dc14d04 100644
--- a/erpnext/regional/__init__.py
+++ b/erpnext/regional/__init__.py
@@ -1,11 +1,12 @@
# Copyright (c) 2018, Frappe Technologies and contributors
# For license information, please see license.txt
+from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext import get_region
def check_deletion_permission(doc, method):
region = get_region()
- if region in ["Nepal", "France"]:
- frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
\ No newline at end of file
+ if region in ["Nepal", "France"] and doc.docstatus != 0:
+ frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
diff --git a/erpnext/regional/france/utils.py b/erpnext/regional/france/utils.py
index 9e9f0ad..e4b72f6 100644
--- a/erpnext/regional/france/utils.py
+++ b/erpnext/regional/france/utils.py
@@ -1,6 +1,7 @@
# Copyright (c) 2018, Frappe Technologies and contributors
# For license information, please see license.txt
+from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext import get_region
diff --git a/erpnext/regional/india/__init__.py b/erpnext/regional/india/__init__.py
index 4a9a211..46c874b 100644
--- a/erpnext/regional/india/__init__.py
+++ b/erpnext/regional/india/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
states = [
'',
'Andaman and Nicobar Islands',
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index a1fba07..e7d0d50 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe, re
from frappe import _
from frappe.utils import cstr, flt, date_diff, getdate
@@ -8,7 +9,7 @@
from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip
def validate_gstin_for_india(doc, method):
- if not hasattr(doc, 'gstin'):
+ if not hasattr(doc, 'gstin') or not doc.gstin:
return
doc.gstin = doc.gstin.upper().strip() if doc.gstin else ""
diff --git a/erpnext/regional/report/eway_bill/eway_bill.py b/erpnext/regional/report/eway_bill/eway_bill.py
index 1b5de27..5b9896b 100644
--- a/erpnext/regional/report/eway_bill/eway_bill.py
+++ b/erpnext/regional/report/eway_bill/eway_bill.py
@@ -16,7 +16,7 @@
return columns, data
def get_data(filters):
-
+
conditions = get_conditions(filters)
data = frappe.db.sql("""
@@ -25,7 +25,7 @@
FROM
`tabDelivery Note` AS dn join `tabDelivery Note Item` AS dni on (dni.parent = dn.name)
WHERE
- dn.docstatus < 2
+ dn.docstatus < 2
%s """ % conditions, as_dict=1)
unit = {
@@ -40,14 +40,14 @@
'Set': "SETS"
}
- # Regular expression set to remove all the special characters
+ # Regular expression set to remove all the special characters
special_characters = "[$%^*()+\\[\]{};':\"\\|<>.?]"
for row in data:
set_defaults(row)
set_taxes(row, filters)
set_address_details(row, special_characters)
-
+
# Eway Bill accepts date as dd/mm/yyyy and not dd-mm-yyyy
row.posting_date = '/'.join(str(row.posting_date).replace("-", "/").split('/')[::-1])
row.lr_date = '/'.join(str(row.lr_date).replace("-", "/").split('/')[::-1])
@@ -66,7 +66,7 @@
return data
def get_conditions(filters):
-
+
conditions = ""
conditions += filters.get('company') and " AND dn.company = '%s' " % filters.get('company') or ""
@@ -92,7 +92,7 @@
row.update({'from_pin_code': pincode and pincode.replace(" ", "") or ''})
row.update({'from_state': state and state.upper() or ''})
row.update({'dispatch_state': row.from_state})
-
+
if row.get('shipping_address_name'):
address_line1, address_line2, city, pincode, state = frappe.db.get_value("Address", row.get('shipping_address_name'), ['address_line1', 'address_line2', 'city', 'pincode', 'state'])
@@ -104,20 +104,23 @@
row.update({'ship_to_state': row.to_state})
def set_taxes(row, filters):
- taxes = frappe.get_list("Sales Taxes and Charges",
+ taxes = frappe.get_list("Sales Taxes and Charges",
filters={
'parent': row.dn_id
- },
+ },
fields=('item_wise_tax_detail', 'account_head'))
account_list = ["cgst_account", "sgst_account", "igst_account", "cess_account"]
taxes_list = frappe.get_list("GST Account",
filters={
- "parent": "GST Settings",
+ "parent": "GST Settings",
"company": filters.company
},
fields=account_list)
+ if not taxes_list:
+ frappe.throw(_("Please set GST Accounts in GST Settings"))
+
item_tax_rate = {}
for tax in taxes:
diff --git a/erpnext/regional/united_arab_emirates/utils.py b/erpnext/regional/united_arab_emirates/utils.py
index 61ffadb..a01c6ce 100644
--- a/erpnext/regional/united_arab_emirates/utils.py
+++ b/erpnext/regional/united_arab_emirates/utils.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe.utils import flt
from erpnext.controllers.taxes_and_totals import get_itemised_tax
diff --git a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py
index 1f84ccf..ec62ba2 100644
--- a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py
+++ b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 608c0e9..a82042f 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -224,6 +224,39 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "default_bank_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Bank Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Bank Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "lead_name",
"fieldtype": "Link",
"hidden": 0,
@@ -1873,7 +1906,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2018-10-01 10:07:34.510264",
+ "modified": "2019-01-17 13:10:24.360875",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer",
diff --git a/erpnext/selling/doctype/customer/customer_dashboard.py b/erpnext/selling/doctype/customer/customer_dashboard.py
index bf01363..f2f430a 100644
--- a/erpnext/selling/doctype/customer/customer_dashboard.py
+++ b/erpnext/selling/doctype/customer/customer_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/selling/doctype/quotation/quotation_dashboard.py b/erpnext/selling/doctype/quotation/quotation_dashboard.py
index d32fd0c..f1ac951 100644
--- a/erpnext/selling/doctype/quotation/quotation_dashboard.py
+++ b/erpnext/selling/doctype/quotation/quotation_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py
index 3b36a2d..78fb0c1 100644
--- a/erpnext/selling/doctype/quotation/test_quotation.py
+++ b/erpnext/selling/doctype/quotation/test_quotation.py
@@ -31,6 +31,26 @@
self.assertFalse(sales_order.get('payment_schedule'))
+ def test_make_sales_order_with_different_currency(self):
+ from erpnext.selling.doctype.quotation.quotation import make_sales_order
+
+ quotation = frappe.copy_doc(test_records[0])
+ quotation.transaction_date = nowdate()
+ quotation.valid_till = add_months(quotation.transaction_date, 1)
+ quotation.insert()
+ quotation.submit()
+
+ sales_order = make_sales_order(quotation.name)
+ sales_order.currency = "USD"
+ sales_order.conversion_rate = 20.0
+ sales_order.delivery_date = "2019-01-01"
+ sales_order.naming_series = "_T-Quotation-"
+ sales_order.transaction_date = nowdate()
+ sales_order.insert()
+
+ self.assertEquals(sales_order.currency, "USD")
+ self.assertNotEqual(sales_order.currency, quotation.currency)
+
def test_make_sales_order(self):
from erpnext.selling.doctype.quotation.quotation import make_sales_order
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 445e02b..b589cde 100755
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -147,7 +147,7 @@
super(SalesOrder, self).validate_with_previous_doc({
"Quotation": {
"ref_dn_field": "prevdoc_docname",
- "compare_fields": [["company", "="], ["currency", "="]]
+ "compare_fields": [["company", "="]]
}
})
diff --git a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py
index 35c643d..aab6db2 100644
--- a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py
+++ b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py b/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py
index f2b7701..f2518f0 100644
--- a/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py
+++ b/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py
@@ -1,6 +1,7 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
+from __future__ import unicode_literals
import unittest
from frappe.utils import nowdate, add_months
from erpnext.selling.report.pending_so_items_for_purchase_request.pending_so_items_for_purchase_request\
diff --git a/erpnext/selling/report/sales_analytics/test_analytics.py b/erpnext/selling/report/sales_analytics/test_analytics.py
index 5d68b06..4d81a1e 100644
--- a/erpnext/selling/report/sales_analytics/test_analytics.py
+++ b/erpnext/selling/report/sales_analytics/test_analytics.py
@@ -1,6 +1,7 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
+from __future__ import unicode_literals
import frappe
import frappe.defaults
import unittest
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.json b/erpnext/setup/doctype/authorization_rule/authorization_rule.json
index e70bf5c..caca56c 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.json
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.json
@@ -1,5 +1,6 @@
{
"allow_copy": 0,
+ "allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
@@ -352,7 +353,7 @@
"fieldname": "to_emp",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -618,7 +619,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2018-08-21 16:15:42.627233",
+ "modified": "2019-01-21 17:10:39.822125",
"modified_by": "Administrator",
"module": "Setup",
"name": "Authorization Rule",
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index 16676ac..70e047a 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -206,6 +206,8 @@
["default_payroll_payable_account", {"root_type": "Liability"}],
["round_off_account", {"root_type": "Expense"}],
["write_off_account", {"root_type": "Expense"}],
+ ["discount_allowed_account", {"root_type": "Expense"}],
+ ["discount_received_account", {"root_type": "Income"}],
["exchange_gain_loss_account", {"root_type": "Expense"}],
["unrealized_exchange_gain_loss_account", {"root_type": "Expense"}],
["accumulated_depreciation_account",
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index 01f8956..77c371e 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -1257,6 +1257,72 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "discount_allowed_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Discount Allowed Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "discount_received_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Discount Received Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "exchange_gain_loss_account",
"fieldtype": "Link",
"hidden": 0,
@@ -2903,7 +2969,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2018-10-24 12:57:46.776452",
+ "modified": "2019-01-15 13:29:54.510379",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
diff --git a/erpnext/setup/doctype/company/company_dashboard.py b/erpnext/setup/doctype/company/company_dashboard.py
index 5efcf38..9b483dd 100644
--- a/erpnext/setup/doctype/company/company_dashboard.py
+++ b/erpnext/setup/doctype/company/company_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index f258f7d..e1e1b44 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -150,7 +150,7 @@
if item.get('has_batch_no') and item.get('website_warehouse'):
stock_qty_dict = get_qty_in_stock(
item.get('name'), 'website_warehouse', item.get('website_warehouse'))
- qty = stock_qty_dict.stock_qty[0][0]
+ qty = stock_qty_dict.stock_qty[0][0] if stock_qty_dict.stock_qty else 0
item['in_stock'] = 1 if qty else 0
adjusted_data.append(item)
diff --git a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py
index 42528d8..3d0b2ff 100644
--- a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py
+++ b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/setup/setup_wizard/data/industry_type.py b/erpnext/setup/setup_wizard/data/industry_type.py
index 74a10ff..4fa9f8a 100644
--- a/erpnext/setup/setup_wizard/data/industry_type.py
+++ b/erpnext/setup/setup_wizard/data/industry_type.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_industry_types():
diff --git a/erpnext/setup/setup_wizard/utils.py b/erpnext/setup/setup_wizard/utils.py
index d821a12..e82bc96 100644
--- a/erpnext/setup/setup_wizard/utils.py
+++ b/erpnext/setup/setup_wizard/utils.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import json, os
from frappe.desk.page.setup_wizard.setup_wizard import setup_complete
diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py
index 0216c3b..01e0b7d 100644
--- a/erpnext/setup/utils.py
+++ b/erpnext/setup/utils.py
@@ -109,6 +109,7 @@
cache.setex(key, value, 6 * 60 * 60)
return flt(value)
except:
+ frappe.log_error(title="Get Exchange Rate")
frappe.msgprint(_("Unable to find exchange rate for {0} to {1} for key date {2}. Please create a Currency Exchange record manually").format(from_currency, to_currency, transaction_date))
return 0.0
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index 254d7b7..cc3205c 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -66,7 +66,7 @@
sales_order = frappe.get_doc(_make_sales_order(quotation.name, ignore_permissions=True))
for item in sales_order.get("items"):
item.reserved_warehouse, is_stock_item = frappe.db.get_value("Item",
- item.item_code, ["website_warehouse", "is_stock_item"]) or None, None
+ item.item_code, ["website_warehouse", "is_stock_item"])
if is_stock_item:
item_stock = get_qty_in_stock(item.item_code, "website_warehouse")
diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.js b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.js
index 3219d7a..e1510f5 100644
--- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.js
+++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.js
@@ -5,6 +5,7 @@
onload: function() {
if(cur_frm.doc.__onload && cur_frm.doc.__onload.quotation_series) {
cur_frm.fields_dict.quotation_series.df.options = cur_frm.doc.__onload.quotation_series;
+ cur_frm.refresh_field("quotation_series");
}
},
refresh: function(){
diff --git a/erpnext/shopping_cart/product_info.py b/erpnext/shopping_cart/product_info.py
index b5f129b..3af5afa 100644
--- a/erpnext/shopping_cart/product_info.py
+++ b/erpnext/shopping_cart/product_info.py
@@ -6,7 +6,7 @@
import frappe
from erpnext.shopping_cart.cart import _get_cart_quotation
from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings \
- import is_cart_enabled, get_shopping_cart_settings, show_quantity_in_website
+ import get_shopping_cart_settings, show_quantity_in_website
from erpnext.utilities.product import get_price, get_qty_in_stock
@frappe.whitelist(allow_guest=True)
diff --git a/erpnext/startup/__init__.py b/erpnext/startup/__init__.py
index b65fc0f..deef4ba 100644
--- a/erpnext/startup/__init__.py
+++ b/erpnext/startup/__init__.py
@@ -19,7 +19,6 @@
# default settings that can be made for a user.
from __future__ import unicode_literals
-import frappe
product_name = "ERPNext"
user_defaults = {
diff --git a/erpnext/stock/dashboard/item_dashboard.py b/erpnext/stock/dashboard/item_dashboard.py
index f95daaf..d817e5f 100644
--- a/erpnext/stock/dashboard/item_dashboard.py
+++ b/erpnext/stock/dashboard/item_dashboard.py
@@ -1,43 +1,37 @@
from __future__ import unicode_literals
import frappe
+from frappe.model.db_query import DatabaseQuery
@frappe.whitelist()
def get_data(item_code=None, warehouse=None, item_group=None,
start=0, sort_by='actual_qty', sort_order='desc'):
'''Return data to render the item dashboard'''
- conditions = []
- values = []
+ filters = []
if item_code:
- conditions.append('b.item_code=%s')
- values.append(item_code)
+ filters.append(['item_code', '=', item_code])
if warehouse:
- conditions.append('b.warehouse=%s')
- values.append(warehouse)
+ filters.append(['warehouse', '=', warehouse])
if item_group:
- conditions.append('i.item_group=%s')
- values.append(item_group)
+ filters.append(['item_group', '=', item_group])
+ try:
+ # check if user has any restrictions based on user permissions on warehouse
+ if DatabaseQuery('Warehouse', user=frappe.session.user).build_match_conditions():
+ filters.append(['warehouse', 'in', [w.name for w in frappe.get_list('Warehouse')]])
+ except frappe.PermissionError:
+ # user does not have access on warehouse
+ return []
- if conditions:
- conditions = ' and ' + ' and '.join(conditions)
- else:
- conditions = ''
-
- return frappe.db.sql('''
- select
- b.item_code, b.warehouse, b.projected_qty, b.reserved_qty,
- b.reserved_qty_for_production, b.reserved_qty_for_sub_contract, b.actual_qty, b.valuation_rate, i.item_name
- from
- tabBin b, tabItem i
- where
- b.item_code = i.name
- and
- (b.projected_qty != 0 or b.reserved_qty != 0 or b.reserved_qty_for_production != 0
- or b.reserved_qty_for_sub_contract != 0 or b.actual_qty != 0)
- {conditions}
- order by
- {sort_by} {sort_order}
- limit
- {start}, 21
- '''.format(conditions=conditions, sort_by=sort_by, sort_order=sort_order,
- start=start), values, as_dict=True)
+ return frappe.db.get_all('Bin', fields=['item_code', 'warehouse', 'projected_qty',
+ 'reserved_qty', 'reserved_qty_for_production', 'reserved_qty_for_sub_contract', 'actual_qty', 'valuation_rate'],
+ or_filters={
+ 'projected_qty': ['!=', 0],
+ 'reserved_qty': ['!=', 0],
+ 'reserved_qty_for_production': ['!=', 0],
+ 'reserved_qty_for_sub_contract': ['!=', 0],
+ 'actual_qty': ['!=', 0],
+ },
+ filters=filters,
+ order_by=sort_by + ' ' + sort_order,
+ limit_start=start,
+ limit_page_length='21')
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py
index 63c32a4..beeb9eb 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/stock/doctype/item/item_dashboard.py b/erpnext/stock/doctype/item/item_dashboard.py
index c571355..8e4f74d 100644
--- a/erpnext/stock/doctype/item/item_dashboard.py
+++ b/erpnext/stock/doctype/item/item_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/stock/doctype/item_attribute/test_item_attribute.py b/erpnext/stock/doctype/item_attribute/test_item_attribute.py
index 6357b52..61e53d2 100644
--- a/erpnext/stock/doctype/item_attribute/test_item_attribute.py
+++ b/erpnext/stock/doctype/item_attribute/test_item_attribute.py
@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
+from __future__ import unicode_literals
import frappe
import unittest
diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py
index 6cfb8af..adfab86 100644
--- a/erpnext/stock/doctype/material_request/material_request_dashboard.py
+++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py
index a517703..3832c82 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from frappe import _
def get_data():
diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
index a4eb2bb..472083b 100644
--- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
@@ -1,8 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
-
-
+from __future__ import unicode_literals
import unittest
import frappe, erpnext
import frappe.defaults
@@ -352,7 +351,7 @@
set_perpetual_inventory(1, "_Test Company")
pr = make_purchase_receipt(cost_center=cost_center)
-
+
stock_in_hand_account = get_inventory_account(pr.company, pr.get("items")[0].warehouse)
gl_entries = get_gl_entries("Purchase Receipt", pr.name)
diff --git a/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py b/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py
index 60cc9a0..bb535c1 100644
--- a/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py
+++ b/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py
@@ -1,12 +1,13 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
+from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import nowdate
from erpnext.stock.doctype.item.test_item import create_item
from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note
-from erpnext.controllers.stock_controller import QualityInspectionRejectedError, QualityInspectionRequiredError
+from erpnext.controllers.stock_controller import QualityInspectionRejectedError, QualityInspectionRequiredError, QualityInspectionNotSubmittedError
# test_records = frappe.get_test_records('Quality Inspection')
@@ -19,7 +20,7 @@
dn = create_delivery_note(item_code="_Test Item with QA", do_not_submit=True)
self.assertRaises(QualityInspectionRequiredError, dn.submit)
- qa = create_quality_inspection(reference_type="Delivery Note", reference_name=dn.name, status="Rejected")
+ qa = create_quality_inspection(reference_type="Delivery Note", reference_name=dn.name, status="Rejected", submit=True)
dn.reload()
self.assertRaises(QualityInspectionRejectedError, dn.submit)
@@ -27,6 +28,12 @@
dn.reload()
dn.submit()
+ def test_qa_not_submit(self):
+ dn = create_delivery_note(item_code="_Test Item with QA", do_not_submit=True)
+ qa = create_quality_inspection(reference_type="Delivery Note", reference_name=dn.name, submit = False)
+ dn.items[0].quality_inspection = qa.name
+ self.assertRaises(QualityInspectionNotSubmittedError, dn.submit)
+
def create_quality_inspection(**args):
args = frappe._dict(args)
qa = frappe.new_doc("Quality Inspection")
@@ -42,6 +49,7 @@
"status": args.status
})
qa.save()
- qa.submit()
+ if args.submit:
+ qa.submit()
return qa
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py
index 6b4ca18..7a34338 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py
@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
+from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import cint, flt
diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py
index 1578bb6..39fb024 100644
--- a/erpnext/stock/reorder_item.py
+++ b/erpnext/stock/reorder_item.py
@@ -1,6 +1,7 @@
# 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
import erpnext
from frappe.utils import flt, nowdate, add_days, cint
@@ -138,7 +139,7 @@
if request_type == 'Purchase':
uom = item.purchase_uom or item.stock_uom
if uom != item.stock_uom:
- conversion_factor = frappe.db.get_value("UOM Conversion Detail",
+ conversion_factor = frappe.db.get_value("UOM Conversion Detail",
{'parent': item.name, 'uom': uom}, 'conversion_factor') or 1.0
mr.append("items", {
diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py
index 09d4e43..045bee5 100644
--- a/erpnext/stock/stock_balance.py
+++ b/erpnext/stock/stock_balance.py
@@ -257,7 +257,7 @@
doc.update_stock_ledger()
doc.make_gl_entries(repost_future_gle=False)
frappe.db.commit()
- except Exception as e:
+ except Exception:
print(frappe.get_traceback())
rejected.append([voucher_type, voucher_no])
frappe.db.rollback()
diff --git a/erpnext/templates/emails/daily_project_summary.html b/erpnext/templates/emails/daily_project_summary.html
new file mode 100644
index 0000000..8b60830
--- /dev/null
+++ b/erpnext/templates/emails/daily_project_summary.html
@@ -0,0 +1,46 @@
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <h3>{{ title }}</h3>
+ </tr>
+</table>
+{% for user in users %}
+<table class="panel-header" border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr height="10"></tr>
+ <tr>
+ <td width="15"></td>
+ <td valign="top" width="24">
+ {% if user.image %}
+ <img class="sender-avatar" width="24" height="24" embed="{{ user.image }}"/>
+ {% else %}
+ <div class="sender-avatar-placeholder">
+ {{ user.full_name[0] }}
+ </div>
+ {% endif %}
+ </td>
+ <td width="10"></td>
+ <td>
+ <div class="text-medium text-muted">
+ <span>{{ user.full_name }}</span>
+ </div>
+ </td>
+ <td width="15"></td>
+ </tr>
+ <tr height="10"></tr>
+</table>
+<table class="panel-body" border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr height="10"></tr>
+ <tr>
+ <td width="15"></td>
+ <td>
+ <div>
+ {{ user.project_status }}
+ </div>
+ </td>
+ <td width="15"></td>
+ </tr>
+ <tr height="10"></tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr height="20"></tr>
+</table>
+{% endfor %}
\ No newline at end of file
diff --git a/erpnext/templates/includes/cart/cart_items.html b/erpnext/templates/includes/cart/cart_items.html
index b2e6858..65b81d9 100644
--- a/erpnext/templates/includes/cart/cart_items.html
+++ b/erpnext/templates/includes/cart/cart_items.html
@@ -21,12 +21,11 @@
+</button>
</span>
</div>
- </span>
+ </span>
</div>
<div class="col-sm-2 col-xs-3 text-right col-amount">
{{ d.get_formatted("amount") }}
- <p class="text-muted small item-rate">{{
- _("Rate: {0}").format(d.get_formatted("rate")) }}</p>
+ <p class="text-muted small item-rate">{{ _("Rate") }} {{ d.get_formatted("rate") }}</p>
</div>
</div>
{% endfor %}
\ No newline at end of file
diff --git a/erpnext/templates/pages/non_profit/join_chapter.py b/erpnext/templates/pages/non_profit/join_chapter.py
index 121f444..aa54a58 100644
--- a/erpnext/templates/pages/non_profit/join_chapter.py
+++ b/erpnext/templates/pages/non_profit/join_chapter.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def get_context(context):
diff --git a/erpnext/templates/pages/non_profit/leave_chapter.py b/erpnext/templates/pages/non_profit/leave_chapter.py
index da2d819..21cb722 100644
--- a/erpnext/templates/pages/non_profit/leave_chapter.py
+++ b/erpnext/templates/pages/non_profit/leave_chapter.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
def get_context(context):
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 74c9da0..64fd32a 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -73,14 +73,12 @@
<div class="col-sm-3 col-xs-3 text-right">
{{ d.qty }}
{% if d.delivered_qty is defined and d.delivered_qty != None %}
- <p class="text-muted small">{{
- _("Delivered: {0}").format(d.delivered_qty) }}</p>
+ <p class="text-muted small">{{ _("Delivered") }} {{ d.delivered_qty }}</p>
{% endif %}
</div>
<div class="col-sm-3 col-xs-3 text-right">
{{ d.get_formatted("amount") }}
- <p class="text-muted small">{{
- _("@ {0}").format(d.get_formatted("rate")) }}</p>
+ <p class="text-muted small">{{ _("Rate:") }} {{ d.get_formatted("rate") }}</p>
</div>
</div>
{% endfor %}
diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py
index 5493e54..f555db0 100644
--- a/erpnext/templates/pages/regional/india/update_gstin.py
+++ b/erpnext/templates/pages/regional/india/update_gstin.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import frappe
from frappe import _
from six import iteritems
diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py
index eb84bcc..0306020 100644
--- a/erpnext/templates/utils.py
+++ b/erpnext/templates/utils.py
@@ -3,9 +3,8 @@
from __future__ import unicode_literals
-import frappe, json
-from frappe import _
-from frappe.utils import cint, formatdate
+import frappe
+
@frappe.whitelist(allow_guest=True)
def send_message(subject="Website Query", message="", sender="", status="Open"):
diff --git a/erpnext/tests/test_init.py b/erpnext/tests/test_init.py
index 43340ce..abc04a8 100644
--- a/erpnext/tests/test_init.py
+++ b/erpnext/tests/test_init.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import unittest
import frappe
diff --git a/erpnext/tests/test_regional.py b/erpnext/tests/test_regional.py
index 7bd6fa8..282fc64 100644
--- a/erpnext/tests/test_regional.py
+++ b/erpnext/tests/test_regional.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import unittest, frappe, erpnext
@erpnext.allow_regional
diff --git a/erpnext/tests/test_woocommerce.py b/erpnext/tests/test_woocommerce.py
index 0347e95..373d0a0 100644
--- a/erpnext/tests/test_woocommerce.py
+++ b/erpnext/tests/test_woocommerce.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
import unittest, frappe, requests, os, time, erpnext
from erpnext.erpnext_integrations.connectors.woocommerce_connection import order
diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py
index 7912a59..618cc98 100644
--- a/erpnext/utilities/__init__.py
+++ b/erpnext/utilities/__init__.py
@@ -1,5 +1,5 @@
## temp utility
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
import frappe
from erpnext.utilities.activation import get_level
from frappe.utils import cstr
diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py
index 8ad042b..16391e0 100644
--- a/erpnext/utilities/activation.py
+++ b/erpnext/utilities/activation.py
@@ -1,6 +1,7 @@
# 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, erpnext
from frappe import _
diff --git a/erpnext/utilities/user_progress.py b/erpnext/utilities/user_progress.py
index 71a5f90..5cec3ca 100644
--- a/erpnext/utilities/user_progress.py
+++ b/erpnext/utilities/user_progress.py
@@ -1,6 +1,7 @@
# 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, erpnext
from frappe import _
from erpnext.setup.doctype.setup_progress.setup_progress import get_action_completed_state
diff --git a/erpnext/utilities/user_progress_utils.py b/erpnext/utilities/user_progress_utils.py
index a665c5d..b7c24a7 100644
--- a/erpnext/utilities/user_progress_utils.py
+++ b/erpnext/utilities/user_progress_utils.py
@@ -1,6 +1,7 @@
# 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, erpnext
import json
diff --git a/erpnext/www/payment_setup_certification.py b/erpnext/www/payment_setup_certification.py
index 185c220..6b02e4e 100644
--- a/erpnext/www/payment_setup_certification.py
+++ b/erpnext/www/payment_setup_certification.py
@@ -1,5 +1,5 @@
+from __future__ import unicode_literals
import frappe
-import foundation
no_cache = 1
diff --git a/setup.py b/setup.py
index 71107a9..a864e73 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
from setuptools import setup, find_packages
import re, ast