setting list_views

This commit is contained in:
Rushabh Mehta
2013-01-29 17:53:29 +05:30
parent 6abb2e67e9
commit 08da1a0a3d
105 changed files with 575 additions and 1736 deletions

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-22 15:11:38",
"docstatus": 0,
"modified": "2013-01-23 17:00:25",
"modified": "2013-01-29 17:32:53",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -57,6 +57,7 @@
"fieldname": "item",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Item",
"oldfieldname": "item",
"oldfieldtype": "Link",
@@ -76,6 +77,7 @@
"fieldname": "is_active",
"fieldtype": "Check",
"hidden": 0,
"in_list_view": 1,
"label": "Is Active",
"no_copy": 1,
"oldfieldname": "is_active",
@@ -87,6 +89,7 @@
"doctype": "DocField",
"fieldname": "is_default",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Is Default",
"no_copy": 1,
"oldfieldname": "is_default",
@@ -151,6 +154,7 @@
"doctype": "DocField",
"fieldname": "total_cost",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Total Cost",
"read_only": 1
},
@@ -217,6 +221,7 @@
"doctype": "DocField",
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Item Desription",
"read_only": 1
},

View File

@@ -1,47 +0,0 @@
// render
wn.doclistviews['BOM'] = wn.views.ListView.extend({
init: function(d) {
this._super(d);
this.fields = this.fields.concat([
'`tabBOM`.item',
'`tabBOM`.uom',
'IFNULL(`tabBOM`.quantity, 0) as quantity',
'`tabBOM`.is_active',
'`tabBOM`.costing_date',
'`tabBOM`.total_cost',
'`tabBOM`.description',
]);
this.stats = this.stats.concat(['company']);
},
prepare_data: function(data) {
this._super(data);
data.costing_date = wn.datetime.str_to_user(data.costing_date);
data.description = (data.is_active ? '' : '[Inactive] ') + data.description;
},
columns: [
{width: '3%', content: 'check'},
{width: '3%', content: 'docstatus'},
{width: '15%', content: 'name'},
{width: '15%', content: 'item'},
{width: '23%', content: 'description+tags'},
{
width: '12%',
content: function(parent, data) {
$(parent).html(data.quantity + ' ' + data.uom)
},
css: {'text-align':'right'},
},
{
width: '20%',
content: function(parent, data) {
$(parent).html(format_currency(data.total_cost));
},
css: {'text-align': 'right'},
},
{width: '12%', content:'costing_date', css: {
'text-align': 'right', 'color':'#777'
}},
]
});

View File

@@ -1,210 +1,215 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"creation": "2012-12-20 14:31:18",
"modified": "2013-01-29 17:17:31",
"modified_by": "Administrator",
"modified": "2012-12-24 18:39:00"
"owner": "Administrator"
},
{
"is_submittable": 1,
"in_create": 0,
"autoname": "naming_series:",
"module": "Manufacturing",
"doctype": "DocType",
"in_create": 0,
"is_submittable": 1,
"module": "Manufacturing",
"name": "__common__"
},
{
"name": "__common__",
"parent": "Production Order",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"parent": "Production Order",
"read": 1,
"doctype": "DocPerm",
"cancel": 1,
"name": "__common__",
"amend": 1,
"create": 1,
"submit": 1,
"write": 1,
"parent": "Production Order",
"parentfield": "fields",
"parenttype": "DocType",
"role": "Manufacturing User",
"report": 1,
"permlevel": 0,
"parentfield": "permissions"
"permlevel": 0
},
{
"name": "Production Order",
"doctype": "DocType"
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Production Order",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1,
"role": "Manufacturing User",
"submit": 1,
"write": 1
},
{
"doctype": "DocType",
"name": "Production Order"
},
{
"default": "PRO",
"doctype": "DocField",
"label": "Series",
"fieldname": "naming_series",
"fieldtype": "Select",
"reqd": 1,
"options": "\nPRO"
},
{
"read_only": 1,
"doctype": "DocField",
"no_copy": 1,
"search_index": 1,
"oldfieldtype": "Select",
"label": "Status",
"oldfieldname": "status",
"fieldname": "status",
"fieldtype": "Select",
"depends_on": "eval:!doc.__islocal",
"reqd": 1,
"options": "\nDraft\nSubmitted\nStopped\nIn Process\nCompleted\nCancelled",
"in_filter": 1
},
{
"read_only": 0,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Item To Manufacture",
"oldfieldname": "production_item",
"fieldname": "production_item",
"fieldtype": "Link",
"reqd": 1,
"options": "Item",
"in_filter": 1
},
{
"read_only": 0,
"description": "Bill of Material to be considered for manufacturing",
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "BOM No",
"oldfieldname": "bom_no",
"fieldname": "bom_no",
"fieldtype": "Link",
"depends_on": "production_item",
"reqd": 1,
"options": "BOM"
},
{
"read_only": 0,
"description": "Manufactured quantity will be updated in this warehouse",
"depends_on": "production_item",
"doctype": "DocField",
"label": "For Warehouse",
"fieldname": "fg_warehouse",
"fieldtype": "Link",
"reqd": 1,
"options": "Warehouse"
},
{
"read_only": 0,
"oldfieldtype": "Column Break",
"doctype": "DocField",
"width": "50%",
"fieldname": "column_break1",
"fieldtype": "Column Break"
},
{
"read_only": 0,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Qty To Manufacture",
"oldfieldname": "qty",
"fieldname": "qty",
"fieldtype": "Float",
"depends_on": "production_item",
"label": "Series",
"options": "\nPRO",
"reqd": 1
},
{
"read_only": 1,
"description": "Automatically updated via Stock Entry of type Manufacture/Repack",
"no_copy": 1,
"oldfieldtype": "Currency",
"depends_on": "eval:!doc.__islocal",
"doctype": "DocField",
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
"options": "\nDraft\nSubmitted\nStopped\nIn Process\nCompleted\nCancelled",
"read_only": 1,
"reqd": 1,
"search_index": 1
},
{
"doctype": "DocField",
"fieldname": "production_item",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Item To Manufacture",
"oldfieldname": "production_item",
"oldfieldtype": "Link",
"options": "Item",
"read_only": 0,
"reqd": 1
},
{
"depends_on": "production_item",
"description": "Bill of Material to be considered for manufacturing",
"doctype": "DocField",
"fieldname": "bom_no",
"fieldtype": "Link",
"in_list_view": 1,
"label": "BOM No",
"oldfieldname": "bom_no",
"oldfieldtype": "Link",
"options": "BOM",
"read_only": 0,
"reqd": 1
},
{
"depends_on": "production_item",
"description": "Manufactured quantity will be updated in this warehouse",
"doctype": "DocField",
"fieldname": "fg_warehouse",
"fieldtype": "Link",
"in_list_view": 1,
"label": "For Warehouse",
"options": "Warehouse",
"read_only": 0,
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"read_only": 0,
"width": "50%"
},
{
"depends_on": "production_item",
"doctype": "DocField",
"fieldname": "qty",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Qty To Manufacture",
"oldfieldname": "qty",
"oldfieldtype": "Currency",
"read_only": 0,
"reqd": 1
},
{
"depends_on": "eval:doc.docstatus==1",
"description": "Automatically updated via Stock Entry of type Manufacture/Repack",
"doctype": "DocField",
"label": "Manufactured Qty",
"oldfieldname": "produced_qty",
"fieldname": "produced_qty",
"fieldtype": "Float",
"depends_on": "eval:doc.docstatus==1"
"label": "Manufactured Qty",
"no_copy": 1,
"oldfieldname": "produced_qty",
"oldfieldtype": "Currency",
"read_only": 1
},
{
"read_only": 1,
"oldfieldtype": "Data",
"depends_on": "production_item",
"doctype": "DocField",
"label": "Stock UOM",
"oldfieldname": "stock_uom",
"fieldname": "stock_uom",
"fieldtype": "Data",
"depends_on": "production_item"
"label": "Stock UOM",
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
"read_only": 1
},
{
"description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.",
"default": "1",
"description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.",
"doctype": "DocField",
"label": "Use Multi-Level BOM",
"fieldname": "use_multi_level_bom",
"fieldtype": "Check"
"fieldtype": "Check",
"label": "Use Multi-Level BOM"
},
{
"read_only": 0,
"doctype": "DocField",
"label": "More Info",
"fieldname": "more_info",
"fieldtype": "Section Break"
"fieldtype": "Section Break",
"label": "More Info",
"read_only": 0
},
{
"read_only": 0,
"description": "Manufacture against Sales Order",
"doctype": "DocField",
"label": "Sales Order",
"fieldname": "sales_order",
"fieldtype": "Link",
"options": "Sales Order"
"label": "Sales Order",
"options": "Sales Order",
"read_only": 0
},
{
"read_only": 0,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Project Name",
"oldfieldname": "project_name",
"fieldname": "project_name",
"fieldtype": "Link",
"options": "Project",
"in_filter": 1
},
{
"read_only": 0,
"doctype": "DocField",
"width": "50%",
"fieldname": "column_break2",
"fieldtype": "Column Break"
},
{
"read_only": 0,
"in_filter": 1,
"label": "Project Name",
"oldfieldname": "project_name",
"oldfieldtype": "Link",
"options": "Project",
"read_only": 0
},
{
"doctype": "DocField",
"fieldname": "column_break2",
"fieldtype": "Column Break",
"read_only": 0,
"width": "50%"
},
{
"doctype": "DocField",
"label": "Company",
"oldfieldname": "company",
"fieldname": "company",
"fieldtype": "Link",
"reqd": 1,
"options": "Company"
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"read_only": 0,
"reqd": 1
},
{
"read_only": 1,
"no_copy": 1,
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Amended From",
"oldfieldname": "amended_from",
"fieldname": "amended_from",
"fieldtype": "Data"
"fieldtype": "Data",
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
"read_only": 1
},
{
"doctype": "DocPerm"

View File

@@ -1,40 +0,0 @@
// render
wn.doclistviews['Production Order'] = wn.views.ListView.extend({
init: function(d) {
this._super(d);
this.fields = this.fields.concat([
'`tabProduction Order`.production_item',
'`tabProduction Order`.fg_warehouse',
'`tabProduction Order`.stock_uom',
'IFNULL(`tabProduction Order`.qty, 0) as qty',
'`tabProduction Order`.creation',
'`tabProduction Order`.status',
]);
this.stats = this.stats.concat(['company']);
},
prepare_data: function(data) {
this._super(data);
data.creation = wn.datetime.str_to_user(data.creation);
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar'},
{width: '3%', content: 'docstatus'},
{width: '17%', content: 'name'},
{width: '16%', content: 'production_item'},
{width: '20%', content: 'fg_warehouse'},
{width: '12%', content: 'status+tags'},
{
width: '12%',
content: function(parent, data) {
$(parent).html(data.qty + ' ' + data.stock_uom)
},
css: {'text-align':'right'}
},
{width: '12%', content:'creation', css: {
'text-align': 'right', 'color':'#777'
}},
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-23 17:11:21",
"modified": "2013-01-29 16:27:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -72,7 +72,7 @@
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1,
"width": "120px"
},