mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
[merge] merge with master
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-02-22 01:27:42",
|
||||
"creation": "2013-03-07 11:42:55",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-07 07:03:27",
|
||||
"modified": "2013-05-22 11:59:52",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -36,6 +36,7 @@
|
||||
"oldfieldname": "schedule_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -49,6 +50,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Item",
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -72,6 +74,7 @@
|
||||
"oldfieldname": "item_name",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -83,6 +86,7 @@
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Small Text",
|
||||
"print_width": "300px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "300px"
|
||||
},
|
||||
@@ -95,6 +99,7 @@
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency",
|
||||
"print_width": "60px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "60px"
|
||||
},
|
||||
@@ -108,6 +113,7 @@
|
||||
"options": "UOM",
|
||||
"print_hide": 0,
|
||||
"print_width": "100px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
@@ -117,14 +123,16 @@
|
||||
"fieldtype": "Currency",
|
||||
"label": "Ref Rate ",
|
||||
"options": "currency",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "discount_rate",
|
||||
"fieldtype": "Float",
|
||||
"label": "Discount %",
|
||||
"print_hide": 0
|
||||
"print_hide": 0,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -135,7 +143,8 @@
|
||||
"oldfieldname": "import_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "currency",
|
||||
"print_hide": 0
|
||||
"print_hide": 0,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -153,7 +162,8 @@
|
||||
"fieldtype": "Currency",
|
||||
"label": "Ref Rate*",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "0.00",
|
||||
@@ -166,6 +176,7 @@
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "100px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
@@ -192,6 +203,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Warehouse",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
@@ -202,6 +214,7 @@
|
||||
"label": "Project Name",
|
||||
"options": "Project",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0
|
||||
},
|
||||
{
|
||||
@@ -214,6 +227,7 @@
|
||||
"oldfieldtype": "Currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "100px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
@@ -237,7 +251,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "Prevdoc DocType",
|
||||
"no_copy": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_doctype",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
@@ -250,7 +264,7 @@
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"label": "Material Request No",
|
||||
"no_copy": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_docname",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Material Request",
|
||||
@@ -267,6 +281,7 @@
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"label": "Material Request Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
@@ -280,7 +295,7 @@
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"label": "Material Request Detail No",
|
||||
"no_copy": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_detail_docname",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
@@ -294,6 +309,7 @@
|
||||
"hidden": 1,
|
||||
"in_filter": 0,
|
||||
"label": "Supplier Quotation",
|
||||
"no_copy": 1,
|
||||
"options": "Supplier Quotation",
|
||||
"read_only": 1,
|
||||
"search_index": 0
|
||||
@@ -304,6 +320,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"label": "Supplier Quotation Item",
|
||||
"no_copy": 1,
|
||||
"options": "Supplier Quotation Item",
|
||||
"read_only": 1
|
||||
},
|
||||
@@ -395,6 +412,7 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "page_break",
|
||||
"oldfieldtype": "Check",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
}
|
||||
]
|
||||
@@ -17,28 +17,16 @@
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.doc import addchild, make_autoname
|
||||
from webnotes.model.bean import copy_doclist
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
|
||||
from webnotes.model.doc import addchild
|
||||
|
||||
class DocType:
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
|
||||
# Autoname
|
||||
# ---------
|
||||
def autoname(self):
|
||||
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
|
||||
|
||||
|
||||
def get_item_specification_details(self):
|
||||
self.doclist = self.doc.clear_table(self.doclist, 'qa_specification_details')
|
||||
specification = sql("select specification, value from `tabItem Quality Inspection Parameter` \
|
||||
specification = webnotes.conn.sql("select specification, value from `tabItem Quality Inspection Parameter` \
|
||||
where parent = '%s' order by idx" % (self.doc.item_code))
|
||||
for d in specification:
|
||||
child = addchild(self.doc, 'qa_specification_details', 'Quality Inspection Reading', self.doclist)
|
||||
@@ -48,13 +36,13 @@ class DocType:
|
||||
|
||||
def on_submit(self):
|
||||
if self.doc.purchase_receipt_no:
|
||||
sql("update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2 set t1.qa_no = '%s', t2.modified = '%s' \
|
||||
webnotes.conn.sql("update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2 set t1.qa_no = '%s', t2.modified = '%s' \
|
||||
where t1.parent = '%s' and t1.item_code = '%s' and t1.parent = t2.name" \
|
||||
% (self.doc.name, self.doc.modified, self.doc.purchase_receipt_no, self.doc.item_code))
|
||||
|
||||
|
||||
def on_cancel(self):
|
||||
if self.doc.purchase_receipt_no:
|
||||
sql("update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2 set t1.qa_no = '', t2.modified = '%s' \
|
||||
webnotes.conn.sql("update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2 set t1.qa_no = '', t2.modified = '%s' \
|
||||
where t1.parent = '%s' and t1.item_code = '%s' and t1.parent = t2.name" \
|
||||
% (self.doc.modified, self.doc.purchase_receipt_no, self.doc.item_code))
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-10 16:34:11",
|
||||
"creation": "2013-04-30 13:13:03",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:57:21",
|
||||
"modified": "2013-05-09 14:34:10",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"autoname": "QAI/.######",
|
||||
"autoname": "naming_series:",
|
||||
"doctype": "DocType",
|
||||
"is_submittable": 1,
|
||||
"module": "Buying",
|
||||
|
||||
@@ -168,7 +168,7 @@ class DocType(TransactionBase):
|
||||
self.delete_supplier_communication()
|
||||
self.delete_supplier_account()
|
||||
|
||||
def on_rename(self, new, old):
|
||||
def on_rename(self, new, old, merge=False):
|
||||
#update supplier_name if not naming series
|
||||
if webnotes.defaults.get_global_default('supp_master_name') == 'Supplier Name':
|
||||
update_fields = [
|
||||
@@ -186,7 +186,7 @@ class DocType(TransactionBase):
|
||||
for account in webnotes.conn.sql("""select name, account_name from
|
||||
tabAccount where master_name=%s and master_type='Supplier'""", old, as_dict=1):
|
||||
if account.account_name != new:
|
||||
webnotes.rename_doc("Account", account.name, new)
|
||||
webnotes.rename_doc("Account", account.name, new, merge=merge)
|
||||
|
||||
#update master_name in doctype account
|
||||
webnotes.conn.sql("""update `tabAccount` set master_name = %s,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-02-22 01:27:43",
|
||||
"creation": "2013-03-07 11:42:56",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-07 07:03:32",
|
||||
"modified": "2013-05-22 12:02:28",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -35,6 +35,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Item",
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -58,6 +59,7 @@
|
||||
"oldfieldname": "item_name",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -69,6 +71,7 @@
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Small Text",
|
||||
"print_width": "300px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "300px"
|
||||
},
|
||||
@@ -81,6 +84,7 @@
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency",
|
||||
"print_width": "60px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "60px"
|
||||
},
|
||||
@@ -94,6 +98,7 @@
|
||||
"options": "UOM",
|
||||
"print_hide": 0,
|
||||
"print_width": "100px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
@@ -103,14 +108,16 @@
|
||||
"fieldtype": "Currency",
|
||||
"label": "Ref Rate ",
|
||||
"options": "currency",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "discount_rate",
|
||||
"fieldtype": "Float",
|
||||
"label": "Discount %",
|
||||
"print_hide": 0
|
||||
"print_hide": 0,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -121,7 +128,8 @@
|
||||
"oldfieldname": "import_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "currency",
|
||||
"print_hide": 0
|
||||
"print_hide": 0,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -139,7 +147,8 @@
|
||||
"fieldtype": "Currency",
|
||||
"label": "Ref Rate*",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "0.00",
|
||||
@@ -152,6 +161,7 @@
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "100px",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
@@ -178,6 +188,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Warehouse",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
@@ -188,6 +199,7 @@
|
||||
"label": "Project Name",
|
||||
"options": "Project",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0
|
||||
},
|
||||
{
|
||||
@@ -196,7 +208,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "Prevdoc DocType",
|
||||
"no_copy": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_doctype",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
@@ -209,7 +221,7 @@
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"label": "Material Request No",
|
||||
"no_copy": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_docname",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Material Request",
|
||||
@@ -226,6 +238,7 @@
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"label": "Material Request Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
@@ -239,7 +252,7 @@
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"label": "Material Request Detail No",
|
||||
"no_copy": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_detail_docname",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
@@ -295,6 +308,7 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "page_break",
|
||||
"oldfieldtype": "Check",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
}
|
||||
]
|
||||
@@ -111,6 +111,10 @@ wn.module_page["Buying"] = [
|
||||
"label":wn._("Purchase In Transit"),
|
||||
route: "query-report/Purchase In Transit",
|
||||
},
|
||||
{
|
||||
"label":wn._("Requested Items To Be Ordered"),
|
||||
route: "query-report/Requested Items To Be Ordered",
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-05-13 16:10:02",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-05-13 16:21:07",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"add_total_row": 1,
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.ordered_qty as \"Ordered Qty:Float:100\", \n\t(mr_item.qty - ifnull(mr_item.ordered_qty, 0)) as \"Qty to Order:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand ifnull(mr_item.ordered_qty, 0) < ifnull(mr_item.qty, 0)\norder by mr.transaction_date asc",
|
||||
"ref_doctype": "Purchase Order",
|
||||
"report_name": "Requested Items To Be Ordered",
|
||||
"report_type": "Query Report"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"name": "Requested Items To Be Ordered"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user