Merge remote-tracking branch 'upstream' into add-age-range-in-stock-ageing

Merge remote-tracking branch 'upstream' into add-age-range-in-stock-ageing
This commit is contained in:
Afshan 2020-07-23 20:35:21 +05:30
commit 13d2a34548
21 changed files with 509 additions and 866 deletions

View File

@ -1,6 +1,7 @@
{
"actions": [],
"allow_import": 1,
"allow_workflow": 1,
"autoname": "naming_series:",
"creation": "2013-05-24 19:29:05",
"doctype": "DocType",
@ -1159,6 +1160,7 @@
"hide_days": 1,
"hide_seconds": 1,
"label": "In Words (Company Currency)",
"length": 240,
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"print_hide": 1,
@ -1216,6 +1218,7 @@
"hide_days": 1,
"hide_seconds": 1,
"label": "In Words",
"length": 240,
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"print_hide": 1,
@ -1944,7 +1947,7 @@
"idx": 181,
"is_submittable": 1,
"links": [],
"modified": "2020-06-30 12:00:03.890180",
"modified": "2020-07-18 05:07:16.725974",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@ -0,0 +1,39 @@
{
"cards": [
{
"card": "Total Assets"
},
{
"card": "New Assets (This Year)"
},
{
"card": "Asset Value"
}
],
"charts": [
{
"chart": "Asset Value Analytics",
"width": "Full"
},
{
"chart": "Category-wise Asset Value",
"width": "Half"
},
{
"chart": "Location-wise Asset Value",
"width": "Half"
}
],
"creation": "2020-07-14 18:23:53.343082",
"dashboard_name": "Asset",
"docstatus": 0,
"doctype": "Dashboard",
"idx": 0,
"is_default": 0,
"is_standard": 1,
"modified": "2020-07-21 18:14:25.078929",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset",
"owner": "Administrator"
}

View File

@ -0,0 +1,27 @@
{
"chart_name": "Asset Value Analytics",
"chart_type": "Report",
"creation": "2020-07-14 18:23:53.091233",
"custom_options": "{\"type\": \"bar\", \"barOptions\": {\"stacked\": 1}, \"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"tooltipOptions\": {}}",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}",
"filters_json": "{\"status\":\"In Location\",\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"date_based_on\":\"Purchase Date\",\"group_by\":\"--Select a group--\"}",
"group_by_type": "Count",
"idx": 0,
"is_public": 0,
"is_standard": 1,
"modified": "2020-07-23 13:53:33.211371",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset Value Analytics",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Fixed Asset Register",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Bar",
"use_report_chart": 1,
"y_axis": []
}

View File

@ -0,0 +1,29 @@
{
"chart_name": "Category-wise Asset Value",
"chart_type": "Report",
"creation": "2020-07-14 18:23:53.146304",
"custom_options": "{\"type\": \"donut\", \"height\": 300, \"axisOptions\": {\"shortenYAxisNumbers\": 1}}",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}",
"filters_json": "{\"status\":\"In Location\",\"group_by\":\"Asset Category\",\"is_existing_asset\":0}",
"idx": 0,
"is_public": 0,
"is_standard": 1,
"modified": "2020-07-23 13:39:32.429240",
"modified_by": "Administrator",
"module": "Assets",
"name": "Category-wise Asset Value",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Fixed Asset Register",
"timeseries": 0,
"type": "Donut",
"use_report_chart": 0,
"x_field": "asset_category",
"y_axis": [
{
"y_field": "asset_value"
}
]
}

View File

@ -0,0 +1,29 @@
{
"chart_name": "Location-wise Asset Value",
"chart_type": "Report",
"creation": "2020-07-14 18:23:53.195389",
"custom_options": "{\"type\": \"donut\", \"height\": 300, \"axisOptions\": {\"shortenYAxisNumbers\": 1}}",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}",
"filters_json": "{\"status\":\"In Location\",\"group_by\":\"Location\",\"is_existing_asset\":0}",
"idx": 0,
"is_public": 0,
"is_standard": 1,
"modified": "2020-07-23 13:42:44.912551",
"modified_by": "Administrator",
"module": "Assets",
"name": "Location-wise Asset Value",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Fixed Asset Register",
"timeseries": 0,
"type": "Donut",
"use_report_chart": 0,
"x_field": "location",
"y_axis": [
{
"y_field": "asset_value"
}
]
}

View File

@ -0,0 +1,21 @@
{
"aggregate_function_based_on": "value_after_depreciation",
"creation": "2020-07-14 18:23:53.302457",
"docstatus": 0,
"doctype": "Number Card",
"document_type": "Asset",
"filters_json": "[]",
"function": "Sum",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "Asset Value",
"modified": "2020-07-21 18:13:47.647997",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset Value",
"owner": "Administrator",
"show_percentage_stats": 1,
"stats_time_interval": "Monthly",
"type": "Document Type"
}

View File

@ -0,0 +1,20 @@
{
"creation": "2020-07-14 18:23:53.267919",
"docstatus": 0,
"doctype": "Number Card",
"document_type": "Asset",
"filters_json": "[[\"Asset\",\"creation\",\"Timespan\",\"this year\",false]]",
"function": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "New Assets (This Year)",
"modified": "2020-07-23 13:45:20.418766",
"modified_by": "Administrator",
"module": "Assets",
"name": "New Assets (This Year)",
"owner": "Administrator",
"show_percentage_stats": 1,
"stats_time_interval": "Monthly",
"type": "Document Type"
}

View File

@ -0,0 +1,20 @@
{
"creation": "2020-07-14 18:23:53.233328",
"docstatus": 0,
"doctype": "Number Card",
"document_type": "Asset",
"filters_json": "[]",
"function": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "Total Assets",
"modified": "2020-07-21 18:12:51.664292",
"modified_by": "Administrator",
"module": "Assets",
"name": "Total Assets",
"owner": "Administrator",
"show_percentage_stats": 1,
"stats_time_interval": "Monthly",
"type": "Document Type"
}

File diff suppressed because it is too large Load Diff

View File

@ -593,6 +593,7 @@
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"length": 240,
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"print_hide": 1,
@ -642,6 +643,7 @@
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words",
"length": 240,
"oldfieldname": "in_words_import",
"oldfieldtype": "Data",
"print_hide": 1,
@ -803,7 +805,7 @@
"idx": 29,
"is_submittable": 1,
"links": [],
"modified": "2020-05-15 21:24:12.639482",
"modified": "2020-07-18 05:10:45.556792",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",

View File

@ -1,4 +1,5 @@
{
"actions": [],
"autoname": "format:MAIL-CAMP-{YYYY}-{#####}",
"creation": "2019-06-30 16:05:30.015615",
"doctype": "DocType",
@ -52,7 +53,7 @@
"fieldtype": "Select",
"in_list_view": 1,
"label": "Email Campaign For ",
"options": "\nLead\nContact",
"options": "\nLead\nContact\nEmail Group",
"reqd": 1
},
{
@ -70,7 +71,8 @@
"options": "User"
}
],
"modified": "2019-11-11 17:18:47.342839",
"links": [],
"modified": "2020-07-15 12:43:25.548682",
"modified_by": "Administrator",
"module": "CRM",
"name": "Email Campaign",

View File

@ -70,10 +70,15 @@ def send_email_to_leads_or_contacts():
send_mail(entry, email_campaign)
def send_mail(entry, email_campaign):
recipient = frappe.db.get_value(email_campaign.email_campaign_for, email_campaign.get("recipient"), 'email_id')
recipient_list = []
if email_campaign.email_campaign_for == "Email Group":
for member in frappe.db.get_list("Email Group Member", filters={"email_group": email_campaign.get("recipient")}, fields=["email"]):
recipient_list.append(member['email'])
else:
recipient_list.append(frappe.db.get_value(email_campaign.email_campaign_for, email_campaign.get("recipient"), "email_id"))
email_template = frappe.get_doc("Email Template", entry.get("email_template"))
sender = frappe.db.get_value("User", email_campaign.get("sender"), 'email')
sender = frappe.db.get_value("User", email_campaign.get("sender"), "email")
context = {"doc": frappe.get_doc(email_campaign.email_campaign_for, email_campaign.recipient)}
# send mail and link communication to document
comm = make(
@ -82,7 +87,7 @@ def send_mail(entry, email_campaign):
subject = frappe.render_template(email_template.get("subject"), context),
content = frappe.render_template(email_template.get("response"), context),
sender = sender,
recipients = recipient,
recipients = recipient_list,
communication_medium = "Email",
sent_or_received = "Sent",
send_email = True,

View File

@ -168,6 +168,7 @@
"fieldname": "grand_total_in_words",
"fieldtype": "Data",
"label": "In Words",
"length": 240,
"read_only": 1
},
{
@ -272,7 +273,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2020-05-15 08:39:20.682837",
"modified": "2020-07-18 05:11:49.905457",
"modified_by": "Administrator",
"module": "Education",
"name": "Fee Schedule",

View File

@ -1,4 +1,5 @@
{
"actions": [],
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2015-09-22 16:57:22.143710",
@ -253,6 +254,7 @@
"fieldname": "grand_total_in_words",
"fieldtype": "Data",
"label": "In Words",
"length": 240,
"read_only": 1
},
{
@ -336,7 +338,8 @@
}
],
"is_submittable": 1,
"modified": "2019-05-25 22:58:20.026368",
"links": [],
"modified": "2020-07-18 05:00:00.621010",
"modified_by": "Administrator",
"module": "Education",
"name": "Fees",

View File

@ -11,9 +11,9 @@ from frappe.model.document import Document
class ProductsSettings(Document):
def validate(self):
if self.home_page_is_products:
website_settings = frappe.get_doc('Website Settings')
website_settings.home_page = 'products'
website_settings.save()
frappe.db.set_value("Website Settings", "home_page", "products")
elif frappe.db.get_single_value("Website Settings", "home_page") == 'products':
frappe.db.set_value("Website Settings", "home_page", "home")
self.validate_field_filters()
self.validate_attribute_filters()
@ -40,4 +40,3 @@ def home_page_is_products(doc, method):
home_page_is_products = cint(frappe.db.get_single_value('Products Settings', 'home_page_is_products'))
if home_page_is_products:
doc.home_page = 'products'

View File

@ -338,8 +338,8 @@ erpnext.SerialNoBatchSelector = Class.extend({
};
},
change: function () {
let val = this.get_value();
if (val.length === 0) {
const batch_no = this.get_value();
if (!batch_no) {
this.grid_row.on_grid_fields_dict
.available_qty.set_value(0);
return;
@ -359,14 +359,11 @@ erpnext.SerialNoBatchSelector = Class.extend({
return;
}
let batch_number = me.item.batch_no ||
this.grid_row.on_grid_fields_dict.batch_no.get_value();
if (me.warehouse_details.name) {
frappe.call({
method: 'erpnext.stock.doctype.batch.batch.get_batch_qty',
args: {
batch_no: batch_number,
batch_no,
warehouse: me.warehouse_details.name,
item_code: me.item_code
},

View File

@ -654,6 +654,7 @@
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"length": 240,
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"print_hide": 1,
@ -713,6 +714,7 @@
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words",
"length": 240,
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"print_hide": 1,
@ -930,7 +932,7 @@
"is_submittable": 1,
"links": [],
"max_attachments": 1,
"modified": "2019-12-30 19:14:56.630270",
"modified": "2020-07-18 04:59:09.960118",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",

View File

@ -1,6 +1,7 @@
{
"actions": [],
"allow_import": 1,
"allow_workflow": 1,
"autoname": "naming_series:",
"creation": "2013-06-18 12:39:59",
"doctype": "DocType",
@ -928,6 +929,7 @@
"hide_days": 1,
"hide_seconds": 1,
"label": "In Words (Company Currency)",
"length": 240,
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"print_hide": 1,
@ -986,6 +988,7 @@
"hide_days": 1,
"hide_seconds": 1,
"label": "In Words",
"length": 240,
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"print_hide": 1,
@ -1458,7 +1461,7 @@
"idx": 105,
"is_submittable": 1,
"links": [],
"modified": "2020-06-30 11:56:42.301317",
"modified": "2020-07-18 05:13:06.680696",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",

View File

@ -801,6 +801,7 @@
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"length": 240,
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"print_hide": 1,
@ -851,6 +852,7 @@
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words",
"length": 240,
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"print_hide": 1,
@ -1253,7 +1255,7 @@
"idx": 146,
"is_submittable": 1,
"links": [],
"modified": "2020-05-19 17:03:45.880106",
"modified": "2020-07-18 05:13:55.580420",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",

View File

@ -1,5 +1,7 @@
{
"actions": [],
"allow_import": 1,
"allow_workflow": 1,
"autoname": "naming_series:",
"creation": "2013-05-21 16:16:39",
"doctype": "DocType",
@ -768,6 +770,7 @@
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"length": 240,
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"print_hide": 1,
@ -820,6 +823,7 @@
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words",
"length": 240,
"oldfieldname": "in_words_import",
"oldfieldtype": "Data",
"print_hide": 1,
@ -1106,7 +1110,7 @@
"idx": 261,
"is_submittable": 1,
"links": [],
"modified": "2020-07-15 10:01:39.302238",
"modified": "2020-07-18 05:19:12.148115",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",