[minor] removed prevdoc_date
This commit is contained in:
parent
f56d73c9bc
commit
2eec1eb9a6
@ -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 ''
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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")
|
||||
|
@ -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",
|
||||
|
@ -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):
|
||||
|
@ -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",
|
||||
|
@ -14,6 +14,7 @@ from controllers.stock_controller import StockController
|
||||
class WrongWarehouseCompany(Exception): pass
|
||||
|
||||
class BuyingController(StockController):
|
||||
|
||||
def onload_post_render(self):
|
||||
# contact, address, item details
|
||||
self.set_missing_values()
|
||||
@ -280,6 +281,3 @@ class BuyingController(StockController):
|
||||
(", ".join((["%s"]*len(item_codes))),), item_codes)]
|
||||
|
||||
return self._purchase_items
|
||||
|
||||
def get_bin_details(self, arg):
|
||||
return {"projected_qty": webnotes.conn.get_value("Bin", json.loads(arg), "projected_qty") or 0 }
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
||||
|
@ -184,9 +184,9 @@ cur_frm.pformat.sales_order_no= function(doc, cdt, cdn){
|
||||
if(cl[i].against_sales_order && prevdoc_list.indexOf(cl[i].against_sales_order) == -1) {
|
||||
prevdoc_list.push(cl[i].against_sales_order);
|
||||
if(prevdoc_list.length ==1)
|
||||
out += make_row("Sales Order", cl[i].against_sales_order, cl[i].prevdoc_date, 0);
|
||||
out += make_row("Sales Order", cl[i].against_sales_order, null, 0);
|
||||
else
|
||||
out += make_row('', cl[i].against_sales_order, cl[i].prevdoc_date,0);
|
||||
out += make_row('', cl[i].against_sales_order, null,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,6 @@ class DocType(SellingController):
|
||||
sales_com_obj = get_obj(dt = 'Sales Common')
|
||||
sales_com_obj.check_stop_sales_order(self)
|
||||
sales_com_obj.check_active_sales_items(self)
|
||||
sales_com_obj.get_prevdoc_date(self)
|
||||
self.validate_for_items()
|
||||
self.validate_warehouse()
|
||||
self.validate_uom_is_integer("stock_uom", "qty")
|
||||
@ -366,7 +365,6 @@ def make_sales_invoice(source_name, target_doclist=None):
|
||||
def make_installation_note(source_name, target_doclist=None):
|
||||
def update_item(obj, target, source_parent):
|
||||
target.qty = flt(obj.qty) - flt(obj.installed_qty)
|
||||
target.prevdoc_date = source_parent.posting_date
|
||||
target.serial_no = obj.serial_no
|
||||
|
||||
doclist = get_mapped_doclist("Delivery Note", source_name, {
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-22 13:15:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-10-03 11:09:48",
|
||||
"modified": "2013-10-10 17:03:11",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -362,19 +362,6 @@
|
||||
"label": "Against Sales Invoice",
|
||||
"options": "Sales Invoice"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "prevdoc_date",
|
||||
"fieldtype": "Date",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"label": "Against Document Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "prevdoc_detail_docname",
|
||||
|
@ -59,7 +59,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)
|
||||
|
||||
# sub-contracting
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 19:29:10",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-20 11:36:55",
|
||||
"modified": "2013-10-10 17:02:51",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -424,19 +424,6 @@
|
||||
"search_index": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "prevdoc_date",
|
||||
"fieldtype": "Date",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"label": "Purchase Order Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "rm_supp_cost",
|
||||
|
Loading…
Reference in New Issue
Block a user