[cleanup] old Workflow Engine, State, Sales Browser Control, Naming Series Options

This commit is contained in:
Rushabh Mehta 2013-06-11 12:35:46 +05:30
parent cd4bfa6b9a
commit 0ab1bdf94e
163 changed files with 4 additions and 2528 deletions

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-03-07 14:48:29",
"creation": "2013-03-07 11:55:06",
"docstatus": 0,
"modified": "2013-02-13 11:29:18",
"modified": "2013-06-11 12:10:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -30,6 +30,7 @@
"parentfield": "permissions",
"parenttype": "DocType",
"read": 1,
"report": 1,
"submit": 0
},
{
@ -123,9 +124,8 @@
{
"doctype": "DocField",
"fieldname": "state",
"fieldtype": "Link",
"fieldtype": "Data",
"label": "State",
"options": "State",
"read_only": 0,
"reqd": 1
},
@ -166,7 +166,6 @@
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"report": 1,
"role": "Accounts User",
"write": 1
},
@ -174,7 +173,6 @@
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"report": 1,
"role": "Accounts Manager",
"write": 1
},
@ -183,7 +181,6 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"match": "",
"permlevel": 1,
"role": "All"
}

View File

@ -58,9 +58,6 @@ class DocType(TransactionBase):
# update credit days and limit in account
self.update_credit_days_limit()
def check_state(self):
return "\n" + "\n".join([i[0] for i in sql("select state_name from `tabState` where `tabState`.country='%s' " % self.doc.country)])
def get_payables_group(self):
g = sql("select payables_group from tabCompany where name=%s", self.doc.company)

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,7 +0,0 @@
[
"Trash Reason",
"Segment Name",
"Setup",
"Details",
"Market Segment"
]

View File

@ -1,7 +0,0 @@
{
"Details": "\u062a\u0641\u0627\u0635\u064a\u0644",
"Market Segment": "\u0633\u0648\u0642 \u0627\u0644\u0642\u0637\u0627\u0639",
"Segment Name": "\u0627\u0644\u062c\u0632\u0621 \u0627\u0633\u0645",
"Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
"Trash Reason": "\u0627\u0644\u0633\u0628\u0628 \u0627\u0644\u0642\u0645\u0627\u0645\u0629"
}

View File

@ -1,7 +0,0 @@
{
"Details": "Details",
"Market Segment": "Market Segment",
"Segment Name": "Segment Name",
"Setup": "Setup",
"Trash Reason": "Trash Reason"
}

View File

@ -1,7 +0,0 @@
{
"Details": "Detalles",
"Market Segment": "Sector de mercado",
"Segment Name": "Segmento Nombre",
"Setup": "Disposici\u00f3n",
"Trash Reason": "Trash Raz\u00f3n"
}

View File

@ -1,7 +0,0 @@
{
"Details": "D\u00e9tails",
"Market Segment": "Segment de march\u00e9",
"Segment Name": "Nom du segment",
"Setup": "Installation",
"Trash Reason": "Raison Corbeille"
}

View File

@ -1,7 +0,0 @@
{
"Details": "\u0935\u093f\u0935\u0930\u0923",
"Market Segment": "\u092c\u093e\u091c\u093e\u0930 \u0916\u0902\u0921",
"Segment Name": "\u0916\u0923\u094d\u0921 \u0928\u093e\u092e",
"Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
"Trash Reason": "\u091f\u094d\u0930\u0948\u0936 \u0915\u093e\u0930\u0923"
}

View File

@ -1,7 +0,0 @@
{
"Details": "Detalji",
"Market Segment": "Tr\u017ei\u0161ni segment",
"Segment Name": "Segment Ime",
"Setup": "Postavljanje",
"Trash Reason": "Otpad Razlog"
}

View File

@ -1,7 +0,0 @@
{
"Details": "Details",
"Market Segment": "Marktsegment",
"Segment Name": "Segment Naam",
"Setup": "Setup",
"Trash Reason": "Trash Reden"
}

View File

@ -1,7 +0,0 @@
{
"Details": "Detalhes",
"Market Segment": "Segmento de mercado",
"Segment Name": "Nome do Segmento",
"Setup": "Configura\u00e7\u00e3o",
"Trash Reason": "Raz\u00e3o de p\u00f4r no lixo"
}

View File

@ -1,7 +0,0 @@
{
"Details": "Detalhes",
"Market Segment": "Segmento de mercado",
"Segment Name": "Nome segmento",
"Setup": "Instala\u00e7\u00e3o",
"Trash Reason": "Raz\u00e3o lixo"
}

View File

@ -1,7 +0,0 @@
{
"Details": "\u0414\u0435\u0442\u0430\u0459\u0438",
"Market Segment": "\u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u0442\u0440\u0436\u0438\u0448\u0442\u0430",
"Segment Name": "\u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u041d\u0430\u0437\u0438\u0432",
"Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
"Trash Reason": "\u0421\u043c\u0435\u045b\u0435 \u0420\u0430\u0437\u043b\u043e\u0433"
}

View File

@ -1,7 +0,0 @@
{
"Details": "\u0bb5\u0bbf\u0bb5\u0bb0\u0bae\u0bcd",
"Market Segment": "\u0b9a\u0ba8\u0bcd\u0ba4\u0bc8 \u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bc1",
"Segment Name": "\u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bbf\u0bb2\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
"Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
"Trash Reason": "\u0b95\u0bc1\u0baa\u0bcd\u0baa\u0bc8 \u0b95\u0bbe\u0bb0\u0ba3\u0bae\u0bcd"
}

View File

@ -1,7 +0,0 @@
{
"Details": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14",
"Market Segment": "\u0e2a\u0e48\u0e27\u0e19\u0e15\u0e25\u0e32\u0e14",
"Segment Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e48\u0e27\u0e19",
"Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
"Trash Reason": "\u0e40\u0e2b\u0e15\u0e38\u0e1c\u0e25\u0e16\u0e31\u0e07\u0e02\u0e22\u0e30"
}

View File

@ -1,22 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@ -1,56 +0,0 @@
[
{
"creation": "2013-01-10 16:34:23",
"docstatus": 0,
"modified": "2013-01-22 14:47:03",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"autoname": "field:segment_name",
"doctype": "DocType",
"in_create": 1,
"module": "Setup",
"name": "__common__",
"name_case": "Title Case",
"read_only": 0
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Market Segment",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"doctype": "DocType",
"name": "Market Segment"
},
{
"doctype": "DocField",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "segment_name",
"fieldtype": "Data",
"label": "Segment Name",
"oldfieldname": "segment_name",
"oldfieldtype": "Data",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "details",
"fieldtype": "Text",
"label": "Details",
"oldfieldname": "details",
"oldfieldtype": "Text"
}
]

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,6 +0,0 @@
[
"Naming Series Options",
"Setup",
"Doc Type",
"Series Options"
]

View File

@ -1,6 +0,0 @@
{
"Doc Type": "\u0646\u0648\u0639 \u0627\u0644\u0648\u062b\u064a\u0642\u0629",
"Naming Series Options": "\u062e\u064a\u0627\u0631\u0627\u062a \u062a\u0633\u0645\u064a\u0629 \u0627\u0644\u0633\u0644\u0633\u0644\u0629",
"Series Options": "\u0633\u0644\u0633\u0644\u0629 \u062e\u064a\u0627\u0631\u0627\u062a",
"Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Doc Type",
"Naming Series Options": "Benennen Optionen Series",
"Series Options": "Serie Optionen",
"Setup": "Setup"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Tipo Doc.",
"Naming Series Options": "Nombrar Opciones de serie",
"Series Options": "Opciones de serie",
"Setup": "Disposici\u00f3n"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Doc Type d&#39;",
"Naming Series Options": "Nommer Options des s\u00e9ries",
"Series Options": "Options des s\u00e9ries",
"Setup": "Installation"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "\u0921\u0949\u0915\u094d\u091f\u0930 \u0915\u0947 \u092a\u094d\u0930\u0915\u093e\u0930",
"Naming Series Options": "\u0936\u094d\u0930\u0943\u0902\u0916\u0932\u093e \u0935\u093f\u0915\u0932\u094d\u092a \u0928\u093e\u092e\u0915\u0930\u0923",
"Series Options": "\u0936\u094d\u0930\u0943\u0902\u0916\u0932\u093e \u0935\u093f\u0915\u0932\u094d\u092a",
"Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Doc Tip",
"Naming Series Options": "Imenovanje Serija isporuke",
"Series Options": "Serija Opcije",
"Setup": "Postavljanje"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Doc Type",
"Naming Series Options": "Benoemen Reeksopties",
"Series Options": "Reeksopties",
"Setup": "Setup"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Tipo do Documento",
"Naming Series Options": "Op\u00e7\u00f5es das S\u00e9ries nomeadas",
"Series Options": "Op\u00e7\u00f5es de S\u00e9ries",
"Setup": "Configura\u00e7\u00e3o"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Tipo Doc",
"Naming Series Options": "Nomeando S\u00e9rie Op\u00e7\u00f5es",
"Series Options": "Op\u00e7\u00f5es de S\u00e9rie",
"Setup": "Instala\u00e7\u00e3o"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "\u0414\u043e\u043a \u0422\u0438\u043f",
"Naming Series Options": "\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u045a\u0435 \u0441\u0435\u0440\u0438\u0458\u0435 \u041e\u043f\u0446\u0438\u0458\u0435",
"Series Options": "\u0421\u0435\u0440\u0438\u0458\u0430 \u041e\u043f\u0446\u0438\u0458\u0435",
"Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "Doc \u0bb5\u0b95\u0bc8",
"Naming Series Options": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd \u0bb5\u0bbf\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b99\u0bcd\u0b95\u0bb3\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bbf\u0b9f\u0bc1\u0bae\u0bcd",
"Series Options": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd \u0bb5\u0bbf\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
"Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
}

View File

@ -1,6 +0,0 @@
{
"Doc Type": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 Doc",
"Naming Series Options": "\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e0a\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e27\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e0a\u0e38\u0e14",
"Series Options": "\u0e15\u0e31\u0e27\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e0a\u0e38\u0e14",
"Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
}

View File

@ -1,22 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@ -1,63 +0,0 @@
[
{
"creation": "2012-03-27 14:36:21",
"docstatus": 0,
"modified": "2012-03-27 14:36:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"autoname": "__NSO.#####",
"doctype": "DocType",
"in_create": 1,
"module": "Setup",
"name": "__common__",
"read_only": 0,
"section_style": "Simple",
"show_in_menu": 0,
"version": 5
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Naming Series Options",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"doctype": "DocPerm",
"name": "__common__",
"parent": "Naming Series Options",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1,
"role": "System Manager"
},
{
"doctype": "DocType",
"name": "Naming Series Options"
},
{
"doctype": "DocPerm"
},
{
"doctype": "DocField",
"fieldname": "doc_type",
"fieldtype": "Data",
"label": "Doc Type",
"oldfieldname": "doc_type",
"oldfieldtype": "Data",
"search_index": 1
},
{
"doctype": "DocField",
"fieldname": "series_options",
"fieldtype": "Text",
"label": "Series Options",
"oldfieldname": "series_options",
"oldfieldtype": "Text"
}
]

View File

@ -1,4 +0,0 @@
[
"Permission Control",
"Setup"
]

View File

@ -1,4 +0,0 @@
{
"Permission Control": "\u0625\u0630\u0646 \u0627\u0644\u062a\u062d\u0643\u0645",
"Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "Permission Steuerung",
"Setup": "Setup"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "Permiso de Control",
"Setup": "Disposici\u00f3n"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "L&#39;autorisation Contr\u00f4le",
"Setup": "Installation"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "\u0905\u0928\u0941\u092e\u0924\u093f \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
"Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "Dopu\u0161tenje kontrola",
"Setup": "Postavljanje"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "Toestemming Controle",
"Setup": "Setup"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "Controle de Permiss\u00e3o",
"Setup": "Configura\u00e7\u00e3o"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "Controle de permiss\u00e3o",
"Setup": "Instala\u00e7\u00e3o"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "\u0414\u043e\u0437\u0432\u043e\u043b\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435",
"Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "\u0b85\u0ba9\u0bc1\u0bae\u0ba4\u0bbf \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
"Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
}

View File

@ -1,4 +0,0 @@
{
"Permission Control": "\u0e01\u0e32\u0e23\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e01\u0e32\u0e23\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15",
"Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
}

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,4 +0,0 @@
[
"Setup",
"Sales Browser Control"
]

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "\u0645\u0628\u064a\u0639\u0627\u062a \u0645\u062a\u0635\u0641\u062d \u0627\u0644\u062a\u062d\u0643\u0645",
"Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "Vertrieb Browser Control",
"Setup": "Setup"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "Ventas control de explorador",
"Setup": "Disposici\u00f3n"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "Contr\u00f4le de navigateur ventes",
"Setup": "Installation"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "\u092c\u093f\u0915\u094d\u0930\u0940 \u092c\u094d\u0930\u093e\u0909\u091c\u093c\u0930 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
"Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "Prodaja Preglednik kontrole",
"Setup": "Postavljanje"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "Verkoop Browser Control",
"Setup": "Setup"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "Controle do Navegador de Vendas",
"Setup": "Configura\u00e7\u00e3o"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "Vendas controle de navegador",
"Setup": "Instala\u00e7\u00e3o"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "\u041f\u0440\u043e\u0434\u0430\u0458\u0430 \u0411\u0440\u043e\u0432\u0441\u0435\u0440 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0430",
"Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8 \u0b89\u0bb2\u0bbe\u0bb5\u0bbf \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
"Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
}

View File

@ -1,4 +0,0 @@
{
"Sales Browser Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e40\u0e1a\u0e23\u0e32\u0e27\u0e4c\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e22\u0e2d\u0e14\u0e02\u0e32\u0e22",
"Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
}

View File

@ -1,226 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr
from webnotes.model import db_exists
from webnotes.model.doc import Document
from webnotes.model.bean import copy_doclist
from webnotes.model.code import get_obj
from webnotes import msgprint
sql = webnotes.conn.sql
class DocType:
def __init__(self,doc,doclist=[]):
self.doc = doc
self.doclist = doclist
#=============================================================================================
def get_record_list(self,arg):
parent, type = arg.split(',')
pt_col = "parent_"+type.replace(' ','_').lower()
cl = sql("select name,is_group from `tab%s` where docstatus != 2 and %s ='%s' order by is_group desc"%(type,pt_col,parent),as_dict=1)
return {'parent':parent, 'cl':cl}
#=============================================================================================
# --------get root level records like all territories, all sales person etc---------
def get_fl_node(self,arg):
pt_col = "parent_"+arg.replace(' ','_').lower()
cl = sql("select name,is_group from `tab%s` where docstatus !=2 and %s=''"%(arg,pt_col),as_dict=1)
return {'cl':cl}
#=============================================================================================
def add_node(self,arg):
arg = eval(arg)
node_title = arg['node_title']
n = Document(node_title)
for d in arg.keys():
if d != 'node_title':
n.fields[d]=arg[d]
n.old_parent = ''
n_obj = get_obj(doc=n)
n_obj.validate()
n_obj.doc.save(1)
n_obj.on_update()
return n_obj.doc.name
#=============================================================================================
def trash_record(self,arg):
name,type = arg.split(',')
#validation for trash of default record
if not type == 'Sales Person':
field = 'default_'+type.lower().replace(' ','_')
chk = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = '%s' and value = '%s'"%(field,name))
if chk:
msgprint("'%s' record is set as a default %s in Global Defaults. Please change default %s then try to trash '%s' record."%(name,type.lower(), type.lower(), name))
raise Exception
res = sql("select t1.name from `tab%s` t1, `tab%s` t2 where t1.lft > t2.lft and t1.rgt < t2.rgt and t1.docstatus != 2 and t2.name = '%s'"%(type,type,name))
if res:
msgprint("You can not trashed %s as it contains other nodes."%name)
raise Exception
sql("update `tab%s` set docstatus = 2 where name = '%s'"%(type,name))
#=============================================================================================
def get_parent_lst(self,type):
par_lst = [r[0] for r in sql("select name from `tab%s` where is_group = 'Yes' and docstatus != 2"%type)]
return par_lst
#=============================================================================================
def get_record(self,arg):
name, type = arg.split(',')
dict1 = {'Territory':'parent_territory','Customer Group':'parent_customer_group','Item Group':'parent_item_group','Sales Person':'parent_sales_person'}
parent_name = dict1[type]
query ="select name,"+dict1[type]+",is_group,rgt,lft from `tab"+cstr(type)+"` where name = '%s'"
sv = sql(query%(cstr(name)))
par_lst = [r[0] for r in sql("select distinct name from `tab"+cstr(type)+"` where docstatus !=2 and (rgt > %s or lft < %s) and is_group='Yes'"%(sv[0][3],sv[0][4]))]
dict2 = {}
dict2['name']=sv[0][0]
dict2['parent']=cstr(sv[0][1])
dict2['parent_lst']=par_lst
dict2['is_group']=sv[0][2]
return dict2
#=============================================================================================
def edit_node(self,arg):
arg = eval(arg)
nt = arg['node_title']
nm = nt == 'Territory' and arg['territory_name'] or nt == 'Sales Person' and arg['sales_person_name'] or nt=='Item Group' and arg['item_group_name'] or nt =='Customer Group' and arg['customer_group_name'] or ''
n_obj = get_obj(nt,nm)
for d in arg.keys():
if d != 'node_title':
n_obj.doc.fields[d]=arg[d]
n_obj.doc.save()
n_obj.on_update()
#=============== validation ======================================================================================
def mvalidate(self,args):
r = eval(args)
if r['lft'] == 0 and r['action'] != 'Create':
n = sql("select lft,rgt from `tab%s` where name = '%s'"%(r['node_title'],r['nm']))
r['lft'] = n[0][0]
r['rgt'] = n[0][1]
if r['action'] == 'Update':
#-----------------validate if current node has child node----------------------------------
v1 = self.val_group(r)
if v1 == 'true': return 'true'
#-------------------validation for parent sales person cannot be his child node------------
v1 = self.val_prt(r)
if v1 == 'true': return 'true'
#--------if current record has set as default record in manage account then should not allow to change 'has child node' to 'yes'
v1 = self.group_changed(r)
if v1 == 'true': return 'true'
elif r['action'] == 'Create':
#-------------------validation - record is already exist--------------------------------
v1 = self.duplicate_rcd(r)
if v1 == 'true': return 'true'
#-------------------------------------------------
v1 = self.trash_rcd(r)
if v1 == 'true': return 'true'
return 'false'
#-----------------validate if current node has child node----------------------------------
#------------------if yes then cannot change current node from group to leaf
#ON EDIT
def val_group(self,r):
if r['is_group'] == 'No':
ch = sql("select name from `tab%s` where lft>%s and rgt<%s and docstatus != 2"%(r['node_title'],r['lft'],r['rgt']))
if ch:
msgprint("You can not changed %s from group to leaf node as it contains other nodes."%r['nm'])
return 'true'
return 'false'
#-------------------validation for parent sales person cannot be his child node-------------
#ON EDIT
def val_prt(self,r):
res = sql("select name from `tab%s` where is_group = 'Yes' and docstatus!= 2 and (rgt > %s or lft < %s) and name ='%s' and name !='%s'"%(r['node_title'],r['rgt'],r['lft'],r['parent_nm'],r['nm']))
if not res:
msgprint("Please enter parent %s."%(r['node_title']))
return 'true'
return 'false'
#--------if current record has set as default record then not allowed to changed 'has child node' to 'yes'--------------------
#--------------------------------------------------------
#ON EDIT
def group_changed(self,r):
if r['node_title'] != 'Sales Person' and r['is_group'] == 'Yes':
field = 'default_'+r['node_title'].lower().replace(' ','_')
res = sql("select value from `tabSingles` where field = '%s' and value = '%s'"%(field,r['nm']))
if res:
msgprint("'%s' record is set as default record in Global Defaults.'Has Child Node' field cannot be changed to 'Yes' as only leaf nodes are allowed in transaction."%(r['nm']))
return 'true'
return 'false'
#-------------------validation - record is already exist--------------------------------
#ON CREATE
def trash_rcd(self,r):
res = sql("select name from `tab%s` where name = '%s' and docstatus = 2"%(r['node_title'],r['nm']))
if res:
msgprint("'%s' record is trashed. To untrash please go to Setup & click on Trash."%(r['nm']))
return 'true'
return 'false'
#----------------------------------------------------------------
#ON CREATE
def duplicate_rcd(self,r):
res = sql("select name from `tab%s` where name = '%s' and docstatus != 2"%(r['node_title'],r['nm']))
if res:
msgprint("'%s' record is already exist."%(r['nm']))
return 'true'
return 'false'

View File

@ -1,21 +0,0 @@
[
{
"creation": "2012-03-27 14:36:23",
"docstatus": 0,
"modified": "2012-03-27 14:36:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "DocType",
"issingle": 1,
"module": "Setup",
"name": "__common__",
"section_style": "Simple",
"version": 159
},
{
"doctype": "DocType",
"name": "Sales Browser Control"
}
]

View File

@ -42,9 +42,6 @@ class DocType:
if self.doc.fields[d]:
comp_address += self.doc.fields[d] + "\n"
self.doc.address = comp_address
def check_state(self):
return "\n" + "\n".join([i[0] for i in sql("select state_name from `tabState` where `tabState`.country='%s' " % self.doc.country)])
def get_contacts(self,nm):
if nm:

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,6 +0,0 @@
[
"Series",
"Setup",
"Remove",
"Series Detail"
]

View File

@ -1,6 +0,0 @@
{
"Remove": "\u0646\u0632\u0639",
"Series": "\u0633\u0644\u0633\u0644\u0629",
"Series Detail": "\u0633\u0644\u0633\u0644\u0629 \u0627\u0644\u062a\u0641\u0627\u0635\u064a\u0644",
"Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "Entfernen",
"Series": "Serie",
"Series Detail": "Series Detailansicht",
"Setup": "Setup"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "Quitar",
"Series": "Serie",
"Series Detail": "Serie Detalle",
"Setup": "Disposici\u00f3n"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "Enlever",
"Series": "S\u00e9rie",
"Series Detail": "D\u00e9tail Series",
"Setup": "Installation"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "\u0939\u091f\u093e\u0928\u093e",
"Series": "\u0915\u0908",
"Series Detail": "\u0938\u0940\u0930\u0940\u091c \u0935\u093f\u0938\u094d\u0924\u093e\u0930",
"Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "Ukloniti",
"Series": "Serija",
"Series Detail": "Serija Detalj",
"Setup": "Postavljanje"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "Verwijderen",
"Series": "Serie",
"Series Detail": "Series Detail",
"Setup": "Setup"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "Remover",
"Series": "S\u00e9ries",
"Series Detail": "Detalhe da S\u00e9ries",
"Setup": "Configura\u00e7\u00e3o"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "Remover",
"Series": "S\u00e9rie",
"Series Detail": "Detalhe s\u00e9rie",
"Setup": "Instala\u00e7\u00e3o"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "\u0423\u043a\u043b\u043e\u043d\u0438\u0442\u0438",
"Series": "\u0421\u0435\u0440\u0438\u0458\u0430",
"Series Detail": "\u0421\u0435\u0440\u0438\u0458\u0430 \u0414\u0435\u0442\u0430\u0459",
"Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "\u0ba8\u0bc0\u0b95\u0bcd\u0b95\u0bc1",
"Series": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd",
"Series Detail": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95",
"Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
}

View File

@ -1,6 +0,0 @@
{
"Remove": "\u0e16\u0e2d\u0e14",
"Series": "\u0e0a\u0e38\u0e14",
"Series Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e0a\u0e38\u0e14",
"Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
}

View File

@ -1,22 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@ -1,43 +0,0 @@
[
{
"creation": "2013-02-22 01:27:57",
"docstatus": 0,
"modified": "2013-03-07 07:03:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "DocType",
"istable": 1,
"module": "Setup",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Series Detail",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"doctype": "DocType",
"name": "Series Detail"
},
{
"doctype": "DocField",
"fieldname": "series",
"fieldtype": "Read Only",
"label": "Series",
"oldfieldname": "series",
"oldfieldtype": "Read Only"
},
{
"doctype": "DocField",
"fieldname": "remove",
"fieldtype": "Check",
"label": "Remove",
"oldfieldname": "remove",
"oldfieldtype": "Check"
}
]

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,6 +0,0 @@
[
"Country",
"Setup",
"State",
"State Name"
]

View File

@ -1,6 +0,0 @@
{
"Country": "\u0628\u0644\u062f",
"Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
"State": "\u062f\u0648\u0644\u0629",
"State Name": "\u0627\u0633\u0645 \u0648\u0644\u0627\u064a\u0629"
}

View File

@ -1,6 +0,0 @@
{
"Country": "Land",
"Setup": "Setup",
"State": "Zustand",
"State Name": "State Name"
}

View File

@ -1,6 +0,0 @@
{
"Country": "Pa\u00eds",
"Setup": "Disposici\u00f3n",
"State": "Estado",
"State Name": "Estado Nombre"
}

View File

@ -1,6 +0,0 @@
{
"Country": "Pays",
"Setup": "Installation",
"State": "\u00c9tat",
"State Name": "Nom de l&#39;\u00c9tat"
}

View File

@ -1,6 +0,0 @@
{
"Country": "\u0926\u0947\u0936",
"Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
"State": "\u0930\u093e\u091c\u094d\u092f",
"State Name": "\u0930\u093e\u091c\u094d\u092f \u0915\u093e \u0928\u093e\u092e"
}

View File

@ -1,6 +0,0 @@
{
"Country": "Zemlja",
"Setup": "Postavljanje",
"State": "Dr\u017eava",
"State Name": "Dr\u017eava Ime"
}

View File

@ -1,6 +0,0 @@
{
"Country": "Land",
"Setup": "Setup",
"State": "Staat",
"State Name": "Staat Naam"
}

View File

@ -1,6 +0,0 @@
{
"Country": "Pa\u00eds",
"Setup": "Configura\u00e7\u00e3o",
"State": "Estado",
"State Name": "Nome do Estado"
}

View File

@ -1,6 +0,0 @@
{
"Country": "Pa\u00eds",
"Setup": "Instala\u00e7\u00e3o",
"State": "Estado",
"State Name": "Nome Estado"
}

View File

@ -1,6 +0,0 @@
{
"Country": "\u0417\u0435\u043c\u0459\u0430",
"Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
"State": "\u0414\u0440\u0436\u0430\u0432\u0430",
"State Name": "\u0418\u043c\u0435 \u0434\u0440\u0436\u0430\u0432\u0435"
}

View File

@ -1,6 +0,0 @@
{
"Country": "\u0ba8\u0bbe\u0b9f\u0bc1",
"Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
"State": "\u0ba8\u0bbf\u0bb2\u0bc8",
"State Name": "\u0bae\u0bbe\u0ba8\u0bbf\u0bb2 \u0baa\u0bc6\u0baf\u0bb0\u0bcd"
}

View File

@ -1,6 +0,0 @@
{
"Country": "\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28",
"Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
"State": "\u0e23\u0e31\u0e10",
"State Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e23\u0e31\u0e10"
}

View File

@ -1,26 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//--------- ONLOAD -------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
}
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
}

View File

@ -1,22 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@ -1,78 +0,0 @@
[
{
"creation": "2012-03-27 14:36:25",
"docstatus": 0,
"modified": "2012-03-27 14:36:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"autoname": "field:state_name",
"doctype": "DocType",
"document_type": "Master",
"in_create": 0,
"module": "Setup",
"name": "__common__",
"read_only": 0,
"section_style": "Simple",
"show_in_menu": 0,
"version": 14
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "State",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"reqd": 1
},
{
"create": 1,
"doctype": "DocPerm",
"name": "__common__",
"parent": "State",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1,
"write": 1
},
{
"doctype": "DocType",
"name": "State"
},
{
"doctype": "DocPerm",
"role": "System Manager"
},
{
"amend": 0,
"cancel": 0,
"doctype": "DocPerm",
"role": "Sales Master Manager",
"submit": 0
},
{
"doctype": "DocPerm",
"role": "Purchase Master Manager"
},
{
"doctype": "DocField",
"fieldname": "state_name",
"fieldtype": "Data",
"label": "State Name",
"oldfieldname": "state_name",
"oldfieldtype": "Data"
},
{
"doctype": "DocField",
"fieldname": "country",
"fieldtype": "Select",
"label": "Country",
"oldfieldname": "country",
"oldfieldtype": "Select",
"options": "link:Country"
}
]

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,6 +0,0 @@
[
"Field",
"Setup",
"Workflow Action Detail",
"Value"
]

View File

@ -1,6 +0,0 @@
{
"Field": "\u062d\u0642\u0644",
"Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
"Value": "\u0642\u064a\u0645\u0629",
"Workflow Action Detail": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0633\u064a\u0631 \u0627\u0644\u0639\u0645\u0644 \u0627\u0644\u0639\u0645\u0644"
}

Some files were not shown because too many files have changed in this diff Show More