Merge branch 'develop'
This commit is contained in:
commit
f4c3819134
@ -1,2 +1,2 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
__version__ = '6.11.0'
|
__version__ = '6.11.1'
|
||||||
|
|||||||
@ -2,10 +2,29 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Bank Reconciliation", {
|
frappe.ui.form.on("Bank Reconciliation", {
|
||||||
|
setup: function(frm) {
|
||||||
|
frm.get_docfield("journal_entries").allow_bulk_edit = 1;
|
||||||
|
frm.add_fetch("bank_account", "company", "company");
|
||||||
|
},
|
||||||
|
|
||||||
|
onload: function(frm) {
|
||||||
|
frm.set_query("bank_account", function() {
|
||||||
|
return {
|
||||||
|
"filters": {
|
||||||
|
"account_type": "Bank",
|
||||||
|
"is_group": 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
frm.set_value("from_date", frappe.datetime.month_start());
|
||||||
|
frm.set_value("to_date", frappe.datetime.month_end());
|
||||||
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.disable_save();
|
frm.disable_save();
|
||||||
},
|
},
|
||||||
|
|
||||||
update_clearance_date: function(frm) {
|
update_clearance_date: function(frm) {
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
method: "update_details",
|
method: "update_details",
|
||||||
@ -22,19 +41,3 @@ frappe.ui.form.on("Bank Reconciliation", {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|
||||||
cur_frm.add_fetch("bank_account", "company", "company");
|
|
||||||
|
|
||||||
cur_frm.set_query("bank_account", function() {
|
|
||||||
return {
|
|
||||||
"filters": {
|
|
||||||
"account_type": "Bank",
|
|
||||||
"is_group": 0
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
cur_frm.set_value("from_date", frappe.datetime.month_start());
|
|
||||||
cur_frm.set_value("to_date", frappe.datetime.month_end());
|
|
||||||
}
|
|
||||||
@ -35,7 +35,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
|
|||||||
party = out[party_type.lower()]
|
party = out[party_type.lower()]
|
||||||
|
|
||||||
if not ignore_permissions and not frappe.has_permission(party_type, "read", party):
|
if not ignore_permissions and not frappe.has_permission(party_type, "read", party):
|
||||||
frappe.throw(_("Not permitted"), frappe.PermissionError)
|
frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError)
|
||||||
|
|
||||||
party = frappe.get_doc(party_type, party)
|
party = frappe.get_doc(party_type, party)
|
||||||
|
|
||||||
|
|||||||
1
erpnext/change_log/v6/v6_11_1.md
Normal file
1
erpnext/change_log/v6/v6_11_1.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
- Update Clearance date via Upload and Download like Stock Reconciliation. Sponsored by [AG Techologies, Singapore](http://agtech.com.sg)
|
||||||
@ -77,11 +77,6 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Landed Cost Voucher",
|
"name": "Landed Cost Voucher",
|
||||||
"description": _("Update additional costs to calculate landed cost of items"),
|
"description": _("Update additional costs to calculate landed cost of items"),
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Stock UOM Replace Utility",
|
|
||||||
"description": _("Change UOM for an Item."),
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
|
|||||||
app_description = """ERP made simple"""
|
app_description = """ERP made simple"""
|
||||||
app_icon = "icon-th"
|
app_icon = "icon-th"
|
||||||
app_color = "#e74c3c"
|
app_color = "#e74c3c"
|
||||||
app_version = "6.11.0"
|
app_version = "6.11.1"
|
||||||
app_email = "info@erpnext.com"
|
app_email = "info@erpnext.com"
|
||||||
app_license = "GNU General Public License (v3)"
|
app_license = "GNU General Public License (v3)"
|
||||||
source_link = "https://github.com/frappe/erpnext"
|
source_link = "https://github.com/frappe/erpnext"
|
||||||
@ -64,7 +64,7 @@ website_route_rules = [
|
|||||||
{"from_route": "/shipments", "to_route": "Delivery Note"},
|
{"from_route": "/shipments", "to_route": "Delivery Note"},
|
||||||
{"from_route": "/shipments/<path:name>", "to_route": "order",
|
{"from_route": "/shipments/<path:name>", "to_route": "order",
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"doctype": "Delivery Notes",
|
"doctype": "Delivery Note",
|
||||||
"parents": [{"title": _("Shipments"), "name": "shipments"}]
|
"parents": [{"title": _("Shipments"), "name": "shipments"}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -236,3 +236,4 @@ erpnext.patches.v6_8.make_webform_standard #2015-11-23
|
|||||||
erpnext.patches.v6_8.move_drop_ship_to_po_items
|
erpnext.patches.v6_8.move_drop_ship_to_po_items
|
||||||
erpnext.patches.v6_10.fix_ordered_received_billed
|
erpnext.patches.v6_10.fix_ordered_received_billed
|
||||||
erpnext.patches.v6_10.fix_jv_total_amount
|
erpnext.patches.v6_10.fix_jv_total_amount
|
||||||
|
erpnext.patches.v6_10.email_digest_default_quote
|
||||||
|
|||||||
5
erpnext/patches/v6_10/email_digest_default_quote.py
Normal file
5
erpnext/patches/v6_10/email_digest_default_quote.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.reload_doctype("Email Digest")
|
||||||
|
frappe.db.sql("update `tabEmail Digest` set add_quote = 1")
|
||||||
@ -76,7 +76,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
if(this.frm.doc.__islocal && !(this.frm.doc.taxes || []).length
|
if(this.frm.doc.__islocal && !(this.frm.doc.taxes || []).length
|
||||||
&& !(this.frm.doc.__onload ? this.frm.doc.__onload.load_after_mapping : false)) {
|
&& !(this.frm.doc.__onload ? this.frm.doc.__onload.load_after_mapping : false)) {
|
||||||
this.apply_default_taxes();
|
this.apply_default_taxes();
|
||||||
} else if(this.frm.doc.__islocal && this.frm.doc.company && this.frm.doc["items"]
|
} else if(this.frm.doc.__islocal && this.frm.doc.company && this.frm.doc["items"]
|
||||||
&& !this.frm.doc.is_pos) {
|
&& !this.frm.doc.is_pos) {
|
||||||
me.calculate_taxes_and_totals();
|
me.calculate_taxes_and_totals();
|
||||||
}
|
}
|
||||||
@ -507,7 +507,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.frm.fields_dict["advances"]) {
|
if(this.frm.fields_dict["advances"]) {
|
||||||
setup_field_label_map(["advance_amount", "allocated_amount"],
|
setup_field_label_map(["advance_amount", "allocated_amount"],
|
||||||
this.frm.doc.party_account_currency, "advances");
|
this.frm.doc.party_account_currency, "advances");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,9 +558,15 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
apply_pricing_rule: function(item, calculate_taxes_and_totals) {
|
apply_pricing_rule: function(item, calculate_taxes_and_totals) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
var args = this._get_args(item);
|
||||||
|
if (!(args.item_list && args.item_list.length)) {
|
||||||
|
if(calculate_taxes_and_totals) me.calculate_taxes_and_totals();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
method: "erpnext.accounts.doctype.pricing_rule.pricing_rule.apply_pricing_rule",
|
method: "erpnext.accounts.doctype.pricing_rule.pricing_rule.apply_pricing_rule",
|
||||||
args: { args: this._get_args(item) },
|
args: { args: args },
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (!r.exc && r.message) {
|
if (!r.exc && r.message) {
|
||||||
me._set_values_for_item_list(r.message);
|
me._set_values_for_item_list(r.message);
|
||||||
@ -648,6 +654,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
apply_price_list: function(item) {
|
apply_price_list: function(item) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var args = this._get_args(item);
|
var args = this._get_args(item);
|
||||||
|
if (!((args.item_list && args.item_list.length) || args.price_list)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
method: "erpnext.stock.get_item_details.apply_price_list",
|
method: "erpnext.stock.get_item_details.apply_price_list",
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -46,6 +47,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -68,6 +70,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -91,6 +94,7 @@
|
|||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
@ -114,6 +118,7 @@
|
|||||||
"options": "Daily\nWeekly\nMonthly",
|
"options": "Daily\nWeekly\nMonthly",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
@ -137,6 +142,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -158,6 +164,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -181,6 +188,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
@ -203,6 +211,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -225,6 +234,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -247,6 +257,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -270,6 +281,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -293,6 +305,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -316,6 +329,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -338,6 +352,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -361,6 +376,7 @@
|
|||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -384,6 +400,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -407,6 +424,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -430,6 +448,55 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "other",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Other",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "add_quote",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Add Quote",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -448,7 +515,8 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2015-11-16 06:29:46.135437",
|
"menu_index": 0,
|
||||||
|
"modified": "2015-11-27 01:48:34.725037",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Email Digest",
|
"name": "Email Digest",
|
||||||
|
|||||||
@ -115,9 +115,11 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if add_quote %}
|
||||||
<div style="text-align: center; margin: 50px; line-height: 1.5">
|
<div style="text-align: center; margin: 50px; line-height: 1.5">
|
||||||
{{ quote.text }}<br><i>- {{ quote.author }}</i>
|
{{ quote.text }}<br><i>- {{ quote.author }}</i>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -72,21 +72,20 @@ def get_exchange_rate(from_currency, to_currency):
|
|||||||
key = "currency_exchange_rate:{0}:{1}".format(from_currency, to_currency)
|
key = "currency_exchange_rate:{0}:{1}".format(from_currency, to_currency)
|
||||||
value = cache.get(key)
|
value = cache.get(key)
|
||||||
|
|
||||||
print value
|
|
||||||
|
|
||||||
if not value:
|
if not value:
|
||||||
import requests
|
import requests
|
||||||
response = requests.get("http://api.fixer.io/latest", params={
|
response = requests.get("http://api.fixer.io/latest", params={
|
||||||
"base": from_currency,
|
"base": from_currency,
|
||||||
"symbols": to_currency
|
"symbols": to_currency
|
||||||
})
|
})
|
||||||
# expire in 24 hours
|
# expire in 6 hours
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
value = response.json()["rates"][to_currency]
|
value = response.json()["rates"][to_currency]
|
||||||
cache.setex(key, value, 24 * 60 * 60)
|
cache.setex(key, value, 6 * 60 * 60)
|
||||||
|
|
||||||
return flt(value)
|
return flt(value)
|
||||||
except:
|
except:
|
||||||
frappe.msgprint(_("Unable to find exchange rate"))
|
frappe.msgprint(_("Unable to find exchange rate for {0} to {1}").format(from_currency, to_currency))
|
||||||
return 0.0
|
return 0.0
|
||||||
else:
|
else:
|
||||||
return value
|
return value
|
||||||
|
|||||||
@ -662,7 +662,5 @@ def check_stock_uom_with_bin(item, stock_uom):
|
|||||||
frappe.db.sql("""update tabBin set stock_uom=%s where item_code=%s""", (stock_uom, item))
|
frappe.db.sql("""update tabBin set stock_uom=%s where item_code=%s""", (stock_uom, item))
|
||||||
|
|
||||||
if not matched:
|
if not matched:
|
||||||
frappe.throw(_("Default Unit of Measure for Item {0} cannot be changed directly because \
|
frappe.throw(_("Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You will need to create a new Item to use a different Default UOM.").format(item))
|
||||||
you have already made some transaction(s) with another UOM. To change default UOM, \
|
|
||||||
use 'UOM Replace Utility' tool under Stock module.").format(item))
|
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@ def get_item_details(args):
|
|||||||
|
|
||||||
if args.get("is_subcontracted") == "Yes":
|
if args.get("is_subcontracted") == "Yes":
|
||||||
out.bom = get_default_bom(args.item_code)
|
out.bom = get_default_bom(args.item_code)
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
def process_args(args):
|
def process_args(args):
|
||||||
@ -427,6 +427,9 @@ def get_price_list_currency(price_list):
|
|||||||
return result.currency
|
return result.currency
|
||||||
|
|
||||||
def get_price_list_currency_and_exchange_rate(args):
|
def get_price_list_currency_and_exchange_rate(args):
|
||||||
|
if not args.price_list:
|
||||||
|
return {}
|
||||||
|
|
||||||
price_list_currency = get_price_list_currency(args.price_list)
|
price_list_currency = get_price_list_currency(args.price_list)
|
||||||
plc_conversion_rate = args.plc_conversion_rate
|
plc_conversion_rate = args.plc_conversion_rate
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import flt, cstr, nowdate, add_days, cint
|
from frappe.utils import flt, cstr, nowdate, add_days, cint
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
def reorder_item():
|
def reorder_item():
|
||||||
""" Reorder item if stock reaches reorder level"""
|
""" Reorder item if stock reaches reorder level"""
|
||||||
@ -162,17 +163,12 @@ def send_email_notification(mr_list):
|
|||||||
and r.role in ('Purchase Manager','Stock Manager')
|
and r.role in ('Purchase Manager','Stock Manager')
|
||||||
and p.name not in ('Administrator', 'All', 'Guest')""")
|
and p.name not in ('Administrator', 'All', 'Guest')""")
|
||||||
|
|
||||||
msg="""<h3>Following Material Requests has been raised automatically \
|
msg = frappe.render_template("templates/emails/reorder_item.html", {
|
||||||
based on item reorder level:</h3>"""
|
"mr_list": mr_list
|
||||||
for mr in mr_list:
|
})
|
||||||
msg += "<p><b><u>" + mr.name + """</u></b></p><table class='table table-bordered'><tr>
|
|
||||||
<th>Item Code</th><th>Warehouse</th><th>Qty</th><th>UOM</th></tr>"""
|
|
||||||
for item in mr.get("items"):
|
|
||||||
msg += "<tr><td>" + item.item_code + "</td><td>" + item.warehouse + "</td><td>" + \
|
|
||||||
cstr(item.qty) + "</td><td>" + cstr(item.uom) + "</td></tr>"
|
|
||||||
msg += "</table>"
|
|
||||||
frappe.sendmail(recipients=email_list,
|
frappe.sendmail(recipients=email_list,
|
||||||
subject='Auto Material Request Generation Notification', message = msg)
|
subject=_('Auto Material Requests Generated'), message = msg)
|
||||||
|
|
||||||
def notify_errors(exceptions_list):
|
def notify_errors(exceptions_list):
|
||||||
subject = "[Important] [ERPNext] Auto Reorder Errors"
|
subject = "[Important] [ERPNext] Auto Reorder Errors"
|
||||||
|
|||||||
29
erpnext/templates/emails/reorder_item.html
Normal file
29
erpnext/templates/emails/reorder_item.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<p>{{ _("Following Material Requests have been raised automatically based on Item's re-order level") + ":" }}<p>
|
||||||
|
{% for mr in mr_list -%}
|
||||||
|
<div style="margin-bottom: 30px;">
|
||||||
|
<h4 style="margin-bottom: 5px;">{{ frappe.utils.get_link_to_form("Material Request", mr.name) }}</h4>
|
||||||
|
<table style="width: 100%; border-spacing: 0; border-collapse: collapse;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="border: 1px solid #d1d8dd; width: 35%; text-align: left; padding: 5px;">{{ _("Item") }}</th>
|
||||||
|
<th style="border: 1px solid #d1d8dd; width: 35%; text-align: left; padding: 5px;">{{ _("Warehouse") }}</th>
|
||||||
|
<th style="border: 1px solid #d1d8dd; width: 20%; text-align: right; padding: 5px;">{{ _("Quantity") }}</th>
|
||||||
|
<th style="border: 1px solid #d1d8dd; width: 10%; text-align: left; padding: 5px;">{{ _("UOM") }}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for item in mr.get("items") -%}
|
||||||
|
<tr>
|
||||||
|
<td style="border: 1px solid #d1d8dd; text-align: left; padding: 5px;">
|
||||||
|
<b>{{ item.item_code }}</b>
|
||||||
|
{% if item.item_code != item.item_name -%} <br> {{ item.item_name }} {%- endif %}
|
||||||
|
</td>
|
||||||
|
<td style="border: 1px solid #d1d8dd; text-align: left; padding: 5px;">{{ item.warehouse }}</td>
|
||||||
|
<td style="border: 1px solid #d1d8dd; text-align: right; padding: 5px;">{{ item.qty }}</td>
|
||||||
|
<td style="border: 1px solid #d1d8dd; text-align: left; padding: 5px;">{{ item.uom }}</td>
|
||||||
|
</tr>
|
||||||
|
{%- endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{%- endfor %}
|
||||||
@ -46,15 +46,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-3 text-right">
|
<div class="col-sm-2 col-xs-3 text-right">
|
||||||
{{ d.qty }}
|
{{ d.qty }}
|
||||||
{% if d.delivered_qty != None %}
|
{% if d.delivered_qty is defined and d.delivered_qty != None %}
|
||||||
<p class="text-muted small">{{
|
<p class="text-muted small">{{
|
||||||
_("Delivered: {0}").format(d.delivered_qty) }}</p>
|
_("Delivered: {0}").format(d.delivered_qty) }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-3 text-right">
|
<div class="col-sm-2 col-xs-3 text-right">
|
||||||
{{ d.get_formatted("amount") }}
|
{{ d.get_formatted("amount") }}
|
||||||
<!-- output of get_formatted("rate") is unicode, to replace unicode use
|
{# output of get_formatted("rate") is unicode, to replace unicode use _("text {0}").decode("utf8").format(val) #}
|
||||||
_("text {0}").decode("utf8").format(val) -->
|
|
||||||
<p class="text-muted small">{{
|
<p class="text-muted small">{{
|
||||||
_("Rate: {0}").decode("utf8").format(d.get_formatted("rate")) }}</p>
|
_("Rate: {0}").decode("utf8").format(d.get_formatted("rate")) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -1,6 +1,6 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
version = "6.11.0"
|
version = "6.11.1"
|
||||||
|
|
||||||
with open("requirements.txt", "r") as f:
|
with open("requirements.txt", "r") as f:
|
||||||
install_requires = f.readlines()
|
install_requires = f.readlines()
|
||||||
|
|||||||
@ -53,5 +53,13 @@
|
|||||||
Leave Allocation based on Arbitrary Dates <a href="https://github.com/frappe/erpnext/issues/1938">#1938</a>
|
Leave Allocation based on Arbitrary Dates <a href="https://github.com/frappe/erpnext/issues/1938">#1938</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 30%">
|
||||||
|
<a href="http://agtech.com.sq">AG Technologies, Singapore</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
Bulk edit via export-import in Bank Reconciliation <a href="https://github.com/frappe/erpnext/issues/1938">#4356</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user