Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui

This commit is contained in:
Suraj Shetty
2020-08-23 16:33:50 +05:30
223 changed files with 4191 additions and 3663 deletions

View File

@@ -34,6 +34,16 @@ frappe.ui.form.on("Company", {
frm.set_query("default_buying_terms", function() {
return { filters: { buying: 1 } };
});
frm.set_query("default_in_transit_warehouse", function() {
return {
filters:{
'warehouse_type' : 'Transit',
'is_group': 0,
'company': frm.doc.company
}
};
});
},
company_name: function(frm) {

View File

@@ -25,6 +25,7 @@
"default_selling_terms",
"default_buying_terms",
"default_warehouse_for_sales_return",
"default_in_transit_warehouse",
"column_break_10",
"country",
"create_chart_of_accounts_based_on",
@@ -242,7 +243,7 @@
{
"fieldname": "default_warehouse_for_sales_return",
"fieldtype": "Link",
"label": "Default warehouse for Sales Return",
"label": "Default Warehouse for Sales Return",
"options": "Warehouse"
},
{
@@ -733,6 +734,12 @@
"fieldname": "enable_perpetual_inventory_for_non_stock_items",
"fieldtype": "Check",
"label": "Enable Perpetual Inventory For Non Stock Items"
},
{
"fieldname": "default_in_transit_warehouse",
"fieldtype": "Link",
"label": "Default In Transit Warehouse",
"options": "Warehouse"
}
],
"icon": "fa fa-building",
@@ -740,7 +747,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
"modified": "2020-06-24 12:45:31.462195",
"modified": "2020-08-06 00:38:08.311216",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
@@ -801,4 +808,4 @@
"sort_field": "modified",
"sort_order": "ASC",
"track_changes": 1
}
}

View File

@@ -140,7 +140,8 @@ class Company(NestedSet):
{"warehouse_name": _("All Warehouses"), "is_group": 1},
{"warehouse_name": _("Stores"), "is_group": 0},
{"warehouse_name": _("Work In Progress"), "is_group": 0},
{"warehouse_name": _("Finished Goods"), "is_group": 0}]:
{"warehouse_name": _("Finished Goods"), "is_group": 0},
{"warehouse_name": _("Goods In Transit"), "is_group": 0, "warehouse_type": "Transit"}]:
if not frappe.db.exists("Warehouse", "{0} - {1}".format(wh_detail["warehouse_name"], self.abbr)):
warehouse = frappe.get_doc({
@@ -149,7 +150,8 @@ class Company(NestedSet):
"is_group": wh_detail["is_group"],
"company": self.name,
"parent_warehouse": "{0} - {1}".format(_("All Warehouses"), self.abbr) \
if not wh_detail["is_group"] else ""
if not wh_detail["is_group"] else "",
"warehouse_type" : wh_detail["warehouse_type"] if "warehouse_type" in wh_detail else None
})
warehouse.flags.ignore_permissions = True
warehouse.flags.ignore_mandatory = True

View File

@@ -10,6 +10,7 @@ class PartyType(Document):
pass
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_party_type(doctype, txt, searchfield, start, page_len, filters):
cond = ''
if filters and filters.get('account'):

View File

@@ -0,0 +1,31 @@
{
"actions": [],
"creation": "2020-07-14 09:21:44.057724",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"lost_reason"
],
"fields": [
{
"fieldname": "lost_reason",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Quotation Lost Reason",
"options": "Quotation Lost Reason"
}
],
"istable": 1,
"links": [],
"modified": "2020-07-26 17:58:56.373775",
"modified_by": "Administrator",
"module": "Setup",
"name": "Quotation Lost Reason Detail",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class QuotationLostReasonDetail(Document):
pass

View File

@@ -7,6 +7,7 @@ import frappe
from erpnext.accounts.doctype.cash_flow_mapper.default_cash_flow_mapper import DEFAULT_MAPPERS
from .default_success_action import get_default_success_action
from frappe import _
from frappe.utils import cint
from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from erpnext.setup.default_energy_point_rules import get_default_energy_point_rules
@@ -29,8 +30,8 @@ def after_install():
def check_setup_wizard_not_completed():
if frappe.db.get_default('desktop:home_page') != 'setup-wizard':
message = """ERPNext can only be installed on a fresh site where the setup wizard is not completed.
if cint(frappe.db.get_single_value('System Settings', 'setup_complete') or 0):
message = """ERPNext can only be installed on a fresh site where the setup wizard is not completed.
You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall"""
frappe.throw(message)

View File

@@ -95,8 +95,6 @@ def install(country=None):
{'doctype': 'Stock Entry Type', 'name': 'Send to Subcontractor', 'purpose': 'Send to Subcontractor'},
{'doctype': 'Stock Entry Type', 'name': 'Material Transfer for Manufacture', 'purpose': 'Material Transfer for Manufacture'},
{'doctype': 'Stock Entry Type', 'name': 'Material Consumption for Manufacture', 'purpose': 'Material Consumption for Manufacture'},
{'doctype': 'Stock Entry Type', 'name': 'Send to Warehouse', 'purpose': 'Send to Warehouse'},
{'doctype': 'Stock Entry Type', 'name': 'Receive at Warehouse', 'purpose': 'Receive at Warehouse'},
# Designation
{'doctype': 'Designation', 'designation_name': _('CEO')},
@@ -244,7 +242,10 @@ def install(country=None):
{"doctype": "Sales Stage", "stage_name": _("Identifying Decision Makers")},
{"doctype": "Sales Stage", "stage_name": _("Perception Analysis")},
{"doctype": "Sales Stage", "stage_name": _("Proposal/Price Quote")},
{"doctype": "Sales Stage", "stage_name": _("Negotiation/Review")}
{"doctype": "Sales Stage", "stage_name": _("Negotiation/Review")},
# Warehouse Type
{'doctype': 'Warehouse Type', 'name': 'Transit'},
]
from erpnext.setup.setup_wizard.data.industry_type import get_industry_types