mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
Merge branch 'model-cleanup' of github.com:frappe/erpnext into model-cleanup
This commit is contained in:
@@ -6,9 +6,9 @@ import frappe
|
||||
|
||||
from frappe import msgprint, _
|
||||
|
||||
from frappe.utils.nestedset import DocTypeNestedSet
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
|
||||
class CostCenter(DocTypeNestedSet):
|
||||
class CostCenter(NestedSet):
|
||||
nsm_parent_field = 'parent_cost_center'
|
||||
|
||||
def autoname(self):
|
||||
|
||||
@@ -12,7 +12,7 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
|
||||
load_defaults: function() {
|
||||
if(this.frm.doc.__islocal && this.frm.doc.company) {
|
||||
frappe.model.set_default_values(this.frm.doc);
|
||||
$.each(this.frm.doc.entries, function(i, jvd) {
|
||||
$.each(this.frm.doc.entries || [], function(i, jvd) {
|
||||
frappe.model.set_default_values(jvd);
|
||||
}
|
||||
);
|
||||
|
||||
0
erpnext/contacts/__init__.py
Normal file
0
erpnext/contacts/__init__.py
Normal file
0
erpnext/contacts/doctype/__init__.py
Normal file
0
erpnext/contacts/doctype/__init__.py
Normal file
0
erpnext/contacts/doctype/party_type/__init__.py
Normal file
0
erpnext/contacts/doctype/party_type/__init__.py
Normal file
302
erpnext/contacts/doctype/party_type/party_type.json
Normal file
302
erpnext/contacts/doctype/party_type/party_type.json
Normal file
@@ -0,0 +1,302 @@
|
||||
{
|
||||
"_last_update": null,
|
||||
"_user_tags": null,
|
||||
"allow_attach": null,
|
||||
"allow_copy": null,
|
||||
"allow_email": null,
|
||||
"allow_import": null,
|
||||
"allow_print": null,
|
||||
"allow_rename": null,
|
||||
"allow_trash": null,
|
||||
"autoname": "field:party_type_name",
|
||||
"change_log": null,
|
||||
"client_script": null,
|
||||
"client_script_core": null,
|
||||
"client_string": null,
|
||||
"colour": null,
|
||||
"creation": "2014-04-07 12:32:18.010384",
|
||||
"custom": null,
|
||||
"default_print_format": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
"dt_template": null,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "party_type_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "Party Type Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": 1,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "parent_party_type",
|
||||
"fieldtype": "Link",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "Parent Party Type",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": "Party Type",
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": "Yes",
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "allow_children",
|
||||
"fieldtype": "Select",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "Allow Children",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": "Yes\nNo",
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "default_price_list",
|
||||
"fieldtype": "Link",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "Default Price List",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": "Price List",
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "lft",
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "LFT",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "rgt",
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "RGT",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "old_parent",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "Old Parent",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
}
|
||||
],
|
||||
"hide_heading": null,
|
||||
"hide_toolbar": null,
|
||||
"icon": null,
|
||||
"idx": null,
|
||||
"in_create": null,
|
||||
"in_dialog": null,
|
||||
"is_submittable": null,
|
||||
"is_transaction_doc": null,
|
||||
"issingle": null,
|
||||
"istable": null,
|
||||
"max_attachments": null,
|
||||
"menu_index": null,
|
||||
"modified": "2014-04-07 12:54:46.254776",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Party Type",
|
||||
"name_case": null,
|
||||
"owner": "Administrator",
|
||||
"parent": null,
|
||||
"parent_node": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permissions": [
|
||||
{
|
||||
"amend": null,
|
||||
"cancel": null,
|
||||
"create": 1,
|
||||
"delete": null,
|
||||
"email": null,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": null,
|
||||
"read": 1,
|
||||
"report": null,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "Sales User",
|
||||
"submit": null,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": null,
|
||||
"cancel": null,
|
||||
"create": 1,
|
||||
"delete": null,
|
||||
"email": null,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": null,
|
||||
"read": 1,
|
||||
"report": null,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "Purchase User",
|
||||
"submit": null,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"plugin": null,
|
||||
"print_outline": null,
|
||||
"read_only": null,
|
||||
"read_only_onload": null,
|
||||
"search_fields": null,
|
||||
"section_style": null,
|
||||
"server_code": null,
|
||||
"server_code_compiled": null,
|
||||
"server_code_core": null,
|
||||
"server_code_error": null,
|
||||
"show_in_menu": null,
|
||||
"smallicon": null,
|
||||
"subject": null,
|
||||
"tag_fields": null,
|
||||
"title_field": null,
|
||||
"use_template": null,
|
||||
"version": null
|
||||
}
|
||||
9
erpnext/contacts/doctype/party_type/party_type.py
Normal file
9
erpnext/contacts/doctype/party_type/party_type.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
|
||||
class PartyType(NestedSet):
|
||||
nsm_parent_field = 'parent_party_type';
|
||||
@@ -9,3 +9,4 @@ setup
|
||||
stock
|
||||
support
|
||||
utilities
|
||||
contacts
|
||||
|
||||
@@ -6,8 +6,8 @@ import frappe
|
||||
from frappe import msgprint
|
||||
|
||||
|
||||
from frappe.utils.nestedset import DocTypeNestedSet
|
||||
class CustomerGroup(DocTypeNestedSet):
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
class CustomerGroup(NestedSet):
|
||||
nsm_parent_field = 'parent_customer_group';
|
||||
|
||||
def validate(self):
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.utils.nestedset import DocTypeNestedSet
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
|
||||
class ItemGroup(DocTypeNestedSet):
|
||||
class ItemGroup(NestedSet):
|
||||
nsm_parent_field = 'parent_item_group'
|
||||
|
||||
def validate(self):
|
||||
@@ -15,7 +15,7 @@ class ItemGroup(DocTypeNestedSet):
|
||||
self.parent_item_group)
|
||||
|
||||
def on_update(self):
|
||||
DocTypeNestedSet.on_update(self)
|
||||
NestedSet.on_update(self)
|
||||
|
||||
self.validate_name_with_item()
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.utils import flt
|
||||
from frappe.utils.nestedset import DocTypeNestedSet
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
|
||||
class SalesPerson(DocTypeNestedSet):
|
||||
class SalesPerson(NestedSet):
|
||||
nsm_parent_field = 'parent_sales_person';
|
||||
|
||||
def validate(self):
|
||||
|
||||
@@ -7,9 +7,9 @@ import frappe
|
||||
|
||||
from frappe.utils import flt
|
||||
|
||||
from frappe.utils.nestedset import DocTypeNestedSet
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
|
||||
class Territory(DocTypeNestedSet):
|
||||
class Territory(NestedSet):
|
||||
nsm_parent_field = 'parent_territory'
|
||||
|
||||
def validate(self):
|
||||
|
||||
@@ -188,7 +188,7 @@ def create_email_digest():
|
||||
"recipient_list": "\n".join(system_managers)
|
||||
})
|
||||
|
||||
for fieldname in edigest.meta.get_fieldnames({"fieldtype": "Check"}):
|
||||
for fieldname in edigest.meta.get("fields", {"fieldtype": "Check"}):
|
||||
if fieldname != "scheduler_errors":
|
||||
edigest.set(fieldname, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user