From 291e8c254510df52457548ba39d455b443d46e9b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 23 Jan 2013 16:06:44 +0530 Subject: [PATCH] removed landed cost master --- .../payment_to_invoice_matching_tool.txt | 4 +- .../january_2013/remove_landed_cost_master.py | 4 + patches/patch_list.py | 1 + .../september_2012/all_permissions_patch.py | 2 +- setup/doctype/company/company.txt | 4 +- stock/doctype/landed_cost_master/__init__.py | 1 - .../landed_cost_master/landed_cost_master.js | 30 ------- .../landed_cost_master/landed_cost_master.py | 22 ----- .../landed_cost_master/landed_cost_master.txt | 86 ------------------- .../locale/_messages_doc.json | 8 -- .../landed_cost_master/locale/hi-doc.json | 8 -- .../landed_cost_master_detail/__init__.py | 1 - .../landed_cost_master_detail.py | 22 ----- .../landed_cost_master_detail.txt | 48 ----------- .../locale/_messages_doc.json | 6 -- .../locale/hi-doc.json | 6 -- .../landed_cost_wizard/landed_cost_wizard.py | 16 ---- .../landed_cost_wizard/landed_cost_wizard.txt | 20 +---- stock/page/stock_home/stock_home.js | 5 -- utilities/cleanup_data.py | 1 - 20 files changed, 13 insertions(+), 282 deletions(-) create mode 100644 patches/january_2013/remove_landed_cost_master.py delete mode 100644 stock/doctype/landed_cost_master/__init__.py delete mode 100644 stock/doctype/landed_cost_master/landed_cost_master.js delete mode 100644 stock/doctype/landed_cost_master/landed_cost_master.py delete mode 100644 stock/doctype/landed_cost_master/landed_cost_master.txt delete mode 100644 stock/doctype/landed_cost_master/locale/_messages_doc.json delete mode 100644 stock/doctype/landed_cost_master/locale/hi-doc.json delete mode 100644 stock/doctype/landed_cost_master_detail/__init__.py delete mode 100644 stock/doctype/landed_cost_master_detail/landed_cost_master_detail.py delete mode 100644 stock/doctype/landed_cost_master_detail/landed_cost_master_detail.txt delete mode 100644 stock/doctype/landed_cost_master_detail/locale/_messages_doc.json delete mode 100644 stock/doctype/landed_cost_master_detail/locale/hi-doc.json diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt index 6f5bdb497a..58bee4cbfa 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt +++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-23 12:23:46", + "creation": "2013-01-23 15:27:14", "docstatus": 0, - "modified": "2013-01-23 12:26:49", + "modified": "2013-01-23 15:56:55", "modified_by": "Administrator", "owner": "Administrator" }, diff --git a/patches/january_2013/remove_landed_cost_master.py b/patches/january_2013/remove_landed_cost_master.py new file mode 100644 index 0000000000..01eefb46c7 --- /dev/null +++ b/patches/january_2013/remove_landed_cost_master.py @@ -0,0 +1,4 @@ +def execute(): + import webnotes + webnotes.delete_doc("DocType", "Landed Cost Master") + webnotes.delete_doc("DocType", "Landed Cost Master Detail") \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 7e87fe41e0..f35cb62ecb 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -156,4 +156,5 @@ patch_list = [ "execute:webnotes.reload_doc('accounts','Print Format','Payment Receipt Voucher')", "patches.january_2013.update_fraction_for_usd", "patches.january_2013.remove_unwanted_permission", + "patches.january_2013.remove_landed_cost_master", ] \ No newline at end of file diff --git a/patches/september_2012/all_permissions_patch.py b/patches/september_2012/all_permissions_patch.py index ab06b71d9f..8373d8aadf 100644 --- a/patches/september_2012/all_permissions_patch.py +++ b/patches/september_2012/all_permissions_patch.py @@ -16,7 +16,7 @@ def project_perms(): def stock_perms(): webnotes.conn.sql("""delete from `tabDocPerm` - where parent in ('Landed Cost Master', 'Landed Cost Wizard', + where parent in ('Landed Cost Wizard', 'Sales and Purchase Return Tool') and role='All' and permlevel=0""") def account_perms(): diff --git a/setup/doctype/company/company.txt b/setup/doctype/company/company.txt index fc778ceb35..b81e1f1b30 100644 --- a/setup/doctype/company/company.txt +++ b/setup/doctype/company/company.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-10 16:34:22", + "creation": "2013-01-22 16:50:36", "docstatus": 0, - "modified": "2013-01-22 14:55:58", + "modified": "2013-01-23 15:56:48", "modified_by": "Administrator", "owner": "Administrator" }, diff --git a/stock/doctype/landed_cost_master/__init__.py b/stock/doctype/landed_cost_master/__init__.py deleted file mode 100644 index baffc48825..0000000000 --- a/stock/doctype/landed_cost_master/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/stock/doctype/landed_cost_master/landed_cost_master.js b/stock/doctype/landed_cost_master/landed_cost_master.js deleted file mode 100644 index 03e8a39fd0..0000000000 --- a/stock/doctype/landed_cost_master/landed_cost_master.js +++ /dev/null @@ -1,30 +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 . - - - -//--------- ONLOAD ------------- -cur_frm.cscript.onload = function(doc, cdt, cdn) { - -} - -cur_frm.cscript.refresh = function(doc, cdt, cdn) { - -} - -cur_frm.fields_dict.landed_cost.grid.get_field('account_head').get_query = function(doc, cdt, cdn) { - return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND (tabAccount.account_type = "Tax" OR tabAccount.account_type = "Chargeable" or (tabAccount.is_pl_account = "Yes" and tabAccount.debit_or_credit = "Debit")) AND tabAccount.name LIKE "%s"'; -} \ No newline at end of file diff --git a/stock/doctype/landed_cost_master/landed_cost_master.py b/stock/doctype/landed_cost_master/landed_cost_master.py deleted file mode 100644 index 7f48feb2eb..0000000000 --- a/stock/doctype/landed_cost_master/landed_cost_master.py +++ /dev/null @@ -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 . - -from __future__ import unicode_literals -import webnotes - -class DocType: - def __init__(self, d, dl): - self.doc, self.doclist = d, dl \ No newline at end of file diff --git a/stock/doctype/landed_cost_master/landed_cost_master.txt b/stock/doctype/landed_cost_master/landed_cost_master.txt deleted file mode 100644 index 63b102c595..0000000000 --- a/stock/doctype/landed_cost_master/landed_cost_master.txt +++ /dev/null @@ -1,86 +0,0 @@ -[ - { - "creation": "2013-01-10 16:34:27", - "docstatus": 0, - "modified": "2013-01-22 14:56:03", - "modified_by": "Administrator", - "owner": "Administrator" - }, - { - "autoname": "field:title", - "doctype": "DocType", - "document_type": "Master", - "module": "Stock", - "name": "__common__" - }, - { - "doctype": "DocField", - "name": "__common__", - "parent": "Landed Cost Master", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0 - }, - { - "create": 1, - "doctype": "DocPerm", - "name": "__common__", - "parent": "Landed Cost Master", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "read": 1, - "report": 1, - "submit": 0, - "write": 1 - }, - { - "doctype": "DocType", - "name": "Landed Cost Master" - }, - { - "doctype": "DocField", - "fieldname": "trash_reason", - "fieldtype": "Small Text", - "label": "Trash Reason", - "oldfieldname": "trash_reason", - "oldfieldtype": "Small Text", - "read_only": 1 - }, - { - "doctype": "DocField", - "fieldname": "title", - "fieldtype": "Data", - "label": "Title", - "oldfieldname": "title", - "oldfieldtype": "Data" - }, - { - "doctype": "DocField", - "fieldname": "landed_cost_details", - "fieldtype": "Section Break", - "label": "Landed Cost Items", - "oldfieldtype": "Section Break" - }, - { - "doctype": "DocField", - "fieldname": "landed_cost", - "fieldtype": "Table", - "label": "Landed Cost", - "oldfieldname": "landed_cost", - "oldfieldtype": "Table", - "options": "Landed Cost Master Detail" - }, - { - "doctype": "DocPerm", - "role": "Purchase Manager" - }, - { - "doctype": "DocPerm", - "role": "System Manager" - }, - { - "doctype": "DocPerm", - "role": "Purchase User" - } -] \ No newline at end of file diff --git a/stock/doctype/landed_cost_master/locale/_messages_doc.json b/stock/doctype/landed_cost_master/locale/_messages_doc.json deleted file mode 100644 index 4f1ad6344d..0000000000 --- a/stock/doctype/landed_cost_master/locale/_messages_doc.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "Trash Reason", - "Title", - "Landed Cost Master", - "Landed Cost", - "Landed Cost Items", - "Stock" -] \ No newline at end of file diff --git a/stock/doctype/landed_cost_master/locale/hi-doc.json b/stock/doctype/landed_cost_master/locale/hi-doc.json deleted file mode 100644 index 41f3344435..0000000000 --- a/stock/doctype/landed_cost_master/locale/hi-doc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Landed Cost": "\u0906\u092f\u093e\u0924\u093f\u0924 \u092e\u093e\u0932 \u0915\u0940 \u0932\u093e\u0917\u0924", - "Landed Cost Items": "\u0906\u092f\u093e\u0924\u093f\u0924 \u092e\u093e\u0932 \u0915\u0940 \u0932\u093e\u0917\u0924 \u0906\u0907\u091f\u092e", - "Landed Cost Master": "\u0906\u092f\u093e\u0924\u093f\u0924 \u092e\u093e\u0932 \u0915\u0940 \u0932\u093e\u0917\u0924 \u092e\u093e\u0938\u094d\u091f\u0930", - "Stock": "\u0938\u094d\u091f\u0949\u0915", - "Title": "\u0936\u0940\u0930\u094d\u0937\u0915", - "Trash Reason": "\u091f\u094d\u0930\u0948\u0936 \u0915\u093e\u0930\u0923" -} \ No newline at end of file diff --git a/stock/doctype/landed_cost_master_detail/__init__.py b/stock/doctype/landed_cost_master_detail/__init__.py deleted file mode 100644 index baffc48825..0000000000 --- a/stock/doctype/landed_cost_master_detail/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.py b/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.py deleted file mode 100644 index 7f48feb2eb..0000000000 --- a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.py +++ /dev/null @@ -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 . - -from __future__ import unicode_literals -import webnotes - -class DocType: - def __init__(self, d, dl): - self.doc, self.doclist = d, dl \ No newline at end of file diff --git a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.txt b/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.txt deleted file mode 100644 index b1db6a3b96..0000000000 --- a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.txt +++ /dev/null @@ -1,48 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2012-05-03 11:00:55", - "modified_by": "Administrator", - "modified": "2012-05-04 13:02:35" - }, - { - "section_style": "Simple", - "istable": 1, - "name": "__common__", - "colour": "White:FFF", - "module": "Stock", - "doctype": "DocType", - "version": 1, - "server_code_error": " " - }, - { - "name": "__common__", - "parent": "Landed Cost Master Detail", - "oldfieldtype": "Data", - "doctype": "DocField", - "parenttype": "DocType", - "permlevel": 0, - "parentfield": "fields" - }, - { - "name": "Landed Cost Master Detail", - "doctype": "DocType" - }, - { - "doctype": "DocField", - "label": "Account Head", - "oldfieldname": "account_head", - "fieldname": "account_head", - "fieldtype": "Link", - "options": "Account" - }, - { - "doctype": "DocField", - "label": "Description", - "oldfieldname": "description", - "width": "300px", - "fieldname": "description", - "fieldtype": "Data" - } -] \ No newline at end of file diff --git a/stock/doctype/landed_cost_master_detail/locale/_messages_doc.json b/stock/doctype/landed_cost_master_detail/locale/_messages_doc.json deleted file mode 100644 index a8a7ba160e..0000000000 --- a/stock/doctype/landed_cost_master_detail/locale/_messages_doc.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - "Description", - "Landed Cost Master Detail", - "Account Head", - "Stock" -] \ No newline at end of file diff --git a/stock/doctype/landed_cost_master_detail/locale/hi-doc.json b/stock/doctype/landed_cost_master_detail/locale/hi-doc.json deleted file mode 100644 index ee50455c37..0000000000 --- a/stock/doctype/landed_cost_master_detail/locale/hi-doc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Account Head": "\u0932\u0947\u0916\u093e\u0936\u0940\u0930\u094d\u0937", - "Description": "\u0935\u093f\u0935\u0930\u0923", - "Landed Cost Master Detail": "\u0909\u0924\u0930\u093e \u0932\u093e\u0917\u0924 \u092e\u093e\u0938\u094d\u091f\u0930 \u0935\u093f\u0938\u094d\u0924\u093e\u0930", - "Stock": "\u0938\u094d\u091f\u0949\u0915" -} \ No newline at end of file diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py index 7067e52d0b..f2bc7992d0 100644 --- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py +++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py @@ -56,19 +56,6 @@ class DocType: ch.purchase_receipt = i and i['name'] or '' ch.save() - - def get_landed_cost_master_details(self): - """ pull details from landed cost master""" - self.doclist = self.doc.clear_table(self.doclist, 'landed_cost_details') - idx = 0 - landed_cost = sql("select account_head, description from `tabLanded Cost Master Detail` where parent=%s", (self.doc.landed_cost), as_dict = 1) - for cost in landed_cost: - lct = addchild(self.doc, 'landed_cost_details', 'Landed Cost Item', - self.doclist) - lct.account_head = cost['account_head'] - lct.description = cost['description'] - - def get_selected_pr(self): """ Get selected purchase receipt no """ self.selected_pr = [d.purchase_receipt for d in getlist(self.doclist, 'lc_pr_details') if d.select_pr] @@ -199,9 +186,6 @@ class DocType: ocd[oc].total_tax_amount = flt(prev_total) ocd[oc].tax_amount += flt(tax_amount) - total_amount = flt(ocd[oc].tax_amount) - total_tax_amount = flt(ocd[oc].total_tax_amount) + (add_ded * flt(total_amount)) - if ocd[oc].category != "Valuation": prev_total += add_ded * flt(ocd[oc].total_amount) total += add_ded * flt(ocd[oc].tax_amount) diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt index fb4483f3e1..15b370ae2d 100644 --- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt +++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-10 16:34:28", + "creation": "2013-01-22 16:50:39", "docstatus": 0, - "modified": "2013-01-22 14:56:03", + "modified": "2013-01-23 15:25:00", "modified_by": "Administrator", "owner": "wasim@webnotestech.com" }, @@ -29,7 +29,7 @@ "parenttype": "DocType", "permlevel": 0, "read": 1, - "report": 1, + "report": 0, "submit": 0, "write": 1 }, @@ -92,20 +92,6 @@ "fieldtype": "Section Break", "options": "Simple" }, - { - "doctype": "DocField", - "fieldname": "landed_cost", - "fieldtype": "Link", - "label": "Select Landed Cost Items Master", - "options": "Landed Cost Master" - }, - { - "doctype": "DocField", - "fieldname": "get_details", - "fieldtype": "Button", - "label": "Get Details", - "options": "get_landed_cost_master_details" - }, { "doctype": "DocField", "fieldname": "landed_cost_details", diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js index 7ea62de254..ec039993e1 100644 --- a/stock/page/stock_home/stock_home.js +++ b/stock/page/stock_home/stock_home.js @@ -78,11 +78,6 @@ wn.module_page["Stock"] = [ "label": wn._("Quality Inspection"), description: wn._("Incoming quality inspection.") }, - { - "doctype":"Landed Cost Master", - "label":"Landed Cost Master", - description: wn._("Transportatoin cost distribution template.") - }, { "route":"Form/Landed Cost Wizard/Landed Cost Wizard", "label": wn._("Landed Cost Wizard"), diff --git a/utilities/cleanup_data.py b/utilities/cleanup_data.py index 6f790da309..92c41a340e 100644 --- a/utilities/cleanup_data.py +++ b/utilities/cleanup_data.py @@ -64,7 +64,6 @@ def delete_masters(): 'Letter Head':'', 'Leave Type':['Leave Without Pay', 'Privilege Leave', 'Casual Leave', 'PL', 'CL', 'LWP', 'Compensatory Off', 'Sick Leave'], - 'Landed Cost Master':'', 'Appraisal Template':'', 'Item Group':['All Item Groups', 'Default'], 'Item':'',