[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

@@ -38,7 +38,6 @@ class DocType(TransactionBase):
self.check_item_table()
sales_com_obj = get_obj(dt = 'Sales Common')
sales_com_obj.check_active_sales_items(self)
sales_com_obj.get_prevdoc_date(self)
def validate_fiscal_year(self):
from accounts.utils import validate_fiscal_year

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-02-22 01:27:51",
"docstatus": 0,
"modified": "2013-07-10 14:54:09",
"modified": "2013-10-10 17:02:31",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -48,18 +48,6 @@
"read_only": 1,
"width": "300px"
},
{
"doctype": "DocField",
"fieldname": "prevdoc_date",
"fieldtype": "Date",
"hidden": 0,
"in_list_view": 1,
"label": "Delivery Date",
"oldfieldname": "prevdoc_date",
"oldfieldtype": "Date",
"print_hide": 0,
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "serial_no",

View File

@@ -298,25 +298,6 @@ class DocType(TransactionBase):
exact_outstanding = flt(tot_outstanding) + flt(grand_total)
get_obj('Account',acc_head[0][0]).check_credit_limit(acc_head[0][0], obj.doc.company, exact_outstanding)
def get_prevdoc_date(self, obj):
for d in getlist(obj.doclist, obj.fname):
date_field = None
pdoctype, pname = d.prevdoc_doctype, d.prevdoc_docname
if d.against_sales_invoice:
pdoctype, pname = "Sales Invoice", d.against_sales_invoice
elif d.against_sales_order:
pdoctype, pname = "Sales Order", d.against_sales_order
if pdoctype and pname:
if pdoctype in ["Sales Invoice", "Delivery Note"]:
date_field = "posting_date"
else:
date_field = "transaction_date"
d.prevdoc_date = webnotes.conn.get_value(pdoctype, pname, date_field)
def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
from controllers.queries import get_match_cond