[minor] removed prevdoc_date

This commit is contained in:
Rushabh Mehta
2013-10-10 17:03:56 +05:30
parent f56d73c9bc
commit 2eec1eb9a6
15 changed files with 10 additions and 112 deletions

View File

@@ -189,10 +189,3 @@ class DocType(BuyingController):
if not submitted:
msgprint(cstr(doctype) + ": " + cstr(submitted[0][0])
+ _(" not submitted"), raise_exception=1)
def get_prevdoc_date(self, obj):
for d in getlist(obj.doclist, obj.fname):
if d.prevdoc_doctype and d.prevdoc_docname:
dt = webnotes.conn.sql("select transaction_date from `tab%s` where name = %s"
% (d.prevdoc_doctype, '%s'), (d.prevdoc_docname))
d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or ''

View File

@@ -185,9 +185,9 @@ cur_frm.pformat.indent_no = function(doc, cdt, cdn){
if(cl[i].prevdoc_doctype == 'Material Request' && cl[i].prevdoc_docname && prevdoc_list.indexOf(cl[i].prevdoc_docname) == -1) {
prevdoc_list.push(cl[i].prevdoc_docname);
if(prevdoc_list.length ==1)
out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, null,0);
else
out += make_row('', cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
out += make_row('', cl[i].prevdoc_docname,null,0);
}
}
}

View File

@@ -41,7 +41,6 @@ class DocType(BuyingController):
pc_obj = get_obj(dt='Purchase Common')
pc_obj.validate_for_items(self)
pc_obj.get_prevdoc_date(self)
self.check_for_stopped_status(pc_obj)
self.validate_uom_is_integer("uom", "qty")

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:06",
"docstatus": 0,
"modified": "2013-08-07 14:44:12",
"modified": "2013-10-10 17:01:57",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -306,21 +306,6 @@
"search_index": 1,
"width": "120px"
},
{
"doctype": "DocField",
"fieldname": "prevdoc_date",
"fieldtype": "Date",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "Material Request Date",
"no_copy": 1,
"oldfieldname": "prevdoc_date",
"oldfieldtype": "Date",
"print_hide": 1,
"read_only": 1,
"search_index": 0
},
{
"doctype": "DocField",
"fieldname": "prevdoc_detail_docname",

View File

@@ -54,7 +54,6 @@ class DocType(BuyingController):
def validate_common(self):
pc = get_obj('Purchase Common')
pc.validate_for_items(self)
pc.get_prevdoc_date(self)
@webnotes.whitelist()
def make_purchase_order(source_name, target_doclist=None):

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-22 12:43:10",
"docstatus": 0,
"modified": "2013-08-07 14:44:18",
"modified": "2013-10-10 17:02:11",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -259,21 +259,6 @@
"search_index": 1,
"width": "120px"
},
{
"doctype": "DocField",
"fieldname": "prevdoc_date",
"fieldtype": "Date",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "Material Request Date",
"no_copy": 1,
"oldfieldname": "prevdoc_date",
"oldfieldtype": "Date",
"print_hide": 1,
"read_only": 1,
"search_index": 0
},
{
"doctype": "DocField",
"fieldname": "prevdoc_detail_docname",