[cleanup] [minor] replaced for territory to applicable territory

This commit is contained in:
Akhilesh Darjee
2013-10-31 19:50:51 +05:30
parent a604acb5c9
commit e158cea77a
20 changed files with 56 additions and 34 deletions

View File

@@ -1,11 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@@ -1,36 +0,0 @@
[
{
"creation": "2013-06-20 12:48:38",
"docstatus": 0,
"modified": "2013-07-10 14:54:09",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "DocType",
"istable": 1,
"module": "Setup",
"name": "__common__"
},
{
"doctype": "DocField",
"fieldname": "territory",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Territory",
"name": "__common__",
"options": "Territory",
"parent": "For Territory",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"reqd": 1
},
{
"doctype": "DocType",
"name": "For Territory"
},
{
"doctype": "DocField"
}
]

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-02 16:29:48",
"docstatus": 0,
"modified": "2013-10-21 15:11:20",
"modified": "2013-10-31 12:59:02",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -14,7 +14,7 @@
"icon": "icon-flag",
"in_create": 0,
"istable": 0,
"module": "Setup",
"module": "Stock",
"name": "__common__",
"read_only": 0
},

View File

@@ -3,7 +3,7 @@
$.extend(cur_frm.cscript, {
onload: function() {
erpnext.add_for_territory();
erpnext.add_applicable_territory();
},
refresh: function() {

View File

@@ -18,7 +18,7 @@ class DocType(DocListController):
# if no territory, set default territory
if webnotes.defaults.get_user_default("territory"):
self.doclist.append({
"doctype": "For Territory",
"doctype": "Applicable Territory",
"parentfield": "valid_for_territories",
"territory": webnotes.defaults.get_user_default("territory")
})

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-25 11:35:09",
"docstatus": 0,
"modified": "2013-10-18 13:33:07",
"modified": "2013-10-31 19:24:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -17,7 +17,7 @@
"document_type": "Master",
"icon": "icon-tags",
"max_attachments": 1,
"module": "Setup",
"module": "Stock",
"name": "__common__"
},
{
@@ -81,7 +81,7 @@
"fieldname": "valid_for_territories",
"fieldtype": "Table",
"label": "Valid for Territories",
"options": "For Territory",
"options": "Applicable Territory",
"reqd": 1
},
{

View File

@@ -15,7 +15,7 @@ test_records = [
"buying_or_selling": "Selling"
},
{
"doctype": "For Territory",
"doctype": "Applicable Territory",
"parentfield": "valid_for_territories",
"territory": "All Territories"
},
@@ -28,7 +28,7 @@ test_records = [
"buying_or_selling": "Selling"
},
{
"doctype": "For Territory",
"doctype": "Applicable Territory",
"parentfield": "valid_for_territories",
"territory": "_Test Territory Rest of the World"
}
@@ -41,7 +41,7 @@ test_records = [
"buying_or_selling": "Selling"
},
{
"doctype": "For Territory",
"doctype": "Applicable Territory",
"parentfield": "valid_for_territories",
"territory": "_Test Territory India"
}
@@ -54,12 +54,12 @@ test_records = [
"buying_or_selling": "Selling"
},
{
"doctype": "For Territory",
"doctype": "Applicable Territory",
"parentfield": "valid_for_territories",
"territory": "_Test Territory Rest of the World"
},
{
"doctype": "For Territory",
"doctype": "Applicable Territory",
"parentfield": "valid_for_territories",
"territory": "_Test Territory United States"
}