mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-09 08:02:51 +00:00
first cut for lazy loading framework
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
report.customize_filters = function() {
|
||||
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'From PO Date'].df['report_default'] = sys_defaults.year_start_date;
|
||||
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'To PO Date'].df['report_default'] = dateutil.obj_to_str(new Date());
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
# Search Criteria, itemwise_purchase_details
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2010-08-08 17:09:31',
|
||||
'docstatus': 0,
|
||||
'modified': '2010-03-31 12:39:57',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all Search Criteria
|
||||
{
|
||||
'columns': 'Purchase Order\x01ID,Purchase Order\x01PO Date,Purchase Order\x01Grand Total,PO Detail\x01Item Code,PO Detail\x01Item Name,PO Detail\x01Quantity,PO Detail\x01Stock UOM,PO Detail\x01Purchase Rate,PO Detail\x01Amount,PO Detail\x01Warehouse',
|
||||
'criteria_name': 'Itemwise Purchase Details',
|
||||
'doc_type': 'PO Detail',
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Purchase Order\x01Saved':1,'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'','Purchase Order\x01Company Name':''}",
|
||||
'module': 'Buying',
|
||||
'name': '__common__',
|
||||
'parent_doc_type': 'Purchase Order',
|
||||
'sort_by': '`tabPurchase Order`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
},
|
||||
|
||||
# Search Criteria, itemwise_purchase_details
|
||||
{
|
||||
'doctype': 'Search Criteria',
|
||||
'name': 'itemwise_purchase_details'
|
||||
}
|
||||
]
|
||||
@@ -1,9 +0,0 @@
|
||||
report.customize_filters = function() {
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From Transaction Date'].df['report_default'] = sys_defaults.year_start_date;
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To Transaction Date'].df['report_default'] = dateutil.obj_to_str(new Date());
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
# Search Criteria, itemwise_receipt_details
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2010-12-14 10:23:19',
|
||||
'docstatus': 0,
|
||||
'modified': '2010-10-22 14:36:11',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all Search Criteria
|
||||
{
|
||||
'columns': 'Purchase Receipt\x01ID,Purchase Receipt\x01Posting Date,Purchase Receipt Detail\x01Item Code,Purchase Receipt Detail\x01Item Name,Purchase Receipt Detail\x01Accepted Quantity,Purchase Receipt Detail\x01Rejected Quantity,Purchase Receipt Detail\x01Accepted Warehouse,Purchase Receipt Detail\x01Rejected Warehouse,Purchase Receipt Detail\x01Amount',
|
||||
'criteria_name': 'Itemwise Receipt Details',
|
||||
'doc_type': 'Purchase Receipt Detail',
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Purchase Receipt\x01Saved':1,'Purchase Receipt\x01Submitted':1,'Purchase Receipt\x01Status':'','Purchase Receipt\x01Fiscal Year':''}",
|
||||
'module': 'Buying',
|
||||
'name': '__common__',
|
||||
'page_len': 50,
|
||||
'parent_doc_type': 'Purchase Receipt',
|
||||
'sort_by': '`tabPurchase Receipt`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
},
|
||||
|
||||
# Search Criteria, itemwise_receipt_details
|
||||
{
|
||||
'doctype': 'Search Criteria',
|
||||
'name': 'itemwise_receipt_details'
|
||||
}
|
||||
]
|
||||
@@ -1,4 +0,0 @@
|
||||
report.customize_filters = function() {
|
||||
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
|
||||
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
# Search Criteria, pending_po_items_to_bill
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2011-03-30 11:03:20',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-03-29 14:26:49',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'dhanalekshmi@webnotestech.com'
|
||||
},
|
||||
|
||||
# These values are common for all Search Criteria
|
||||
{
|
||||
'add_col': '(CASE WHEN (`tabPO Detail`.qty- ifnull(`tabPO Detail`.billed_qty, 0) > 0 ) THEN (`tabPO Detail`.qty-ifnull(`tabPO Detail`.billed_qty, 0) ) ELSE 0 END) AS "Pending To Bill"',
|
||||
'add_cond': '(`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0) > 0 or `tabPO Detail`.qty - ifnull(`tabPO Detail`.billed_qty, 0) > 0)\n`tabPurchase Order`.status != "Stopped"',
|
||||
'columns': 'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01Supplier Name,Purchase Order\x01Status,Purchase Order\x01PO Date,Purchase Order\x01Fiscal Year,PO Detail\x01Indent No,PO Detail\x01Item Code,PO Detail\x01Item Name,PO Detail\x01Description,PO Detail\x01Quantity,PO Detail\x01UOM,PO Detail\x01Received Qty',
|
||||
'criteria_name': 'Pending PO Items To Bill',
|
||||
'description': 'Pending PO Items To Bill',
|
||||
'doc_type': 'PO Detail',
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Purchase Order\x01Saved':1,'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'','Purchase Order\x01Fiscal Year':''}",
|
||||
'module': 'Buying',
|
||||
'name': '__common__',
|
||||
'page_len': 50,
|
||||
'parent_doc_type': 'Purchase Order',
|
||||
'sort_by': '`tabPurchase Order`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
},
|
||||
|
||||
# Search Criteria, pending_po_items_to_bill
|
||||
{
|
||||
'doctype': 'Search Criteria',
|
||||
'name': 'pending_po_items_to_bill'
|
||||
}
|
||||
]
|
||||
@@ -1,4 +0,0 @@
|
||||
report.customize_filters = function() {
|
||||
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
|
||||
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
msgprint(colwidths)
|
||||
colwidths[col_idx['Pending Quantity To Receive']] = '200px'
|
||||
colwidths[col_idx['Pending Amount To Receive']] = '200px'
|
||||
@@ -1,37 +0,0 @@
|
||||
# Search Criteria, pending_po_items_to_receive
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2011-03-30 11:03:20',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-03-29 14:26:16',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'dhanalekshmi@webnotestech.com'
|
||||
},
|
||||
|
||||
# These values are common for all Search Criteria
|
||||
{
|
||||
'add_col': '`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0) AS "Pending Quantity To Receive"\n(`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0)) * `tabPO Detail`.purchase_rate AS "Pending Amount To Receive"',
|
||||
'add_cond': '`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0) > 0 \n`tabPurchase Order`.status != "Stopped"',
|
||||
'columns': 'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01Supplier Name,Purchase Order\x01Status,Purchase Order\x01PO Date,Purchase Order\x01Fiscal Year,PO Detail\x01Indent No,PO Detail\x01Item Code,PO Detail\x01Item Name,PO Detail\x01Description,PO Detail\x01Quantity,PO Detail\x01UOM,PO Detail\x01Received Qty',
|
||||
'criteria_name': 'Pending PO Items To Receive',
|
||||
'description': 'Pending PO Items To Receive',
|
||||
'doc_type': 'PO Detail',
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Purchase Order\x01Saved':1,'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'','Purchase Order\x01Fiscal Year':''}",
|
||||
'module': 'Buying',
|
||||
'name': '__common__',
|
||||
'page_len': 50,
|
||||
'parent_doc_type': 'Purchase Order',
|
||||
'sort_by': '`tabPurchase Order`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
},
|
||||
|
||||
# Search Criteria, pending_po_items_to_receive
|
||||
{
|
||||
'doctype': 'Search Criteria',
|
||||
'name': 'pending_po_items_to_receive'
|
||||
}
|
||||
]
|
||||
@@ -1,32 +0,0 @@
|
||||
report.customize_filters = function() {
|
||||
|
||||
this.hide_all_filters();
|
||||
|
||||
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Company'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Credit To'].df.filter_hide = 0;
|
||||
|
||||
|
||||
this.add_filter({fieldname:'pr_posting_date', label:'PR Posting Date', fieldtype:'Date', ignore : 1, parent:'Purchase Receipt'});
|
||||
|
||||
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Credit To'].df.in_first_page = 0;
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
|
||||
|
||||
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From PR Posting Date'].df.ignore = 1;
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To PR Posting Date'].df.ignore = 1;
|
||||
|
||||
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From PR Posting Date'].df['report_default'] = sys_defaults.year_start_date;
|
||||
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To PR Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
|
||||
this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
|
||||
|
||||
}
|
||||
|
||||
this.mytabs.items['Select Columns'].hide();
|
||||
@@ -1,7 +0,0 @@
|
||||
#check mendatory
|
||||
if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
|
||||
msgprint("Please select From Posting Date and To Posting Date in 'Set Filters' section")
|
||||
raise Exception
|
||||
else:
|
||||
from_date = filter_values.get('posting_date')
|
||||
to_date = filter_values.get('posting_date1')
|
||||
@@ -1,39 +0,0 @@
|
||||
# Search Criteria, purchase_in_transit
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2010-09-01 15:48:09',
|
||||
'docstatus': 0,
|
||||
'modified': '2010-08-30 13:04:44',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all Search Criteria
|
||||
{
|
||||
'add_col': "`tabPurchase Receipt`.`posting_date` AS 'PR Posting Date'",
|
||||
'add_cond': "`tabPV Detail`.`purchase_receipt` = `tabPurchase Receipt`.`name`\n`tabPurchase Receipt`.`posting_date` >= '%(pr_posting_date)s'\n`tabPurchase Receipt`.`posting_date` <= '%(pr_posting_date1)s'\n`tabPurchase Receipt`.`posting_date` > `tabPayable Voucher`.`posting_date`",
|
||||
'add_tab': '`tabPurchase Receipt`',
|
||||
'columns': 'Payable Voucher\x01ID,Payable Voucher\x01Voucher Date,Payable Voucher\x01Posting Date,Payable Voucher\x01Credit To,PV Detail\x01Rate,PV Detail\x01Qty,PV Detail\x01Amount,PV Detail\x01Pur Order,PV Detail\x01Pur Receipt',
|
||||
'criteria_name': 'Purchase in Transit',
|
||||
'description': 'List of PR whose posting date is after PV posting date',
|
||||
'dis_filters': '`tabPurchase Receipt`.`pr_posting_date`',
|
||||
'doc_type': 'PV Detail',
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Payable Voucher\x01Submitted':1,'Payable Voucher\x01From Posting Date\x01lower':'2009-04-01','Payable Voucher\x01To Posting Date\x01upper':'2010-01-11','Payable Voucher\x01Is Opening':'','Payable Voucher\x01Fiscal Year':'','Payable Voucher\x01Company':'','Purchase Receipt\x01From PR Posting Date\x01lower':'2009-04-01','Purchase Receipt\x01To PR Posting Date\x01upper':'2010-01-11'}",
|
||||
'module': 'Buying',
|
||||
'name': '__common__',
|
||||
'page_len': 50,
|
||||
'parent_doc_type': 'Payable Voucher',
|
||||
'sort_by': '`tabPayable Voucher`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
},
|
||||
|
||||
# Search Criteria, purchase_in_transit
|
||||
{
|
||||
'doctype': 'Search Criteria',
|
||||
'name': 'purchase_in_transit'
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user