Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta
2012-12-20 17:12:59 +05:30
542 changed files with 27572 additions and 39784 deletions

View File

@@ -1,93 +1,72 @@
# DocType Mapper, Delivery Note-Packing Slip
[
# These values are common in all dictionaries
{
'creation': '2012-02-22 15:45:56',
'docstatus': 0,
'modified': '2012-02-22 15:45:56',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'name': '__common__',
'parent': u'Delivery Note-Packing Slip',
'parentfield': u'table_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'name': '__common__',
'parent': u'Delivery Note-Packing Slip',
'parentfield': u'field_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all DocType Mapper
{
'doctype': u'DocType Mapper',
'from_doctype': u'Delivery Note',
'module': u'Stock',
'name': '__common__',
'ref_doc_submitted': 0,
'to_doctype': u'Packing Slip'
},
# DocType Mapper, Delivery Note-Packing Slip
{
'doctype': u'DocType Mapper',
'name': u'Delivery Note-Packing Slip'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'name',
'map': u'Yes',
'match_id': 0,
'to_field': u'delivery_note'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'qty',
'map': u'No',
'match_id': 1,
'to_field': u'qty'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'naming_series',
'map': u'No',
'match_id': 0,
'to_field': u'naming_series'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_table': u'Delivery Note',
'match_id': 0,
'to_table': u'Packing Slip',
'validation_logic': u'docstatus=0'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'delivery_note_details',
'from_table': u'Delivery Note Item',
'match_id': 1,
'to_field': u'item_details',
'to_table': u'Packing Slip Item',
'validation_logic': u'IFNULL(packed_qty, 0) < IFNULL(qty, 0)'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-02-22 15:45:56",
"modified_by": "Administrator",
"modified": "2012-02-22 15:45:56"
},
{
"name": "__common__",
"parent": "Delivery Note-Packing Slip",
"doctype": "Table Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "table_mapper_details"
},
{
"name": "__common__",
"parent": "Delivery Note-Packing Slip",
"doctype": "Field Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "field_mapper_details"
},
{
"name": "__common__",
"to_doctype": "Packing Slip",
"module": "Stock",
"doctype": "DocType Mapper",
"ref_doc_submitted": 0,
"from_doctype": "Delivery Note"
},
{
"name": "Delivery Note-Packing Slip",
"doctype": "DocType Mapper"
},
{
"map": "Yes",
"match_id": 0,
"to_field": "delivery_note",
"doctype": "Field Mapper Detail",
"from_field": "name"
},
{
"map": "No",
"match_id": 1,
"to_field": "qty",
"doctype": "Field Mapper Detail",
"from_field": "qty"
},
{
"map": "No",
"match_id": 0,
"to_field": "naming_series",
"doctype": "Field Mapper Detail",
"from_field": "naming_series"
},
{
"match_id": 0,
"doctype": "Table Mapper Detail",
"from_table": "Delivery Note",
"to_table": "Packing Slip",
"validation_logic": "docstatus=0"
},
{
"match_id": 1,
"to_field": "item_details",
"doctype": "Table Mapper Detail",
"from_field": "delivery_note_details",
"from_table": "Delivery Note Item",
"to_table": "Packing Slip Item",
"validation_logic": "IFNULL(packed_qty, 0) < IFNULL(qty, 0)"
}
]

View File

@@ -1,64 +1,49 @@
# DocType Mapper, Project-Delivery Note
[
# These values are common in all dictionaries
{
'creation': '2010-09-01 15:47:59',
'docstatus': 0,
'modified': '2011-09-15 15:04:43',
'modified_by': 'Administrator',
'owner': 'harshada@webnotestech.com'
},
# These values are common for all Table Mapper Detail
{
'doctype': 'Table Mapper Detail',
'from_table': 'Project',
'match_id': 0,
'name': '__common__',
'parent': 'Project-Delivery Note',
'parentfield': 'table_mapper_details',
'parenttype': 'DocType Mapper',
'to_table': 'Delivery Note',
'validation_logic': 'name is not null'
},
# These values are common for all Field Mapper Detail
{
'checking_operator': '=',
'doctype': 'Field Mapper Detail',
'from_field': 'customer',
'map': 'Yes',
'match_id': 0,
'name': '__common__',
'parent': 'Project-Delivery Note',
'parentfield': 'field_mapper_details',
'parenttype': 'DocType Mapper',
'to_field': 'customer'
},
# These values are common for all DocType Mapper
{
'doctype': 'DocType Mapper',
'from_doctype': 'Project',
'module': 'Stock',
'name': '__common__',
'to_doctype': 'Delivery Note'
},
# DocType Mapper, Project-Delivery Note
{
'doctype': 'DocType Mapper',
'name': 'Project-Delivery Note'
},
# Field Mapper Detail
{
'doctype': 'Field Mapper Detail'
},
# Table Mapper Detail
{
'doctype': 'Table Mapper Detail'
}
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2010-09-01 15:47:59",
"modified_by": "Administrator",
"modified": "2011-09-15 15:04:43"
},
{
"match_id": 0,
"parent": "Project-Delivery Note",
"name": "__common__",
"doctype": "Table Mapper Detail",
"parenttype": "DocType Mapper",
"from_table": "Project",
"to_table": "Delivery Note",
"validation_logic": "name is not null",
"parentfield": "table_mapper_details"
},
{
"map": "Yes",
"match_id": 0,
"parent": "Project-Delivery Note",
"name": "__common__",
"to_field": "customer",
"doctype": "Field Mapper Detail",
"parenttype": "DocType Mapper",
"checking_operator": "=",
"from_field": "customer",
"parentfield": "field_mapper_details"
},
{
"name": "__common__",
"to_doctype": "Delivery Note",
"module": "Stock",
"doctype": "DocType Mapper",
"from_doctype": "Project"
},
{
"name": "Project-Delivery Note",
"doctype": "DocType Mapper"
},
{
"doctype": "Field Mapper Detail"
},
{
"doctype": "Table Mapper Detail"
}
]

View File

@@ -1,245 +1,190 @@
# DocType Mapper, Purchase Order-Purchase Receipt
[
# These values are common in all dictionaries
{
'creation': '2010-08-08 17:09:35',
'docstatus': 0,
'modified': '2012-04-02 14:03:39',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'name': '__common__',
'parent': u'Purchase Order-Purchase Receipt',
'parentfield': u'table_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'map': u'Yes',
'name': '__common__',
'parent': u'Purchase Order-Purchase Receipt',
'parentfield': u'field_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all DocType Mapper
{
'doctype': u'DocType Mapper',
'from_doctype': u'Purchase Order',
'module': u'Stock',
'name': '__common__',
'ref_doc_submitted': 1,
'to_doctype': u'Purchase Receipt'
},
# DocType Mapper, Purchase Order-Purchase Receipt
{
'doctype': u'DocType Mapper',
'name': u'Purchase Order-Purchase Receipt'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'supplier',
'match_id': 0,
'to_field': u'supplier'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'company',
'match_id': 0,
'to_field': u'company'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'currency',
'match_id': 0,
'to_field': u'currency'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'name',
'match_id': 1,
'to_field': u'prevdoc_detail_docname'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parent',
'match_id': 1,
'to_field': u'prevdoc_docname'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parenttype',
'match_id': 1,
'to_field': u'prevdoc_doctype'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'item_code',
'match_id': 1,
'to_field': u'item_code'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ',
'match_id': 1,
'to_field': u'received_qty'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ',
'match_id': 1,
'to_field': u'qty'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.conversion_factor)',
'match_id': 1,
'to_field': u'stock_qty'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.import_rate)',
'match_id': 1,
'to_field': u'import_amount'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.purchase_rate)',
'match_id': 1,
'to_field': u'amount'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'schedule_date',
'match_id': 1,
'to_field': u'schedule_date'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'net_total',
'match_id': 0,
'to_field': u'net_total'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'grand_total',
'match_id': 0,
'to_field': u'grand_total'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'total_tax',
'match_id': 0,
'to_field': u'total_tax'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'conversion_rate',
'match_id': 0,
'to_field': u'conversion_rate'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'po_details',
'from_table': u'Purchase Order Item',
'match_id': 1,
'reference_doctype_key': u'prevdoc_doctype',
'reference_key': u'prevdoc_detail_docname',
'to_field': u'purchase_receipt_details',
'to_table': u'Purchase Receipt Item',
'validation_logic': u'docstatus=1 and qty > ifnull(received_qty,0)'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'po_details',
'from_table': u'Purchase Order Item',
'match_id': 1,
'reference_doctype_key': u'prevdoc_doctype',
'reference_key': u'prevdoc_detail_docname',
'to_field': u'purchase_receipt_details',
'to_table': u'Purchase Receipt Item',
'validation_logic': u'docstatus=1 and qty > ifnull(received_qty,0)'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_table': u'Purchase Order',
'match_id': 0,
'reference_key': u'prevdoc_docname',
'to_table': u'Purchase Receipt',
'validation_logic': u'docstatus = 1'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'purchase_tax_details',
'from_table': u'Purchase Taxes and Charges',
'match_id': 2,
'to_field': u'purchase_tax_details',
'to_table': u'Purchase Taxes and Charges',
'validation_logic': u'docstatus = 1'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'purchase_tax_details',
'from_table': u'Purchase Taxes and Charges',
'match_id': 2,
'to_field': u'purchase_tax_details',
'to_table': u'Purchase Taxes and Charges',
'validation_logic': u'docstatus = 1'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2010-08-08 17:09:35",
"modified_by": "Administrator",
"modified": "2012-04-02 14:03:39"
},
{
"name": "__common__",
"parent": "Purchase Order-Purchase Receipt",
"doctype": "Table Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "table_mapper_details"
},
{
"map": "Yes",
"name": "__common__",
"parent": "Purchase Order-Purchase Receipt",
"doctype": "Field Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "field_mapper_details"
},
{
"name": "__common__",
"to_doctype": "Purchase Receipt",
"module": "Stock",
"doctype": "DocType Mapper",
"ref_doc_submitted": 1,
"from_doctype": "Purchase Order"
},
{
"name": "Purchase Order-Purchase Receipt",
"doctype": "DocType Mapper"
},
{
"match_id": 0,
"to_field": "supplier",
"doctype": "Field Mapper Detail",
"from_field": "supplier",
"checking_operator": "="
},
{
"match_id": 0,
"to_field": "company",
"doctype": "Field Mapper Detail",
"from_field": "company",
"checking_operator": "="
},
{
"match_id": 0,
"to_field": "currency",
"doctype": "Field Mapper Detail",
"from_field": "currency",
"checking_operator": "="
},
{
"to_field": "prevdoc_detail_docname",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "name"
},
{
"to_field": "prevdoc_docname",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "parent"
},
{
"to_field": "prevdoc_doctype",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "parenttype"
},
{
"match_id": 1,
"to_field": "item_code",
"doctype": "Field Mapper Detail",
"from_field": "item_code",
"checking_operator": "="
},
{
"to_field": "received_qty",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "eval:(flt(obj.qty) - flt(obj.received_qty)) "
},
{
"to_field": "qty",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "eval:(flt(obj.qty) - flt(obj.received_qty)) "
},
{
"to_field": "stock_qty",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.conversion_factor)"
},
{
"to_field": "import_amount",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.import_rate)"
},
{
"to_field": "amount",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.purchase_rate)"
},
{
"to_field": "schedule_date",
"doctype": "Field Mapper Detail",
"match_id": 1,
"from_field": "schedule_date"
},
{
"to_field": "net_total",
"doctype": "Field Mapper Detail",
"match_id": 0,
"from_field": "net_total"
},
{
"to_field": "grand_total",
"doctype": "Field Mapper Detail",
"match_id": 0,
"from_field": "grand_total"
},
{
"to_field": "total_tax",
"doctype": "Field Mapper Detail",
"match_id": 0,
"from_field": "total_tax"
},
{
"to_field": "conversion_rate",
"doctype": "Field Mapper Detail",
"match_id": 0,
"from_field": "conversion_rate"
},
{
"reference_key": "prevdoc_detail_docname",
"match_id": 1,
"reference_doctype_key": "prevdoc_doctype",
"to_field": "purchase_receipt_details",
"doctype": "Table Mapper Detail",
"from_field": "po_details",
"from_table": "Purchase Order Item",
"to_table": "Purchase Receipt Item",
"validation_logic": "docstatus=1 and qty > ifnull(received_qty,0)"
},
{
"reference_key": "prevdoc_detail_docname",
"match_id": 1,
"reference_doctype_key": "prevdoc_doctype",
"to_field": "purchase_receipt_details",
"doctype": "Table Mapper Detail",
"from_field": "po_details",
"from_table": "Purchase Order Item",
"to_table": "Purchase Receipt Item",
"validation_logic": "docstatus=1 and qty > ifnull(received_qty,0)"
},
{
"reference_key": "prevdoc_docname",
"match_id": 0,
"doctype": "Table Mapper Detail",
"from_table": "Purchase Order",
"to_table": "Purchase Receipt",
"validation_logic": "docstatus = 1"
},
{
"match_id": 2,
"to_field": "purchase_tax_details",
"doctype": "Table Mapper Detail",
"from_field": "purchase_tax_details",
"from_table": "Purchase Taxes and Charges",
"to_table": "Purchase Taxes and Charges",
"validation_logic": "docstatus = 1"
},
{
"match_id": 2,
"to_field": "purchase_tax_details",
"doctype": "Table Mapper Detail",
"from_field": "purchase_tax_details",
"from_table": "Purchase Taxes and Charges",
"to_table": "Purchase Taxes and Charges",
"validation_logic": "docstatus = 1"
}
]

View File

@@ -1,169 +1,132 @@
# DocType Mapper, Sales Invoice-Delivery Note
[
# These values are common in all dictionaries
{
'creation': '2010-12-14 17:56:41',
'docstatus': 0,
'modified': '2012-04-03 12:49:50',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'name': '__common__',
'parent': u'Sales Invoice-Delivery Note',
'parentfield': u'table_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'name': '__common__',
'parent': u'Sales Invoice-Delivery Note',
'parentfield': u'field_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all DocType Mapper
{
'doctype': u'DocType Mapper',
'from_doctype': u'Sales Invoice',
'module': u'Stock',
'name': '__common__',
'ref_doc_submitted': 1,
'to_doctype': u'Delivery Note'
},
# DocType Mapper, Sales Invoice-Delivery Note
{
'doctype': u'DocType Mapper',
'name': u'Sales Invoice-Delivery Note'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval: flt(obj.qty) - flt(obj.delivered_qty)',
'map': u'Yes',
'match_id': 1,
'to_field': u'qty'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parent',
'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_docname'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parenttype',
'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_doctype'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'name',
'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_detail_docname'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.basic_rate)',
'map': u'Yes',
'match_id': 1,
'to_field': u'amount'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.export_rate)',
'map': u'Yes',
'match_id': 1,
'to_field': u'export_amount'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'naming_series',
'map': u'No',
'match_id': 0,
'to_field': u'naming_series'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'customer_address',
'map': u'Yes',
'match_id': 0,
'to_field': u'delivery_address'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'serial_no',
'map': u'Yes',
'match_id': 1,
'to_field': u'serial_no'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_table': u'Sales Invoice',
'match_id': 0,
'to_table': u'Delivery Note',
'validation_logic': u'docstatus=1'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'entries',
'from_table': u'Sales Invoice Item',
'match_id': 1,
'to_field': u'delivery_note_details',
'to_table': u'Delivery Note Item',
'validation_logic': u'docstatus = 1'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'other_charges',
'from_table': u'Sales Taxes and Charges',
'match_id': 2,
'to_field': u'other_charges',
'to_table': u'Sales Taxes and Charges',
'validation_logic': u'name is not null'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'sales_team',
'from_table': u'Sales Team',
'match_id': 3,
'to_field': u'sales_team',
'to_table': u'Sales Team',
'validation_logic': u'name is not null'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2010-12-14 17:56:41",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:50"
},
{
"name": "__common__",
"parent": "Sales Invoice-Delivery Note",
"doctype": "Table Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "table_mapper_details"
},
{
"name": "__common__",
"parent": "Sales Invoice-Delivery Note",
"doctype": "Field Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "field_mapper_details"
},
{
"name": "__common__",
"to_doctype": "Delivery Note",
"module": "Stock",
"doctype": "DocType Mapper",
"ref_doc_submitted": 1,
"from_doctype": "Sales Invoice"
},
{
"name": "Sales Invoice-Delivery Note",
"doctype": "DocType Mapper"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "qty",
"doctype": "Field Mapper Detail",
"from_field": "eval: flt(obj.qty) - flt(obj.delivered_qty)"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "prevdoc_docname",
"doctype": "Field Mapper Detail",
"from_field": "parent"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "prevdoc_doctype",
"doctype": "Field Mapper Detail",
"from_field": "parenttype"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "prevdoc_detail_docname",
"doctype": "Field Mapper Detail",
"from_field": "name"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "amount",
"doctype": "Field Mapper Detail",
"from_field": "eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.basic_rate)"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "export_amount",
"doctype": "Field Mapper Detail",
"from_field": "eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.export_rate)"
},
{
"map": "No",
"match_id": 0,
"to_field": "naming_series",
"doctype": "Field Mapper Detail",
"from_field": "naming_series"
},
{
"map": "Yes",
"match_id": 0,
"to_field": "delivery_address",
"doctype": "Field Mapper Detail",
"from_field": "customer_address"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "serial_no",
"doctype": "Field Mapper Detail",
"from_field": "serial_no"
},
{
"match_id": 0,
"doctype": "Table Mapper Detail",
"from_table": "Sales Invoice",
"to_table": "Delivery Note",
"validation_logic": "docstatus=1"
},
{
"match_id": 1,
"to_field": "delivery_note_details",
"doctype": "Table Mapper Detail",
"from_field": "entries",
"from_table": "Sales Invoice Item",
"to_table": "Delivery Note Item",
"validation_logic": "docstatus = 1"
},
{
"match_id": 2,
"to_field": "other_charges",
"doctype": "Table Mapper Detail",
"from_field": "other_charges",
"from_table": "Sales Taxes and Charges",
"to_table": "Sales Taxes and Charges",
"validation_logic": "name is not null"
},
{
"match_id": 3,
"to_field": "sales_team",
"doctype": "Table Mapper Detail",
"from_field": "sales_team",
"from_table": "Sales Team",
"to_table": "Sales Team",
"validation_logic": "name is not null"
}
]

View File

@@ -1,258 +1,203 @@
# DocType Mapper, Sales Order-Delivery Note
[
# These values are common in all dictionaries
{
'creation': '2010-08-08 17:09:35',
'docstatus': 0,
'modified': '2012-05-08 11:50:18',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'name': '__common__',
'parent': u'Sales Order-Delivery Note',
'parentfield': u'table_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'name': '__common__',
'parent': u'Sales Order-Delivery Note',
'parentfield': u'field_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all DocType Mapper
{
'doctype': u'DocType Mapper',
'from_doctype': u'Sales Order',
'module': u'Stock',
'name': '__common__',
'ref_doc_submitted': 1,
'to_doctype': u'Delivery Note'
},
# DocType Mapper, Sales Order-Delivery Note
{
'doctype': u'DocType Mapper',
'name': u'Sales Order-Delivery Note'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'name',
'map': u'Yes',
'match_id': 0,
'to_field': u'sales_order_no'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'company',
'map': u'Yes',
'match_id': 0,
'to_field': u'company'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'currency',
'map': u'Yes',
'match_id': 0,
'to_field': u'currency'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'shipping_address_name',
'map': u'Yes',
'match_id': 0,
'to_field': u'customer_address'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'shipping_address',
'map': u'Yes',
'match_id': 0,
'to_field': u'address_display'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parent',
'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_docname'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parenttype',
'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_doctype'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'name',
'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_detail_docname'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.export_rate)',
'map': u'Yes',
'match_id': 1,
'to_field': u'export_amount'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'export_rate',
'map': u'Yes',
'match_id': 1,
'to_field': u'export_rate'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval: flt(obj.qty) - flt(obj.delivered_qty)',
'map': u'Yes',
'match_id': 1,
'to_field': u'qty'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.basic_rate)',
'map': u'Yes',
'match_id': 1,
'to_field': u'amount'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'reserved_warehouse',
'map': u'Yes',
'match_id': 1,
'to_field': u'warehouse'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'project_name',
'map': u'Yes',
'match_id': 0,
'to_field': u'project_name'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'customer',
'map': u'Yes',
'match_id': 0,
'to_field': u'customer'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'naming_series',
'map': u'No',
'match_id': 0,
'to_field': u'naming_series'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'status',
'map': u'No',
'match_id': 0,
'to_field': u'status'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'incentives',
'map': u'No',
'match_id': 3,
'to_field': u'incentives'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'sales_team',
'from_table': u'Sales Team',
'match_id': 3,
'to_field': u'sales_team',
'to_table': u'Sales Team',
'validation_logic': u'name is not null'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'other_charges',
'from_table': u'Sales Taxes and Charges',
'match_id': 2,
'to_field': u'other_charges',
'to_table': u'Sales Taxes and Charges',
'validation_logic': u'name is not null'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'sales_order_details',
'from_table': u'Sales Order Item',
'match_id': 1,
'reference_doctype_key': u'prevdoc_doctype',
'reference_key': u'prevdoc_detail_docname',
'to_field': u'delivery_note_details',
'to_table': u'Delivery Note Item',
'validation_logic': u'qty > ifnull(delivered_qty,0) and docstatus = 1'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_table': u'Sales Order',
'match_id': 0,
'reference_key': u'prevdoc_docname',
'to_table': u'Delivery Note',
'validation_logic': u'docstatus = 1'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2010-08-08 17:09:35",
"modified_by": "Administrator",
"modified": "2012-05-08 11:50:18"
},
{
"name": "__common__",
"parent": "Sales Order-Delivery Note",
"doctype": "Table Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "table_mapper_details"
},
{
"name": "__common__",
"parent": "Sales Order-Delivery Note",
"doctype": "Field Mapper Detail",
"parenttype": "DocType Mapper",
"parentfield": "field_mapper_details"
},
{
"name": "__common__",
"to_doctype": "Delivery Note",
"module": "Stock",
"doctype": "DocType Mapper",
"ref_doc_submitted": 1,
"from_doctype": "Sales Order"
},
{
"name": "Sales Order-Delivery Note",
"doctype": "DocType Mapper"
},
{
"map": "Yes",
"match_id": 0,
"to_field": "sales_order_no",
"doctype": "Field Mapper Detail",
"from_field": "name"
},
{
"map": "Yes",
"match_id": 0,
"to_field": "company",
"doctype": "Field Mapper Detail",
"from_field": "company",
"checking_operator": "="
},
{
"map": "Yes",
"match_id": 0,
"to_field": "currency",
"doctype": "Field Mapper Detail",
"from_field": "currency",
"checking_operator": "="
},
{
"map": "Yes",
"match_id": 0,
"to_field": "customer_address",
"doctype": "Field Mapper Detail",
"from_field": "shipping_address_name"
},
{
"map": "Yes",
"match_id": 0,
"to_field": "address_display",
"doctype": "Field Mapper Detail",
"from_field": "shipping_address"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "prevdoc_docname",
"doctype": "Field Mapper Detail",
"from_field": "parent"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "prevdoc_doctype",
"doctype": "Field Mapper Detail",
"from_field": "parenttype"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "prevdoc_detail_docname",
"doctype": "Field Mapper Detail",
"from_field": "name"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "export_amount",
"doctype": "Field Mapper Detail",
"from_field": "eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.export_rate)"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "export_rate",
"doctype": "Field Mapper Detail",
"from_field": "export_rate",
"checking_operator": "="
},
{
"map": "Yes",
"match_id": 1,
"to_field": "qty",
"doctype": "Field Mapper Detail",
"from_field": "eval: flt(obj.qty) - flt(obj.delivered_qty)"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "amount",
"doctype": "Field Mapper Detail",
"from_field": "eval: (flt(obj.qty) - flt(obj.delivered_qty)) * flt(obj.basic_rate)"
},
{
"map": "Yes",
"match_id": 1,
"to_field": "warehouse",
"doctype": "Field Mapper Detail",
"from_field": "reserved_warehouse"
},
{
"map": "Yes",
"match_id": 0,
"to_field": "project_name",
"doctype": "Field Mapper Detail",
"from_field": "project_name",
"checking_operator": "="
},
{
"map": "Yes",
"match_id": 0,
"to_field": "customer",
"doctype": "Field Mapper Detail",
"from_field": "customer",
"checking_operator": "="
},
{
"map": "No",
"match_id": 0,
"to_field": "naming_series",
"doctype": "Field Mapper Detail",
"from_field": "naming_series"
},
{
"map": "No",
"match_id": 0,
"to_field": "status",
"doctype": "Field Mapper Detail",
"from_field": "status"
},
{
"map": "No",
"match_id": 3,
"to_field": "incentives",
"doctype": "Field Mapper Detail",
"from_field": "incentives"
},
{
"match_id": 3,
"to_field": "sales_team",
"doctype": "Table Mapper Detail",
"from_field": "sales_team",
"from_table": "Sales Team",
"to_table": "Sales Team",
"validation_logic": "name is not null"
},
{
"match_id": 2,
"to_field": "other_charges",
"doctype": "Table Mapper Detail",
"from_field": "other_charges",
"from_table": "Sales Taxes and Charges",
"to_table": "Sales Taxes and Charges",
"validation_logic": "name is not null"
},
{
"reference_key": "prevdoc_detail_docname",
"match_id": 1,
"reference_doctype_key": "prevdoc_doctype",
"to_field": "delivery_note_details",
"doctype": "Table Mapper Detail",
"from_field": "sales_order_details",
"from_table": "Sales Order Item",
"to_table": "Delivery Note Item",
"validation_logic": "qty > ifnull(delivered_qty,0) and docstatus = 1"
},
{
"reference_key": "prevdoc_docname",
"match_id": 0,
"doctype": "Table Mapper Detail",
"from_table": "Sales Order",
"to_table": "Delivery Note",
"validation_logic": "docstatus = 1"
}
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,27 +1,20 @@
# Print Format, Delivery Note Packing List Wise
[
# These values are common in all dictionaries
{
'creation': '2011-08-23 16:49:40',
'docstatus': 0,
'modified': '2011-10-19 14:12:11',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Print Format
{
'doctype': 'Print Format',
'html': "<html>\n<head>\n\n<script>\nfunction replaceAll(s,s1,s2){ return s.split(s1).join(s2);}\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals['Control Panel']['Control Panel'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= '';\n\t\t\n\treturn lh;\n}\n\n</script>\n<style>\n.cust_tbl { border-collapse:collapse; }\n.cust_tbl td { border:1px solid #848484; font-size: 13px}\n.large_font td {font-size: 13px}\n</style>\n</head>\n\n<body>\n<script>\nreplaceAll(doc.print_packing_slip,'[HEADER GOES HERE]',get_letter_head());\n</script>\n</body>\n</html>",
'module': 'Stock',
'name': '__common__',
'standard': 'Yes'
},
# Print Format, Delivery Note Packing List Wise
{
'doctype': 'Print Format',
'name': 'Delivery Note Packing List Wise'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2011-08-23 16:49:40",
"modified_by": "Administrator",
"modified": "2011-10-19 14:12:11"
},
{
"name": "__common__",
"module": "Stock",
"standard": "Yes",
"html": "<html>\n<head>\n\n<script>\nfunction replaceAll(s,s1,s2){ return s.split(s1).join(s2);}\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals['Control Panel']['Control Panel'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= '';\n\t\t\n\treturn lh;\n}\n\n</script>\n<style>\n.cust_tbl { border-collapse:collapse; }\n.cust_tbl td { border:1px solid #848484; font-size: 13px}\n.large_font td {font-size: 13px}\n</style>\n</head>\n\n<body>\n<script>\nreplaceAll(doc.print_packing_slip,'[HEADER GOES HERE]',get_letter_head());\n</script>\n</body>\n</html>",
"doctype": "Print Format"
},
{
"name": "Delivery Note Packing List Wise",
"doctype": "Print Format"
}
]

File diff suppressed because one or more lines are too long

View File

@@ -1,27 +1,20 @@
# Print Format, Purchase Receipt Format
[
# These values are common in all dictionaries
{
'creation': '2010-08-08 17:09:34',
'docstatus': 0,
'modified': '2011-10-19 14:18:26',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Print Format
{
'doctype': 'Print Format',
'html': '<html>\n<head>\n<!--Other charges function-->\n<script>\n var make_row = function(title,val,bold){\n var bstart = \'<b>\'; var bend = \'</b>\';\n return \'<tr><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:20%;text-align:right">\'+doc.currency+\'</td>\'\n +\'<td style="width:30%;text-align:right">\'+(val?val:\'0.00\')+\'</td>\'\n +\'</tr>\'\n }\n\n function get_other_charges(){\n var out =\'\';\n out += \'<div><table class="noborder" style="width:100%">\';\n out += make_row(\'Total Amount\',fmt_money(convert_rate(doc.total_amount)),1)\n +make_row(\'Grand Total\',fmt_money(convert_rate(doc.grand_total)),1);\n out += \'</table></div>\';\n return out;\n }\n\n function get_buying_costs(){\n var out =\'\';\n if(doc.buying_cost_transport || doc.buying_cost_taxes || doc.buying_cost_other){\n out += \'<div><table class="noborder" style="width:100%">\'\n + \'<tr><td style="width:100%"><b>\'+\'Buying Cost Details\'+\'</b></td></tr>\';\n if(doc.buying_cost_transport){ out += make_row(\'Transport Cost\',fmt_money(convert_rate(doc.buying_cost_transport)),0)}\n if(doc.buying_cost_taxes){ out += make_row(\'Taxes\',fmt_money(convert_rate(doc.buying_cost_taxes)),0)}\n if(doc.buying_cost_other){ out += make_row(\'Other Cost\',fmt_money(convert_rate(doc.buying_cost_other)),0)}\n out += \'</table></div>\';\n }\n return out;\n }\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals[\'Control Panel\'][\'Control Panel\'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= \'\';\n\t\t\n\treturn lh;\n}\n\n \n function convert_rate(val){\n var new_val = flt(val)/flt(doc.conversion_rate);\n return new_val;\n }\n \n function get_transport_details(){\n var out = \'\';\n if(doc.transporter_name || doc.lr_no || doc.lr_date){\n out += \'<div><table class="noborder" style="width:40%">\'\n +\'<tr><td style="width:80%"><b>\' + \'Transporter Details\'+\'</b></td><td style="width:20%"></td></tr>\'\n\n if(doc.transporter_name){ out += \'<tr><td style="width:40%">\' + \'Transporter Name\'+\'</td><td style="width:60%">\'+doc.transporter_name+\'</td></tr>\'}\n if(doc.lr_no){ out += \'<tr><td style="width:40%">\' + \'LR No\'+\'</td><td style="width:60%">\'+doc.lr_no+\'</td></tr>\'}\n if(doc.lr_date){ out += \'<tr><td style="width:40%">\' + \'LR Date\'+\'</td><td style="width:60%">\'+doc.lr_date+\'</td></tr>\'}\n out += \'</table></div>\'\n }\n return out;\n }\n\n</script>\n</head>\n<body>\n<div style="border:1px solid black;padding:15px">\n<!--header-->\n<div><script>get_letter_head()</script></div>\n<div style="border-bottom: 1px solid; padding-bottom: 5px;">\n <div><br><b>Purchase Receipt: <script>doc.name</script></b></div>\n <div>Date: <script>date.str_to_user(doc.transaction_date)</script></div>\n</div>\n\n<div style="padding-top:15px">\n<div><script>doc.supplier</script></div>\n<div><br><script>replace_newlines(doc.address_display)</script></div>\n</div>\n\n<div>\n<br>\n <script>\n var t = print_table(\'Purchase Receipt\', doc.name, \'purchase_receipt_details\', \'Purchase Receipt Item\', [\'SR\', \'item_code\',\'description\',\'received_qty\',\'qty\',\'rejected_qty\',\'po_rate\',\'amount\',\'billed_qty\'], [\'Sr\', \'Item Code\', \'Description\',\'Received Quantity\',\'Accepted Qty\',\'Rejected Qty\',\'Rate\',\'Amount\',\'Billed Qty\'], [\'4%\',\'12%\', \'24%\', \'10%\',\'10%\',\'10%\',\'10%\',\'10%\',\'10%\'])\n if(t.appendChild) {\n // single\n out = t.innerHTML;\n } \n else {//multiple\n out = \'\'\n for(var i=0;i<t.length;i++) {\n if(i!=t.length-1){\n out += \'<div style:"padding-top:5px;"></div>\' + t[i].innerHTML +\'<div style="page-break-after:always"></div>\';\n }\n else out += \'<div style:"padding-top:5px;"></div>\' + t[i].innerHTML;\n }\n }\n out;\n </script>\n\n</div>\n\n<!--Other charges table-->\n<div>\n<table style="width:100%">\n <tr><td style="width:40%"><script>get_buying_costs()</script></td>\n <td style="width:20%"></td><td style="width:40%"><script>get_other_charges()</script></td></tr>\n</table>\n</div>\n<div><script>get_transport_details()</script></div>\n<div><br>Payment Terms</div>\n<div><br><script>replace_newlines(doc.payment_terms)</script></div>\n<div><br>For NCSCI</div>\n<div><br><br>(Authorised Signatory)</div>\n</div></body>\n</html>',
'module': 'Stock',
'name': '__common__',
'standard': 'Yes'
},
# Print Format, Purchase Receipt Format
{
'doctype': 'Print Format',
'name': 'Purchase Receipt Format'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2010-08-08 17:09:34",
"modified_by": "Administrator",
"modified": "2011-10-19 14:18:26"
},
{
"name": "__common__",
"module": "Stock",
"standard": "Yes",
"html": "<html>\n<head>\n<!--Other charges function-->\n<script>\n var make_row = function(title,val,bold){\n var bstart = '<b>'; var bend = '</b>';\n return '<tr><td style=\"width:50%\">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'\n +'<td style=\"width:20%;text-align:right\">'+doc.currency+'</td>'\n +'<td style=\"width:30%;text-align:right\">'+(val?val:'0.00')+'</td>'\n +'</tr>'\n }\n\n function get_other_charges(){\n var out ='';\n out += '<div><table class=\"noborder\" style=\"width:100%\">';\n out += make_row('Total Amount',fmt_money(convert_rate(doc.total_amount)),1)\n +make_row('Grand Total',fmt_money(convert_rate(doc.grand_total)),1);\n out += '</table></div>';\n return out;\n }\n\n function get_buying_costs(){\n var out ='';\n if(doc.buying_cost_transport || doc.buying_cost_taxes || doc.buying_cost_other){\n out += '<div><table class=\"noborder\" style=\"width:100%\">'\n + '<tr><td style=\"width:100%\"><b>'+'Buying Cost Details'+'</b></td></tr>';\n if(doc.buying_cost_transport){ out += make_row('Transport Cost',fmt_money(convert_rate(doc.buying_cost_transport)),0)}\n if(doc.buying_cost_taxes){ out += make_row('Taxes',fmt_money(convert_rate(doc.buying_cost_taxes)),0)}\n if(doc.buying_cost_other){ out += make_row('Other Cost',fmt_money(convert_rate(doc.buying_cost_other)),0)}\n out += '</table></div>';\n }\n return out;\n }\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals['Control Panel']['Control Panel'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= '';\n\t\t\n\treturn lh;\n}\n\n \n function convert_rate(val){\n var new_val = flt(val)/flt(doc.conversion_rate);\n return new_val;\n }\n \n function get_transport_details(){\n var out = '';\n if(doc.transporter_name || doc.lr_no || doc.lr_date){\n out += '<div><table class=\"noborder\" style=\"width:40%\">'\n +'<tr><td style=\"width:80%\"><b>' + 'Transporter Details'+'</b></td><td style=\"width:20%\"></td></tr>'\n\n if(doc.transporter_name){ out += '<tr><td style=\"width:40%\">' + 'Transporter Name'+'</td><td style=\"width:60%\">'+doc.transporter_name+'</td></tr>'}\n if(doc.lr_no){ out += '<tr><td style=\"width:40%\">' + 'LR No'+'</td><td style=\"width:60%\">'+doc.lr_no+'</td></tr>'}\n if(doc.lr_date){ out += '<tr><td style=\"width:40%\">' + 'LR Date'+'</td><td style=\"width:60%\">'+doc.lr_date+'</td></tr>'}\n out += '</table></div>'\n }\n return out;\n }\n\n</script>\n</head>\n<body>\n<div style=\"border:1px solid black;padding:15px\">\n<!--header-->\n<div><script>get_letter_head()</script></div>\n<div style=\"border-bottom: 1px solid; padding-bottom: 5px;\">\n <div><br><b>Purchase Receipt: <script>doc.name</script></b></div>\n <div>Date: <script>date.str_to_user(doc.transaction_date)</script></div>\n</div>\n\n<div style=\"padding-top:15px\">\n<div><script>doc.supplier</script></div>\n<div><br><script>replace_newlines(doc.address_display)</script></div>\n</div>\n\n<div>\n<br>\n <script>\n var t = print_table('Purchase Receipt', doc.name, 'purchase_receipt_details', 'Purchase Receipt Item', ['SR', 'item_code','description','received_qty','qty','rejected_qty','po_rate','amount','billed_qty'], ['Sr', 'Item Code', 'Description','Received Quantity','Accepted Qty','Rejected Qty','Rate','Amount','Billed Qty'], ['4%','12%', '24%', '10%','10%','10%','10%','10%','10%'])\n if(t.appendChild) {\n // single\n out = t.innerHTML;\n } \n else {//multiple\n out = ''\n for(var i=0;i<t.length;i++) {\n if(i!=t.length-1){\n out += '<div style:\"padding-top:5px;\"></div>' + t[i].innerHTML +'<div style=\"page-break-after:always\"></div>';\n }\n else out += '<div style:\"padding-top:5px;\"></div>' + t[i].innerHTML;\n }\n }\n out;\n </script>\n\n</div>\n\n<!--Other charges table-->\n<div>\n<table style=\"width:100%\">\n <tr><td style=\"width:40%\"><script>get_buying_costs()</script></td>\n <td style=\"width:20%\"></td><td style=\"width:40%\"><script>get_other_charges()</script></td></tr>\n</table>\n</div>\n<div><script>get_transport_details()</script></div>\n<div><br>Payment Terms</div>\n<div><br><script>replace_newlines(doc.payment_terms)</script></div>\n<div><br>For NCSCI</div>\n<div><br><br>(Authorised Signatory)</div>\n</div></body>\n</html>",
"doctype": "Print Format"
},
{
"name": "Purchase Receipt Format",
"doctype": "Print Format"
}
]

View File

@@ -1,149 +1,120 @@
# DocType, Batch
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:26',
'docstatus': 0,
'modified': '2012-03-27 14:36:26',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
# These values are common for all DocType
{
'allow_trash': 1,
'autoname': u'field:batch_id',
'colour': u'White:FFF',
'doctype': 'DocType',
'document_type': u'Master',
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'version': 12
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Batch',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Batch',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1,
'role': u'Material Master Manager'
},
# DocType, Batch
{
'doctype': 'DocType',
'name': u'Batch'
},
# DocPerm
{
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'write': 1
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'trash_reason',
'fieldtype': u'Small Text',
'label': u'Trash Reason',
'oldfieldname': u'trash_reason',
'oldfieldtype': u'Small Text',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'batch_id',
'fieldtype': u'Data',
'label': u'Batch ID',
'no_copy': 1,
'oldfieldname': u'batch_id',
'oldfieldtype': u'Data',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'width': u'300px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'start_date',
'fieldtype': u'Date',
'label': u'Batch Started Date',
'oldfieldname': u'start_date',
'oldfieldtype': u'Date',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'finished_date',
'fieldtype': u'Date',
'label': u'Batch Finished Date',
'oldfieldname': u'finished_date',
'oldfieldtype': u'Date',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'expiry_date',
'fieldtype': u'Date',
'label': u'Expiry Date',
'oldfieldname': u'expiry_date',
'oldfieldtype': u'Date',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item',
'fieldtype': u'Link',
'label': u'Item',
'oldfieldname': u'item',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'reqd': 1
}
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2012-03-27 14:36:26",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:26"
},
{
"section_style": "Simple",
"module": "Stock",
"server_code_error": " ",
"allow_trash": 1,
"doctype": "DocType",
"autoname": "field:batch_id",
"document_type": "Master",
"name": "__common__",
"colour": "White:FFF",
"version": 12
},
{
"name": "__common__",
"parent": "Batch",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Batch",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"role": "Material Master Manager",
"parentfield": "permissions"
},
{
"name": "Batch",
"doctype": "DocType"
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"cancel": 1,
"permlevel": 0
},
{
"permlevel": 1,
"doctype": "DocPerm"
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"permlevel": 1
},
{
"no_copy": 1,
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Batch ID",
"oldfieldname": "batch_id",
"fieldname": "batch_id",
"fieldtype": "Data",
"reqd": 1,
"permlevel": 0
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Small Text",
"permlevel": 0
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"label": "Batch Started Date",
"oldfieldname": "start_date",
"fieldname": "start_date",
"fieldtype": "Date",
"permlevel": 0
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"label": "Batch Finished Date",
"oldfieldname": "finished_date",
"fieldname": "finished_date",
"fieldtype": "Date",
"permlevel": 0
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"label": "Expiry Date",
"oldfieldname": "expiry_date",
"fieldname": "expiry_date",
"fieldtype": "Date",
"permlevel": 0
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Item",
"oldfieldname": "item",
"permlevel": 0,
"fieldname": "item",
"fieldtype": "Link",
"reqd": 1,
"options": "Item"
}
]

View File

@@ -1,274 +1,223 @@
# DocType, Bin
[
# These values are common in all dictionaries
{
'creation': '2012-05-15 12:15:04',
'docstatus': 0,
'modified': '2012-07-31 17:23:42',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': u'1322549701',
'autoname': u'BIN/.#######',
'colour': u'White:FFF',
'doctype': 'DocType',
'hide_toolbar': 1,
'in_create': 1,
'module': u'Stock',
'name': '__common__',
'read_only': 0,
'search_fields': u'item_code,warehouse',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Bin',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# These values are common for all DocPerm
{
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Bin',
'parentfield': u'permissions',
'parenttype': u'DocType',
'permlevel': 0,
'read': 1
},
# DocType, Bin
{
'doctype': 'DocType',
'name': u'Bin'
},
# DocPerm
{
'doctype': u'DocPerm',
'role': u'Sales Manager'
},
# DocPerm
{
'doctype': u'DocPerm',
'role': u'Sales User'
},
# DocPerm
{
'doctype': u'DocPerm',
'role': u'Purchase Manager'
},
# DocPerm
{
'doctype': u'DocPerm',
'role': u'Purchase User'
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'role': u'Material User',
'submit': 0,
'write': 0
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'role': u'Material Manager',
'submit': 0,
'write': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'search_index': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'warehouse_type',
'fieldtype': u'Data',
'label': u'Warehouse Type',
'oldfieldname': u'warehouse_type',
'oldfieldtype': u'Data'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'search_index': 1
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'reserved_qty',
'fieldtype': u'Currency',
'in_filter': 0,
'label': u'Reserved Quantity',
'oldfieldname': u'reserved_qty',
'oldfieldtype': u'Currency',
'search_index': 0
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'in_filter': 1,
'label': u'Actual Quantity',
'oldfieldname': u'actual_qty',
'oldfieldtype': u'Currency',
'search_index': 0
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'ordered_qty',
'fieldtype': u'Currency',
'in_filter': 0,
'label': u'Ordered Quantity',
'oldfieldname': u'ordered_qty',
'oldfieldtype': u'Currency',
'search_index': 0
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'indented_qty',
'fieldtype': u'Currency',
'in_filter': 0,
'label': u'Quantity Requested for Purchase',
'oldfieldname': u'indented_qty',
'oldfieldtype': u'Currency',
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'planned_qty',
'fieldtype': u'Currency',
'in_filter': 0,
'label': u'Planned Qty',
'oldfieldname': u'planned_qty',
'oldfieldtype': u'Currency',
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'projected_qty',
'fieldtype': u'Currency',
'in_filter': 0,
'label': u'Projected Qty',
'oldfieldname': u'projected_qty',
'oldfieldtype': u'Currency'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'ma_rate',
'fieldtype': u'Currency',
'hidden': 1,
'in_filter': 0,
'label': u'Moving Average Rate',
'oldfieldname': u'ma_rate',
'oldfieldtype': u'Currency',
'print_hide': 1,
'report_hide': 1,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'in_filter': 1,
'label': u'UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'fcfs_rate',
'fieldtype': u'Currency',
'hidden': 1,
'label': u'FCFS Rate',
'oldfieldname': u'fcfs_rate',
'oldfieldtype': u'Currency',
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'valuation_rate',
'fieldtype': u'Currency',
'label': u'Valuation Rate',
'oldfieldname': u'valuation_rate',
'oldfieldtype': u'Currency'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'stock_value',
'fieldtype': u'Currency',
'label': u'Stock Value',
'oldfieldname': u'stock_value',
'oldfieldtype': u'Currency'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-05-15 12:15:04",
"modified_by": "Administrator",
"modified": "2012-07-31 17:23:42"
},
{
"section_style": "Simple",
"in_create": 1,
"search_fields": "item_code,warehouse",
"module": "Stock",
"server_code_error": " ",
"read_only": 0,
"_last_update": "1322549701",
"autoname": "BIN/.#######",
"name": "__common__",
"colour": "White:FFF",
"doctype": "DocType",
"show_in_menu": 0,
"version": 1,
"hide_toolbar": 1
},
{
"name": "__common__",
"parent": "Bin",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Bin",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "permissions"
},
{
"name": "Bin",
"doctype": "DocType"
},
{
"role": "Sales Manager",
"doctype": "DocPerm"
},
{
"role": "Sales User",
"doctype": "DocPerm"
},
{
"role": "Purchase Manager",
"doctype": "DocPerm"
},
{
"role": "Purchase User",
"doctype": "DocPerm"
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Material User",
"cancel": 0
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Material Manager",
"cancel": 0
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Warehouse",
"oldfieldname": "warehouse",
"fieldname": "warehouse",
"fieldtype": "Link",
"oldfieldtype": "Link",
"options": "Warehouse",
"in_filter": 1
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Warehouse Type",
"oldfieldname": "warehouse_type",
"fieldname": "warehouse_type",
"fieldtype": "Data"
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Item Code",
"oldfieldname": "item_code",
"fieldname": "item_code",
"fieldtype": "Link",
"oldfieldtype": "Link",
"options": "Item",
"in_filter": 1
},
{
"default": "0.00",
"search_index": 0,
"doctype": "DocField",
"label": "Reserved Quantity",
"oldfieldname": "reserved_qty",
"fieldname": "reserved_qty",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"in_filter": 0
},
{
"default": "0.00",
"search_index": 0,
"doctype": "DocField",
"label": "Actual Quantity",
"oldfieldname": "actual_qty",
"fieldname": "actual_qty",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"in_filter": 1
},
{
"default": "0.00",
"search_index": 0,
"doctype": "DocField",
"label": "Ordered Quantity",
"oldfieldname": "ordered_qty",
"fieldname": "ordered_qty",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"in_filter": 0
},
{
"default": "0.00",
"search_index": 0,
"doctype": "DocField",
"label": "Quantity Requested for Purchase",
"oldfieldname": "indented_qty",
"fieldname": "indented_qty",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"in_filter": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Planned Qty",
"oldfieldname": "planned_qty",
"fieldname": "planned_qty",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"in_filter": 0
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Projected Qty",
"oldfieldname": "projected_qty",
"fieldname": "projected_qty",
"fieldtype": "Currency",
"in_filter": 0
},
{
"print_hide": 1,
"search_index": 0,
"doctype": "DocField",
"label": "Moving Average Rate",
"oldfieldname": "ma_rate",
"fieldname": "ma_rate",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"hidden": 1,
"report_hide": 1,
"in_filter": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "UOM",
"oldfieldname": "stock_uom",
"fieldname": "stock_uom",
"fieldtype": "Data",
"oldfieldtype": "Data",
"in_filter": 1
},
{
"print_hide": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "FCFS Rate",
"oldfieldname": "fcfs_rate",
"fieldname": "fcfs_rate",
"fieldtype": "Currency",
"hidden": 1,
"report_hide": 1
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Valuation Rate",
"oldfieldname": "valuation_rate",
"fieldname": "valuation_rate",
"fieldtype": "Currency"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Stock Value",
"oldfieldname": "stock_value",
"fieldname": "stock_value",
"fieldtype": "Currency"
}
]

View File

@@ -1,457 +1,390 @@
# DocType, Delivery Note Item
[
# These values are common in all dictionaries
{
'creation': '2012-06-08 16:08:01',
'docstatus': 0,
'modified': '2012-07-09 11:06:26',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': u'1311621379',
'autoname': u'DND/.#######',
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Delivery Note Item',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Delivery Note Item
{
'doctype': 'DocType',
'name': u'Delivery Note Item'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'barcode',
'fieldtype': u'Data',
'label': u'Barcode',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'customer_item_code',
'fieldtype': u'Data',
'hidden': 1,
'label': u"Customer's Item Code",
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
'width': u'300px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Quantity',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'label': u'UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 0,
'reqd': 1,
'width': u'50px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate',
'no_copy': 0,
'oldfieldname': u'ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'adj_rate',
'fieldtype': u'Float',
'label': u'Discount (%)',
'oldfieldname': u'adj_rate',
'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'export_rate',
'fieldtype': u'Currency',
'label': u'Rate',
'oldfieldname': u'export_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'export_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'export_amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'base_ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate*',
'oldfieldname': u'base_ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'basic_rate',
'fieldtype': u'Currency',
'label': u'Rate*',
'oldfieldname': u'basic_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount*',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'label': u'Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'serial_no',
'fieldtype': u'Text',
'in_filter': 1,
'label': u'Serial No',
'no_copy': 1,
'oldfieldname': u'serial_no',
'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'batch_no',
'fieldtype': u'Link',
'label': u'Batch No',
'oldfieldname': u'batch_no',
'oldfieldtype': u'Link',
'options': u'Batch',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Link',
'hidden': 1,
'label': u'Brand Name',
'oldfieldname': u'brand',
'oldfieldtype': u'Link',
'options': u'Brand',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'label': u'Available Qty at Warehouse',
'no_copy': 1,
'oldfieldname': u'actual_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'billed_amt',
'fieldtype': u'Currency',
'label': u'Billed Amt',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'installed_qty',
'fieldtype': u'Currency',
'label': u'Installed Qty',
'no_copy': 1,
'oldfieldname': u'installed_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'default': u'0',
'doctype': u'DocField',
'fieldname': u'packed_qty',
'fieldtype': u'Currency',
'label': u'Packed Quantity',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'prevdoc_doctype',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': u'Document Type',
'oldfieldname': u'prevdoc_doctype',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_docname',
'fieldtype': u'Data',
'hidden': 0,
'in_filter': 1,
'label': u'Against Document No',
'no_copy': 1,
'oldfieldname': u'prevdoc_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'prevdoc_date',
'fieldtype': u'Date',
'hidden': 1,
'in_filter': 1,
'label': u'Against Document Date',
'oldfieldname': u'prevdoc_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'prevdoc_detail_docname',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': u'Against Document Detail No',
'oldfieldname': u'prevdoc_detail_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'oldfieldname': u'page_break',
'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-06-08 16:08:01",
"modified_by": "Administrator",
"modified": "2012-07-09 11:06:26"
},
{
"section_style": "Tray",
"istable": 1,
"module": "Stock",
"_last_update": "1311621379",
"doctype": "DocType",
"autoname": "DND/.#######",
"show_in_menu": 0,
"name": "__common__",
"colour": "White:FFF",
"server_code_error": " ",
"version": 1
},
{
"name": "__common__",
"parent": "Delivery Note Item",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "Delivery Note Item",
"doctype": "DocType"
},
{
"print_hide": 1,
"doctype": "DocField",
"label": "Barcode",
"fieldname": "barcode",
"fieldtype": "Data",
"permlevel": 0
},
{
"permlevel": 0,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Item Code",
"oldfieldname": "item_code",
"width": "150px",
"trigger": "Client",
"fieldname": "item_code",
"fieldtype": "Link",
"search_index": 1,
"reqd": 1,
"options": "Item",
"in_filter": 1
},
{
"print_hide": 1,
"doctype": "DocField",
"label": "Customer's Item Code",
"fieldname": "customer_item_code",
"fieldtype": "Data",
"hidden": 1,
"permlevel": 1
},
{
"print_hide": 1,
"oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Item Name",
"oldfieldname": "item_name",
"width": "150px",
"fieldname": "item_name",
"fieldtype": "Data",
"reqd": 1,
"permlevel": 0
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Small Text",
"reqd": 1,
"permlevel": 0
},
{
"default": "0.00",
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Quantity",
"oldfieldname": "qty",
"width": "100px",
"trigger": "Client",
"fieldname": "qty",
"fieldtype": "Currency",
"reqd": 1,
"permlevel": 0
},
{
"print_hide": 0,
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "UOM",
"oldfieldname": "stock_uom",
"width": "50px",
"fieldname": "stock_uom",
"fieldtype": "Data",
"reqd": 1,
"permlevel": 1
},
{
"print_hide": 1,
"width": "100px",
"default": "0.00",
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"no_copy": 0,
"trigger": "Client",
"fieldname": "ref_rate",
"fieldtype": "Currency",
"reqd": 0,
"permlevel": 0
},
{
"print_hide": 1,
"default": "0.00",
"oldfieldtype": "Float",
"doctype": "DocField",
"label": "Discount (%)",
"oldfieldname": "adj_rate",
"width": "100px",
"trigger": "Client",
"fieldname": "adj_rate",
"fieldtype": "Float",
"permlevel": 0
},
{
"print_hide": 0,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Rate",
"oldfieldname": "export_rate",
"width": "150px",
"trigger": "Client",
"fieldname": "export_rate",
"fieldtype": "Currency",
"reqd": 0,
"permlevel": 0
},
{
"print_hide": 0,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Amount",
"oldfieldname": "export_amount",
"width": "100px",
"fieldname": "export_amount",
"fieldtype": "Currency",
"reqd": 0,
"permlevel": 1
},
{
"print_hide": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"width": "100px",
"fieldname": "base_ref_rate",
"fieldtype": "Currency",
"permlevel": 1
},
{
"print_hide": 1,
"default": "0.00",
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Rate*",
"oldfieldname": "basic_rate",
"width": "150px",
"trigger": "Client",
"fieldname": "basic_rate",
"fieldtype": "Currency",
"reqd": 0,
"permlevel": 0
},
{
"print_hide": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Amount*",
"oldfieldname": "amount",
"width": "100px",
"fieldname": "amount",
"fieldtype": "Currency",
"reqd": 0,
"permlevel": 1
},
{
"print_hide": 1,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Warehouse",
"oldfieldname": "warehouse",
"width": "100px",
"trigger": "Client",
"fieldname": "warehouse",
"fieldtype": "Link",
"options": "Warehouse",
"permlevel": 0
},
{
"print_hide": 0,
"no_copy": 1,
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Serial No",
"oldfieldname": "serial_no",
"trigger": "Client",
"fieldname": "serial_no",
"fieldtype": "Text",
"permlevel": 0,
"in_filter": 1
},
{
"print_hide": 1,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Batch No",
"oldfieldname": "batch_no",
"permlevel": 0,
"fieldname": "batch_no",
"fieldtype": "Link",
"options": "Batch"
},
{
"print_hide": 1,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Item Group",
"oldfieldname": "item_group",
"permlevel": 1,
"fieldname": "item_group",
"fieldtype": "Link",
"hidden": 1,
"options": "Item Group"
},
{
"print_hide": 1,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Brand Name",
"oldfieldname": "brand",
"width": "150px",
"options": "Brand",
"fieldname": "brand",
"fieldtype": "Link",
"hidden": 1,
"permlevel": 1
},
{
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Available Qty at Warehouse",
"oldfieldname": "actual_qty",
"width": "150px",
"fieldname": "actual_qty",
"fieldtype": "Currency",
"permlevel": 1
},
{
"print_hide": 1,
"no_copy": 1,
"doctype": "DocField",
"label": "Billed Amt",
"width": "100px",
"fieldname": "billed_amt",
"fieldtype": "Currency",
"permlevel": 1
},
{
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Installed Qty",
"oldfieldname": "installed_qty",
"width": "150px",
"fieldname": "installed_qty",
"fieldtype": "Currency",
"permlevel": 1
},
{
"print_hide": 1,
"no_copy": 1,
"colour": "White:FFF",
"allow_on_submit": 1,
"doctype": "DocField",
"label": "Packed Quantity",
"default": "0",
"fieldname": "packed_qty",
"fieldtype": "Currency",
"permlevel": 1
},
{
"print_hide": 1,
"search_index": 1,
"doctype": "DocField",
"label": "Document Type",
"oldfieldname": "prevdoc_doctype",
"width": "150px",
"fieldname": "prevdoc_doctype",
"fieldtype": "Data",
"oldfieldtype": "Data",
"hidden": 1,
"permlevel": 1,
"in_filter": 1
},
{
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Against Document No",
"oldfieldname": "prevdoc_docname",
"width": "150px",
"fieldname": "prevdoc_docname",
"fieldtype": "Data",
"search_index": 1,
"hidden": 0,
"permlevel": 1,
"in_filter": 1
},
{
"print_hide": 1,
"oldfieldtype": "Date",
"doctype": "DocField",
"label": "Against Document Date",
"oldfieldname": "prevdoc_date",
"fieldname": "prevdoc_date",
"fieldtype": "Date",
"hidden": 1,
"permlevel": 1,
"in_filter": 1
},
{
"print_hide": 1,
"search_index": 0,
"doctype": "DocField",
"label": "Against Document Detail No",
"oldfieldname": "prevdoc_detail_docname",
"width": "150px",
"fieldname": "prevdoc_detail_docname",
"fieldtype": "Data",
"oldfieldtype": "Data",
"hidden": 1,
"permlevel": 1,
"in_filter": 1
},
{
"print_hide": 1,
"oldfieldtype": "Small Text",
"doctype": "DocField",
"label": "Item Tax Rate",
"oldfieldname": "item_tax_rate",
"fieldname": "item_tax_rate",
"fieldtype": "Small Text",
"hidden": 1,
"permlevel": 1
},
{
"print_hide": 1,
"oldfieldtype": "Check",
"allow_on_submit": 1,
"doctype": "DocField",
"label": "Page Break",
"oldfieldname": "page_break",
"fieldname": "page_break",
"fieldtype": "Check",
"permlevel": 0
}
]

View File

@@ -1,208 +1,171 @@
# DocType, Delivery Note Packing Item
[
# These values are common in all dictionaries
{
'creation': '2012-06-11 12:10:10',
'docstatus': 0,
'modified': '2012-07-10 12:05:31',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Delivery Note Packing Item',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Delivery Note Packing Item
{
'doctype': 'DocType',
'name': u'Delivery Note Packing Item'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'parent_item',
'fieldtype': u'Link',
'label': u'Parent Item',
'oldfieldname': u'parent_item',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'in_filter': 1,
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'parent_detail_docname',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Parent Detail docname',
'no_copy': 1,
'oldfieldname': u'parent_detail_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Text',
'permlevel': 1,
'width': u'300px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'label': u'Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Qty',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'serial_no',
'fieldtype': u'Text',
'label': u'Serial No',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'batch_no',
'fieldtype': u'Data',
'label': u'Batch No',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'label': u'Actual Qty',
'no_copy': 1,
'oldfieldname': u'actual_qty',
'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'projected_qty',
'fieldtype': u'Currency',
'label': u'Projected Qty',
'no_copy': 1,
'oldfieldname': u'projected_qty',
'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'uom',
'fieldtype': u'Link',
'label': u'UOM',
'oldfieldname': u'uom',
'oldfieldtype': u'Link',
'options': u'UOM',
'permlevel': 1,
'search_index': 0
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_doctype',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Prevdoc DocType',
'oldfieldname': u'prevdoc_doctype',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'oldfieldname': u'page_break',
'oldfieldtype': u'Check',
'permlevel': 1
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-06-11 12:10:10",
"modified_by": "Administrator",
"modified": "2012-07-10 12:05:31"
},
{
"section_style": "Tray",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"show_in_menu": 0,
"version": 1,
"server_code_error": " ",
"doctype": "DocType"
},
{
"name": "__common__",
"parent": "Delivery Note Packing Item",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "Delivery Note Packing Item",
"doctype": "DocType"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Parent Item",
"oldfieldname": "parent_item",
"permlevel": 1,
"fieldname": "parent_item",
"fieldtype": "Link",
"options": "Item"
},
{
"oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Item Code",
"oldfieldname": "item_code",
"permlevel": 1,
"fieldname": "item_code",
"fieldtype": "Link",
"options": "Item",
"in_filter": 1
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Item Name",
"oldfieldname": "item_name",
"fieldname": "item_name",
"fieldtype": "Data",
"permlevel": 1,
"in_filter": 1
},
{
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Parent Detail docname",
"oldfieldname": "parent_detail_docname",
"fieldname": "parent_detail_docname",
"fieldtype": "Data",
"hidden": 1,
"permlevel": 1
},
{
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Text",
"permlevel": 1
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Warehouse",
"oldfieldname": "warehouse",
"permlevel": 0,
"fieldname": "warehouse",
"fieldtype": "Link",
"options": "Warehouse"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Qty",
"oldfieldname": "qty",
"fieldname": "qty",
"fieldtype": "Currency",
"permlevel": 1
},
{
"doctype": "DocField",
"label": "Serial No",
"fieldname": "serial_no",
"fieldtype": "Text",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Batch No",
"fieldname": "batch_no",
"fieldtype": "Data",
"permlevel": 0
},
{
"no_copy": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Actual Qty",
"oldfieldname": "actual_qty",
"fieldname": "actual_qty",
"fieldtype": "Currency",
"permlevel": 1
},
{
"no_copy": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Projected Qty",
"oldfieldname": "projected_qty",
"fieldname": "projected_qty",
"fieldtype": "Currency",
"permlevel": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "UOM",
"oldfieldname": "uom",
"permlevel": 1,
"fieldname": "uom",
"fieldtype": "Link",
"oldfieldtype": "Link",
"options": "UOM"
},
{
"print_hide": 1,
"oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Prevdoc DocType",
"oldfieldname": "prevdoc_doctype",
"fieldname": "prevdoc_doctype",
"fieldtype": "Data",
"hidden": 1,
"permlevel": 1
},
{
"oldfieldtype": "Check",
"allow_on_submit": 1,
"doctype": "DocField",
"label": "Page Break",
"oldfieldname": "page_break",
"fieldname": "page_break",
"fieldtype": "Check",
"permlevel": 1
}
]

View File

@@ -52,7 +52,7 @@ cur_frm.cscript.show_in_website = function(doc, dt, dn) {
cur_frm.fields_dict['default_bom'].get_query = function(doc) {
//var d = locals[this.doctype][this.docname];
return 'SELECT DISTINCT `tabBOM`.`name` FROM `tabBOM` WHERE `tabBOM`.`item` = "' + doc.item_code + '" AND `tabBOM`.`is_active` = "No" and `tabBOM`.docstatus != 2 AND `tabBOM`.%(key)s LIKE "%s" ORDER BY `tabBOM`.`name` LIMIT 50'
return 'SELECT DISTINCT `tabBOM`.`name` FROM `tabBOM` WHERE `tabBOM`.`item` = "' + doc.item_code + '" AND ifnull(`tabBOM`.`is_active`, 0) = 0 and `tabBOM`.docstatus != 2 AND `tabBOM`.%(key)s LIKE "%s" ORDER BY `tabBOM`.`name` LIMIT 50'
}
@@ -149,4 +149,4 @@ cur_frm.cscript.on_remove_attachment = function(doc) {
msgprint(wn._("Attachment removed. You may need to update: ")
+ wn.meta.get_docfield(doc.doctype, "description_html").label);
}
};
};

View File

@@ -120,12 +120,12 @@ class DocType:
def check_for_active_boms(self, check):
if check in ['Is Active', 'Is Purchase Item']:
bom_mat = sql("select distinct t1.parent from `tabBOM Item` t1, `tabBOM` t2 where t1.item_code ='%s' and (t1.bom_no = '' or t1.bom_no is NULL) and t2.name = t1.parent and t2.is_active = 'Yes' and t2.docstatus = 1 and t1.docstatus =1 " % self.doc.name )
bom_mat = sql("select distinct t1.parent from `tabBOM Item` t1, `tabBOM` t2 where t1.item_code ='%s' and (t1.bom_no = '' or t1.bom_no is NULL) and t2.name = t1.parent and t2.is_active = 1 and t2.docstatus = 1 and t1.docstatus =1 " % self.doc.name )
if bom_mat and bom_mat[0][0]:
msgprint("%s should be 'Yes'. As Item %s is present in one or many Active BOMs." % (cstr(check), cstr(self.doc.name)))
raise Exception
if check == 'Is Active' or ( check == 'Is Manufactured Item' and self.doc.is_sub_contracted_item != 'Yes') or (check == 'Is Sub Contracted Item' and self.doc.is_manufactured_item != 'Yes') :
bom = sql("select name from `tabBOM` where item = '%s' and is_active ='Yes'" % cstr(self.doc.name))
bom = sql("select name from `tabBOM` where item = '%s' and is_active = 1" % cstr(self.doc.name))
if bom and bom[0][0]:
msgprint("%s should be 'Yes'. As Item %s is present in one or many Active BOMs." % (cstr(check), cstr(self.doc.name)))
raise Exception

View File

@@ -1,71 +1,58 @@
# DocType, Item Customer Detail
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:33',
'docstatus': 0,
'modified': '2012-03-27 14:36:33',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': u'ITEMCUST/.#####',
'colour': u'White:FFF',
'description': u'For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes',
'doctype': 'DocType',
'in_create': 1,
'istable': 1,
'module': u'Stock',
'name': '__common__',
'read_only': 0,
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 7
},
# These values are common for all DocField
{
'doctype': u'DocField',
'in_filter': 1,
'name': '__common__',
'parent': u'Item Customer Detail',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0,
'reqd': 1,
'search_index': 1
},
# DocType, Item Customer Detail
{
'doctype': 'DocType',
'name': u'Item Customer Detail'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'customer_name',
'fieldtype': u'Link',
'label': u'Customer Name',
'oldfieldname': u'price_list_name',
'oldfieldtype': u'Select',
'options': u'Customer',
'width': u'180px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'ref_code',
'fieldtype': u'Data',
'label': u'Ref Code',
'oldfieldname': u'ref_rate',
'oldfieldtype': u'Currency',
'width': u'120px'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:33",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:33"
},
{
"section_style": "Tray",
"istable": 1,
"description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes",
"module": "Stock",
"server_code_error": " ",
"in_create": 1,
"read_only": 0,
"autoname": "ITEMCUST/.#####",
"name": "__common__",
"colour": "White:FFF",
"doctype": "DocType",
"show_in_menu": 0,
"version": 7
},
{
"name": "__common__",
"parent": "Item Customer Detail",
"search_index": 1,
"doctype": "DocField",
"reqd": 1,
"parenttype": "DocType",
"parentfield": "fields",
"permlevel": 0,
"in_filter": 1
},
{
"name": "Item Customer Detail",
"doctype": "DocType"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Customer Name",
"oldfieldname": "price_list_name",
"width": "180px",
"fieldname": "customer_name",
"fieldtype": "Link",
"options": "Customer"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Ref Code",
"oldfieldname": "ref_rate",
"width": "120px",
"fieldname": "ref_code",
"fieldtype": "Data"
}
]

View File

@@ -1,81 +1,66 @@
# DocType, Item Price
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:36',
'docstatus': 0,
'modified': '2012-03-27 14:36:36',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': u'RFD/.#####',
'colour': u'White:FFF',
'doctype': 'DocType',
'in_create': 1,
'istable': 1,
'module': u'Stock',
'name': '__common__',
'read_only': 0,
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 3
},
# These values are common for all DocField
{
'doctype': u'DocField',
'in_filter': 1,
'name': '__common__',
'parent': u'Item Price',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0,
'search_index': 1
},
# DocType, Item Price
{
'doctype': 'DocType',
'name': u'Item Price'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'price_list_name',
'fieldtype': u'Select',
'label': u'Price List Name',
'oldfieldname': u'price_list_name',
'oldfieldtype': u'Select',
'options': u'link:Price List',
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'ref_rate',
'fieldtype': u'Currency',
'label': u'Ref Rate',
'oldfieldname': u'ref_rate',
'oldfieldtype': u'Currency',
'reqd': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'ref_currency',
'fieldtype': u'Select',
'label': u'Currency',
'oldfieldname': u'ref_currency',
'oldfieldtype': u'Select',
'options': u'link:Currency',
'reqd': 1
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:36",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:36"
},
{
"section_style": "Tray",
"istable": 1,
"in_create": 1,
"module": "Stock",
"server_code_error": " ",
"read_only": 0,
"autoname": "RFD/.#####",
"name": "__common__",
"colour": "White:FFF",
"doctype": "DocType",
"show_in_menu": 0,
"version": 3
},
{
"name": "__common__",
"parent": "Item Price",
"search_index": 1,
"doctype": "DocField",
"parenttype": "DocType",
"in_filter": 1,
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "Item Price",
"doctype": "DocType"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Price List Name",
"oldfieldname": "price_list_name",
"fieldname": "price_list_name",
"fieldtype": "Select",
"reqd": 1,
"options": "link:Price List"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Ref Rate",
"oldfieldname": "ref_rate",
"fieldname": "ref_rate",
"fieldtype": "Currency",
"reqd": 0
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Currency",
"oldfieldname": "ref_currency",
"fieldname": "ref_currency",
"fieldtype": "Select",
"reqd": 1,
"options": "link:Currency"
}
]

View File

@@ -1,64 +1,51 @@
# DocType, Item Quality Inspection Parameter
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:33',
'docstatus': 0,
'modified': '2012-03-27 14:36:33',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': u'IISD/.#####',
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'fieldtype': u'Data',
'name': '__common__',
'oldfieldtype': u'Data',
'parent': u'Item Quality Inspection Parameter',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# DocType, Item Quality Inspection Parameter
{
'doctype': 'DocType',
'name': u'Item Quality Inspection Parameter'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'specification',
'in_filter': 0,
'label': u'Parameter',
'oldfieldname': u'specification',
'reqd': 1,
'search_index': 0,
'width': u'200px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'value',
'label': u'Acceptance Criteria',
'oldfieldname': u'value'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:33",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:33"
},
{
"section_style": "Simple",
"istable": 1,
"module": "Stock",
"server_code_error": " ",
"doctype": "DocType",
"autoname": "IISD/.#####",
"name": "__common__",
"colour": "White:FFF",
"show_in_menu": 0,
"version": 1
},
{
"name": "__common__",
"parent": "Item Quality Inspection Parameter",
"oldfieldtype": "Data",
"doctype": "DocField",
"parenttype": "DocType",
"fieldtype": "Data",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "Item Quality Inspection Parameter",
"doctype": "DocType"
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Parameter",
"oldfieldname": "specification",
"width": "200px",
"fieldname": "specification",
"reqd": 1,
"in_filter": 0
},
{
"oldfieldname": "value",
"fieldname": "value",
"doctype": "DocField",
"label": "Acceptance Criteria"
}
]

View File

@@ -1,58 +1,45 @@
# DocType, Item Supplier
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:33',
'docstatus': 0,
'modified': '2012-03-27 14:36:33',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'show_in_menu': 0,
'version': 3
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Item Supplier',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# DocType, Item Supplier
{
'doctype': 'DocType',
'name': u'Item Supplier'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'supplier',
'fieldtype': u'Link',
'label': u'Supplier',
'options': u'Supplier'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'supplier_part_no',
'fieldtype': u'Data',
'label': u'Supplier Part Number',
'width': u'200px'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:33",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:33"
},
{
"section_style": "Simple",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"doctype": "DocType",
"version": 3,
"show_in_menu": 0
},
{
"name": "__common__",
"parent": "Item Supplier",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "Item Supplier",
"doctype": "DocType"
},
{
"doctype": "DocField",
"label": "Supplier",
"fieldname": "supplier",
"fieldtype": "Link",
"options": "Supplier"
},
{
"doctype": "DocField",
"label": "Supplier Part Number",
"width": "200px",
"fieldname": "supplier_part_no",
"fieldtype": "Data"
}
]

View File

@@ -1,64 +1,51 @@
# DocType, Item Tax
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:33',
'docstatus': 0,
'modified': '2012-03-27 14:36:33',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Item Tax',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# DocType, Item Tax
{
'doctype': 'DocType',
'name': u'Item Tax'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'tax_type',
'fieldtype': u'Link',
'label': u'Tax',
'oldfieldname': u'tax_type',
'oldfieldtype': u'Link',
'options': u'Account',
'reqd': 1,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'tax_rate',
'fieldtype': u'Currency',
'label': u'Tax Rate',
'oldfieldname': u'tax_rate',
'oldfieldtype': u'Currency',
'reqd': 0
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:33",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:33"
},
{
"section_style": "Tray",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"show_in_menu": 0,
"server_code_error": " ",
"doctype": "DocType"
},
{
"name": "__common__",
"parent": "Item Tax",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "Item Tax",
"doctype": "DocType"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Tax",
"oldfieldname": "tax_type",
"trigger": "Client",
"fieldname": "tax_type",
"fieldtype": "Link",
"reqd": 1,
"options": "Account"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Tax Rate",
"oldfieldname": "tax_rate",
"fieldname": "tax_rate",
"fieldtype": "Currency",
"reqd": 0
}
]

View File

@@ -1,75 +1,60 @@
# DocType, Landed Cost Item
[
# These values are common in all dictionaries
{
'creation': '2012-05-03 11:00:55',
'docstatus': 0,
'modified': '2012-05-04 13:02:26',
'modified_by': u'Administrator',
'owner': u'wasim@webnotestech.com'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Landed Cost Item',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0,
'reqd': 1
},
# DocType, Landed Cost Item
{
'doctype': 'DocType',
'name': u'Landed Cost Item'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'account_head',
'fieldtype': u'Link',
'label': u'Account Head',
'oldfieldname': u'account_head',
'oldfieldtype': u'Link',
'options': u'Account',
'search_index': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Data',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Data',
'width': u'300px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency'
}
{
"owner": "wasim@webnotestech.com",
"docstatus": 0,
"creation": "2012-05-03 11:00:55",
"modified_by": "Administrator",
"modified": "2012-05-04 13:02:26"
},
{
"section_style": "Simple",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"show_in_menu": 0,
"version": 1,
"server_code_error": " ",
"doctype": "DocType"
},
{
"name": "__common__",
"parent": "Landed Cost Item",
"doctype": "DocField",
"parenttype": "DocType",
"reqd": 1,
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "Landed Cost Item",
"doctype": "DocType"
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Account Head",
"oldfieldname": "account_head",
"fieldname": "account_head",
"fieldtype": "Link",
"oldfieldtype": "Link",
"options": "Account"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Data"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Amount",
"oldfieldname": "amount",
"fieldname": "amount",
"fieldtype": "Currency"
}
]

View File

@@ -1,150 +1,117 @@
# DocType, Landed Cost Master
[
# These values are common in all dictionaries
{
u'creation': '2012-07-03 13:29:45',
u'docstatus': 0,
u'modified': '2012-09-17 10:53:26',
u'modified_by': u'Administrator',
u'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': u'1309508838',
'autoname': u'field:title',
'colour': u'White:FFF',
u'doctype': u'DocType',
'document_type': u'Master',
'module': u'Stock',
u'name': u'__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'version': 1
},
# These values are common for all DocField
{
u'doctype': u'DocField',
u'name': u'__common__',
'parent': u'Landed Cost Master',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
u'doctype': u'DocPerm',
u'name': u'__common__',
'parent': u'Landed Cost Master',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, Landed Cost Master
{
u'doctype': u'DocType',
u'name': u'Landed Cost Master'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'trash_reason',
'fieldtype': u'Small Text',
'label': u'Trash Reason',
'oldfieldname': u'trash_reason',
'oldfieldtype': u'Small Text',
'permlevel': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'title',
'fieldtype': u'Data',
'label': u'Title',
'oldfieldname': u'title',
'oldfieldtype': u'Data',
'permlevel': 0
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'landed_cost_details',
'fieldtype': u'Section Break',
'label': u'Landed Cost Items',
'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'landed_cost',
'fieldtype': u'Table',
'label': u'Landed Cost',
'oldfieldname': u'landed_cost',
'oldfieldtype': u'Table',
'options': u'Landed Cost Master Detail',
'permlevel': 0
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Purchase Manager',
'write': 1
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'System Manager',
'write': 1
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Purchase User',
'write': 1
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'All'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'System Manager'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Purchase User'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Purchase Manager'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-07-03 13:29:45",
"modified_by": "Administrator",
"modified": "2012-09-17 10:53:26"
},
{
"section_style": "Simple",
"module": "Stock",
"doctype": "DocType",
"autoname": "field:title",
"document_type": "Master",
"name": "__common__",
"colour": "White:FFF",
"_last_update": "1309508838",
"server_code_error": " ",
"version": 1
},
{
"name": "__common__",
"parent": "Landed Cost Master",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Landed Cost Master",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Landed Cost Master",
"doctype": "DocType"
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"permlevel": 1
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Title",
"oldfieldname": "title",
"fieldname": "title",
"fieldtype": "Data",
"permlevel": 0
},
{
"oldfieldtype": "Section Break",
"doctype": "DocField",
"label": "Landed Cost Items",
"fieldname": "landed_cost_details",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"oldfieldtype": "Table",
"doctype": "DocField",
"label": "Landed Cost",
"oldfieldname": "landed_cost",
"permlevel": 0,
"fieldname": "landed_cost",
"fieldtype": "Table",
"options": "Landed Cost Master Detail"
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Purchase Manager",
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "System Manager",
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Purchase User",
"permlevel": 0
},
{
"role": "All",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"role": "System Manager",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"role": "Purchase User",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"role": "Purchase Manager",
"permlevel": 1,
"doctype": "DocPerm"
}
]

View File

@@ -1,61 +1,48 @@
# DocType, Landed Cost Master Detail
[
# These values are common in all dictionaries
{
'creation': '2012-05-03 11:00:55',
'docstatus': 0,
'modified': '2012-05-04 13:02:35',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'oldfieldtype': u'Data',
'parent': u'Landed Cost Master Detail',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# DocType, Landed Cost Master Detail
{
'doctype': 'DocType',
'name': u'Landed Cost Master Detail'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'account_head',
'fieldtype': u'Link',
'label': u'Account Head',
'oldfieldname': u'account_head',
'options': u'Account'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Data',
'label': u'Description',
'oldfieldname': u'description',
'width': u'300px'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-05-03 11:00:55",
"modified_by": "Administrator",
"modified": "2012-05-04 13:02:35"
},
{
"section_style": "Simple",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"doctype": "DocType",
"version": 1,
"server_code_error": " "
},
{
"name": "__common__",
"parent": "Landed Cost Master Detail",
"oldfieldtype": "Data",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "Landed Cost Master Detail",
"doctype": "DocType"
},
{
"doctype": "DocField",
"label": "Account Head",
"oldfieldname": "account_head",
"fieldname": "account_head",
"fieldtype": "Link",
"options": "Account"
},
{
"doctype": "DocField",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Data"
}
]

View File

@@ -1,64 +1,51 @@
# DocType, Landed Cost Purchase Receipt
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:34',
'docstatus': 0,
'modified': '2012-03-27 14:36:34',
'modified_by': u'Administrator',
'owner': u'wasim@webnotestech.com'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 5
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Landed Cost Purchase Receipt',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# DocType, Landed Cost Purchase Receipt
{
'doctype': 'DocType',
'name': u'Landed Cost Purchase Receipt'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'purchase_receipt',
'fieldtype': u'Link',
'label': u'Purchase Receipt',
'oldfieldname': u'purchase_receipt_no',
'oldfieldtype': u'Link',
'options': u'Purchase Receipt',
'width': u'220px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'select_pr',
'fieldtype': u'Check',
'label': u'Select PR',
'oldfieldname': u'include_in_landed_cost',
'oldfieldtype': u'Check',
'width': u'120px'
}
{
"owner": "wasim@webnotestech.com",
"docstatus": 0,
"creation": "2012-03-27 14:36:34",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:34"
},
{
"section_style": "Simple",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"show_in_menu": 0,
"version": 5,
"server_code_error": " ",
"doctype": "DocType"
},
{
"name": "__common__",
"parent": "Landed Cost Purchase Receipt",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "Landed Cost Purchase Receipt",
"doctype": "DocType"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Purchase Receipt",
"oldfieldname": "purchase_receipt_no",
"width": "220px",
"fieldname": "purchase_receipt",
"fieldtype": "Link",
"options": "Purchase Receipt"
},
{
"oldfieldtype": "Check",
"doctype": "DocField",
"label": "Select PR",
"oldfieldname": "include_in_landed_cost",
"width": "120px",
"fieldname": "select_pr",
"fieldtype": "Check"
}
]

View File

@@ -1,218 +1,169 @@
# DocType, Landed Cost Wizard
[
# These values are common in all dictionaries
{
u'creation': '2012-07-03 13:29:45',
u'docstatus': 0,
u'modified': '2012-09-17 10:54:21',
u'modified_by': u'Administrator',
u'owner': u'wasim@webnotestech.com'
},
# These values are common for all DocType
{
'_last_update': u'1321441191',
'colour': u'White:FFF',
u'doctype': u'DocType',
'issingle': 1,
'module': u'Stock',
u'name': u'__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 1,
'version': 1
},
# These values are common for all DocField
{
u'doctype': u'DocField',
u'name': u'__common__',
'parent': u'Landed Cost Wizard',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# These values are common for all DocPerm
{
u'doctype': u'DocPerm',
u'name': u'__common__',
'parent': u'Landed Cost Wizard',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, Landed Cost Wizard
{
u'doctype': u'DocType',
u'name': u'Landed Cost Wizard'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'process',
'fieldtype': u'HTML',
'label': u'Process',
'options': u'<div class="field_description"><b>Process:</b><br>1. Fetch and select Purchase Receipt<br>2. Enter extra costs<br>3. Click on Update Landed Cost button<br> 4. Cost will be added into other charges table of selected PR proportionately based on net total<br>5. Item Valuation Rate will be recalculated</div>'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'section_break0',
'fieldtype': u'Section Break',
'options': u'Simple'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'from_pr_date',
'fieldtype': u'Date',
'label': u'From PR Date',
'reqd': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'to_pr_date',
'fieldtype': u'Date',
'label': u'To PR Date',
'reqd': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'currency',
'fieldtype': u'Select',
'label': u'Currency',
'options': u'link:Currency',
'reqd': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'get_purchase_receipt',
'fieldtype': u'Button',
'label': u'Get Purchase Receipt',
'options': u'get_purchase_receipts'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'lc_pr_details',
'fieldtype': u'Table',
'label': u'Landed Cost Purchase Receipts',
'options': u'Landed Cost Purchase Receipt'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'section_break1',
'fieldtype': u'Section Break',
'options': u'Simple'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'landed_cost',
'fieldtype': u'Link',
'label': u'Select Landed Cost Items Master',
'options': u'Landed Cost Master'
},
# DocField
{
'colour': u'White:FFF',
u'doctype': u'DocField',
'fieldname': u'get_details',
'fieldtype': u'Button',
'label': u'Get Details',
'options': u'get_landed_cost_master_details'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'landed_cost_details',
'fieldtype': u'Table',
'label': u'Landed Cost Items',
'options': u'Landed Cost Item'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'update_pr',
'fieldtype': u'Button',
'label': u'Update PR',
'options': u'update_landed_cost'
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Purchase Manager',
'submit': 0,
'write': 1
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'System Manager',
'write': 1
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Purchase User',
'write': 1
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'All'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'System Manager'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Purchase User'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Purchase Manager'
}
{
"owner": "wasim@webnotestech.com",
"docstatus": 0,
"creation": "2012-07-03 13:29:45",
"modified_by": "Administrator",
"modified": "2012-09-17 10:54:21"
},
{
"section_style": "Simple",
"module": "Stock",
"server_code_error": " ",
"doctype": "DocType",
"issingle": 1,
"_last_update": "1321441191",
"name": "__common__",
"colour": "White:FFF",
"show_in_menu": 1,
"version": 1
},
{
"name": "__common__",
"parent": "Landed Cost Wizard",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Landed Cost Wizard",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Landed Cost Wizard",
"doctype": "DocType"
},
{
"doctype": "DocField",
"label": "Process",
"fieldname": "process",
"fieldtype": "HTML",
"options": "<div class=\"field_description\"><b>Process:</b><br>1. Fetch and select Purchase Receipt<br>2. Enter extra costs<br>3. Click on Update Landed Cost button<br> 4. Cost will be added into other charges table of selected PR proportionately based on net total<br>5. Item Valuation Rate will be recalculated</div>"
},
{
"doctype": "DocField",
"fieldname": "section_break0",
"fieldtype": "Section Break",
"options": "Simple"
},
{
"doctype": "DocField",
"label": "From PR Date",
"fieldname": "from_pr_date",
"fieldtype": "Date",
"reqd": 1
},
{
"doctype": "DocField",
"label": "To PR Date",
"fieldname": "to_pr_date",
"fieldtype": "Date",
"reqd": 1
},
{
"doctype": "DocField",
"label": "Currency",
"fieldname": "currency",
"fieldtype": "Select",
"reqd": 1,
"options": "link:Currency"
},
{
"doctype": "DocField",
"label": "Get Purchase Receipt",
"fieldname": "get_purchase_receipt",
"fieldtype": "Button",
"options": "get_purchase_receipts"
},
{
"doctype": "DocField",
"label": "Landed Cost Purchase Receipts",
"fieldname": "lc_pr_details",
"fieldtype": "Table",
"options": "Landed Cost Purchase Receipt"
},
{
"doctype": "DocField",
"fieldname": "section_break1",
"fieldtype": "Section Break",
"options": "Simple"
},
{
"doctype": "DocField",
"label": "Select Landed Cost Items Master",
"fieldname": "landed_cost",
"fieldtype": "Link",
"options": "Landed Cost Master"
},
{
"colour": "White:FFF",
"doctype": "DocField",
"label": "Get Details",
"fieldname": "get_details",
"fieldtype": "Button",
"options": "get_landed_cost_master_details"
},
{
"doctype": "DocField",
"label": "Landed Cost Items",
"fieldname": "landed_cost_details",
"fieldtype": "Table",
"options": "Landed Cost Item"
},
{
"doctype": "DocField",
"label": "Update PR",
"fieldname": "update_pr",
"fieldtype": "Button",
"options": "update_landed_cost"
},
{
"amend": 0,
"create": 1,
"doctype": "DocPerm",
"submit": 0,
"write": 1,
"role": "Purchase Manager",
"cancel": 0,
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "System Manager",
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Purchase User",
"permlevel": 0
},
{
"role": "All",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"role": "System Manager",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"role": "Purchase User",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"role": "Purchase Manager",
"permlevel": 1,
"doctype": "DocPerm"
}
]

View File

@@ -20,11 +20,9 @@ cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) {
cur_frm.fields_dict['item_details'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
console.log(doc.delivery_note);
var query = 'SELECT name, description FROM `tabItem` WHERE name IN ( \
SELECT item_code FROM `tabDelivery Note Item` dnd \
WHERE parent="' + doc.delivery_note + '" AND IFNULL(qty, 0) > IFNULL(packed_qty, 0)) AND %(key)s LIKE "%s" LIMIT 50';
console.log(query);
return query;
}

View File

@@ -1,345 +1,280 @@
# DocType, Packing Slip
[
# These values are common in all dictionaries
{
'creation': '2012-05-15 12:15:08',
'docstatus': 0,
'modified': '2012-06-29 12:24:16',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': u'1328091392',
'autoname': u'PS.#######',
'colour': u'White:FFF',
'description': u'Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.',
'doctype': 'DocType',
'document_type': u'Transaction',
'is_submittable': 1,
'is_transaction_doc': 1,
'module': u'Stock',
'name': '__common__',
'read_only_onload': 1,
'search_fields': u'delivery_note',
'section_style': u'Simple',
'show_in_menu': 0,
'subject': u'[%(delivery_note)s] Case Nos: %(from_case_no)s - %(to_case_no)s | Net Weight: %(net_weight_pkg)s %(net_weight_uom)s | Gross Weight: %(gross_weight_pkg)s %(gross_weight_uom)s',
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Packing Slip',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Packing Slip',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, Packing Slip
{
'doctype': 'DocType',
'name': u'Packing Slip'
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material User',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales User',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Master Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'All'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'packing_slip_details',
'fieldtype': u'Section Break',
'label': u'Packing Slip Items',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'column_break0',
'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'Indicates that the package is a part of this delivery',
'doctype': u'DocField',
'fieldname': u'delivery_note',
'fieldtype': u'Link',
'label': u'Delivery Note',
'options': u'Delivery Note',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'column_break1',
'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'naming_series',
'fieldtype': u'Select',
'label': u'Series',
'no_copy': 0,
'options': u'PS',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'section_break0',
'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'column_break2',
'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'Identification of the package for the delivery (for print)',
'doctype': u'DocField',
'fieldname': u'from_case_no',
'fieldtype': u'Data',
'label': u'From Package No.',
'no_copy': 1,
'permlevel': 0,
'reqd': 1,
'width': u'50px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'column_break3',
'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'If more than one package of the same type (for print)',
'doctype': u'DocField',
'fieldname': u'to_case_no',
'fieldtype': u'Data',
'label': u'To Package No.',
'no_copy': 1,
'permlevel': 0,
'width': u'50px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'package_item_details',
'fieldtype': u'Section Break',
'label': u'Package Item Details',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_details',
'fieldtype': u'Table',
'label': u'Items',
'options': u'Packing Slip Item',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'package_weight_details',
'fieldtype': u'Section Break',
'label': u'Package Weight Details',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'The net weight of this package. (calculated automatically as sum of net weight of items)',
'doctype': u'DocField',
'fieldname': u'net_weight_pkg',
'fieldtype': u'Currency',
'label': u'Net Weight',
'no_copy': 1,
'permlevel': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'net_weight_uom',
'fieldtype': u'Data',
'label': u'Net Weight UOM',
'no_copy': 1,
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'column_break4',
'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'The gross weight of the package. Usually net weight + packaging material weight. (for print)',
'doctype': u'DocField',
'fieldname': u'gross_weight_pkg',
'fieldtype': u'Currency',
'label': u'Gross Weight',
'no_copy': 1,
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'gross_weight_uom',
'fieldtype': u'Link',
'label': u'Gross Weight UOM',
'no_copy': 1,
'options': u'UOM',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'misc_details',
'fieldtype': u'Section Break',
'label': u'Misc Details',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amended_from',
'fieldtype': u'Link',
'label': u'Amended From',
'no_copy': 1,
'options': u'Packing Slip',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'depends_on': u'eval:doc.amended_from',
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'label': u'Amendment Date',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-05-15 12:15:08",
"modified_by": "Administrator",
"modified": "2012-06-29 12:24:16"
},
{
"section_style": "Simple",
"description": "Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.",
"is_submittable": 1,
"search_fields": "delivery_note",
"module": "Stock",
"doctype": "DocType",
"read_only_onload": 1,
"document_type": "Transaction",
"subject": "[%(delivery_note)s] Case Nos: %(from_case_no)s - %(to_case_no)s | Net Weight: %(net_weight_pkg)s %(net_weight_uom)s | Gross Weight: %(gross_weight_pkg)s %(gross_weight_uom)s",
"autoname": "PS.#######",
"name": "__common__",
"colour": "White:FFF",
"is_transaction_doc": 1,
"_last_update": "1328091392",
"show_in_menu": 0,
"version": 1
},
{
"name": "__common__",
"parent": "Packing Slip",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Packing Slip",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Packing Slip",
"doctype": "DocType"
},
{
"amend": 1,
"create": 1,
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Material User",
"cancel": 1,
"permlevel": 0
},
{
"amend": 1,
"create": 1,
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Sales User",
"cancel": 1,
"permlevel": 0
},
{
"amend": 1,
"create": 1,
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Material Master Manager",
"cancel": 1,
"permlevel": 0
},
{
"amend": 1,
"create": 1,
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Material Manager",
"cancel": 1,
"permlevel": 0
},
{
"amend": 1,
"create": 1,
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Sales Manager",
"cancel": 1,
"permlevel": 0
},
{
"role": "All",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"doctype": "DocField",
"label": "Packing Slip Items",
"fieldname": "packing_slip_details",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"doctype": "DocField",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"description": "Indicates that the package is a part of this delivery",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Delivery Note",
"permlevel": 0,
"fieldname": "delivery_note",
"fieldtype": "Link",
"reqd": 1,
"options": "Delivery Note"
},
{
"doctype": "DocField",
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"doctype": "DocField",
"label": "Series",
"permlevel": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"reqd": 1,
"options": "PS"
},
{
"colour": "White:FFF",
"doctype": "DocField",
"fieldname": "section_break0",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"doctype": "DocField",
"fieldname": "column_break2",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"description": "Identification of the package for the delivery (for print)",
"no_copy": 1,
"colour": "White:FFF",
"doctype": "DocField",
"label": "From Package No.",
"width": "50px",
"fieldname": "from_case_no",
"fieldtype": "Data",
"reqd": 1,
"permlevel": 0
},
{
"doctype": "DocField",
"fieldname": "column_break3",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"description": "If more than one package of the same type (for print)",
"no_copy": 1,
"colour": "White:FFF",
"doctype": "DocField",
"label": "To Package No.",
"width": "50px",
"fieldname": "to_case_no",
"fieldtype": "Data",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Package Item Details",
"fieldname": "package_item_details",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"doctype": "DocField",
"options": "Packing Slip Item",
"fieldname": "item_details",
"fieldtype": "Table",
"label": "Items",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Package Weight Details",
"fieldname": "package_weight_details",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"description": "The net weight of this package. (calculated automatically as sum of net weight of items)",
"no_copy": 1,
"colour": "White:FFF",
"doctype": "DocField",
"label": "Net Weight",
"fieldname": "net_weight_pkg",
"fieldtype": "Currency",
"permlevel": 1
},
{
"no_copy": 1,
"colour": "White:FFF",
"doctype": "DocField",
"label": "Net Weight UOM",
"fieldname": "net_weight_uom",
"fieldtype": "Data",
"permlevel": 1
},
{
"doctype": "DocField",
"fieldname": "column_break4",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"description": "The gross weight of the package. Usually net weight + packaging material weight. (for print)",
"no_copy": 1,
"colour": "White:FFF",
"doctype": "DocField",
"label": "Gross Weight",
"fieldname": "gross_weight_pkg",
"fieldtype": "Currency",
"permlevel": 0
},
{
"no_copy": 1,
"colour": "White:FFF",
"doctype": "DocField",
"label": "Gross Weight UOM",
"permlevel": 0,
"fieldname": "gross_weight_uom",
"fieldtype": "Link",
"options": "UOM"
},
{
"colour": "White:FFF",
"doctype": "DocField",
"label": "Misc Details",
"fieldname": "misc_details",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 1,
"doctype": "DocField",
"label": "Amended From",
"permlevel": 1,
"fieldname": "amended_from",
"fieldtype": "Link",
"options": "Packing Slip"
},
{
"print_hide": 1,
"description": "The date at which current entry is corrected in the system.",
"no_copy": 1,
"depends_on": "eval:doc.amended_from",
"doctype": "DocField",
"label": "Amendment Date",
"fieldname": "amendment_date",
"fieldtype": "Date",
"permlevel": 0
}
]

View File

@@ -1,113 +1,90 @@
# DocType, Packing Slip Item
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:34',
'docstatus': 0,
'modified': '2012-03-27 14:36:34',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': u'PSD/.#######',
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'show_in_menu': 0,
'version': 9
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Packing Slip Item',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Packing Slip Item
{
'doctype': 'DocType',
'name': u'Packing Slip Item'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'label': u'Item Code',
'options': u'Item',
'permlevel': 0,
'reqd': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'label': u'Item Name',
'permlevel': 1,
'width': u'200px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Quantity',
'permlevel': 0,
'reqd': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'label': u'UOM',
'permlevel': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'net_weight',
'fieldtype': u'Float',
'label': u'Net Weight',
'permlevel': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'weight_uom',
'fieldtype': u'Link',
'label': u'Weight UOM',
'options': u'UOM',
'permlevel': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'permlevel': 0
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:34",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:34"
},
{
"section_style": "Simple",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"doctype": "DocType",
"version": 9,
"autoname": "PSD/.#######",
"show_in_menu": 0
},
{
"name": "__common__",
"parent": "Packing Slip Item",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "Packing Slip Item",
"doctype": "DocType"
},
{
"permlevel": 0,
"doctype": "DocField",
"label": "Item Code",
"width": "100px",
"fieldname": "item_code",
"fieldtype": "Link",
"reqd": 1,
"options": "Item"
},
{
"doctype": "DocField",
"label": "Item Name",
"width": "200px",
"fieldname": "item_name",
"fieldtype": "Data",
"permlevel": 1
},
{
"doctype": "DocField",
"label": "Quantity",
"width": "100px",
"fieldname": "qty",
"fieldtype": "Currency",
"reqd": 1,
"permlevel": 0
},
{
"doctype": "DocField",
"label": "UOM",
"width": "100px",
"fieldname": "stock_uom",
"fieldtype": "Data",
"permlevel": 1
},
{
"doctype": "DocField",
"label": "Net Weight",
"width": "100px",
"fieldname": "net_weight",
"fieldtype": "Float",
"permlevel": 1
},
{
"doctype": "DocField",
"label": "Weight UOM",
"width": "100px",
"options": "UOM",
"fieldname": "weight_uom",
"fieldtype": "Link",
"permlevel": 1
},
{
"doctype": "DocField",
"label": "Page Break",
"fieldname": "page_break",
"fieldtype": "Check",
"permlevel": 0
}
]

View File

@@ -375,7 +375,11 @@ class DocType(TransactionBase):
def add_bom(self, d):
#----- fetching default bom from Bill of Materials instead of Item Master --
bom_det = sql("select t1.item, t2.item_code, t2.qty_consumed_per_unit, t2.moving_avg_rate, t2.value_as_per_mar, t2.stock_uom, t2.name, t2.description from `tabBOM` t1, `tabBOM Item` t2 where t2.parent = t1.name and t1.item = '%s' and ifnull(t1.is_default,0) = 1 and t1.docstatus = 1 and t2.docstatus =1" % d.item_code)
bom_det = sql("""select t1.item, t2.item_code, t2.qty_consumed_per_unit,
t2.moving_avg_rate, t2.value_as_per_mar, t2.stock_uom, t2.name, t2.description
from `tabBOM` t1, `tabBOM Item` t2
where t2.parent = t1.name and t1.item = %s and t1.is_default = 1
and t1.docstatus = 1 and t2.docstatus =1 and t1.is_active = 1""", d.item_code)
if not bom_det:
msgprint("No default BOM exists for item: %s" % d.item_code)
raise Exception

View File

@@ -1,291 +1,240 @@
# DocType, Sales and Purchase Return Tool
[
# These values are common in all dictionaries
{
u'creation': '2012-09-19 12:24:41',
u'docstatus': 0,
u'modified': '2012-10-02 10:40:14',
u'modified_by': u'Administrator',
u'owner': u'wasim@webnotestech.com'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
u'doctype': u'DocType',
'is_transaction_doc': 0,
'issingle': 1,
'istable': 0,
'menu_index': 1,
'module': u'Stock',
u'name': u'__common__',
'parent_node': u'Materials',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 1,
'version': 1
},
# These values are common for all DocField
{
u'doctype': u'DocField',
u'name': u'__common__',
'parent': u'Sales and Purchase Return Tool',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
u'doctype': u'DocPerm',
u'name': u'__common__',
'parent': u'Sales and Purchase Return Tool',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, Sales and Purchase Return Tool
{
u'doctype': u'DocType',
u'name': u'Sales and Purchase Return Tool'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'return_date',
'fieldtype': u'Date',
'label': u'Return Date',
'no_copy': 1,
'oldfieldname': u'return_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'reqd': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'return_type',
'fieldtype': u'Select',
'label': u'Return Type',
'no_copy': 1,
'oldfieldname': u'return_type',
'oldfieldtype': u'Select',
'options': u'\nSales Return\nPurchase Return',
'permlevel': 0,
'reqd': 1,
'trigger': u'Client'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'delivery_note_no',
'fieldtype': u'Link',
'hidden': 1,
'label': u'Delivery Note No',
'no_copy': 1,
'oldfieldname': u'delivery_note_no',
'oldfieldtype': u'Link',
'options': u'Delivery Note',
'permlevel': 0,
'reqd': 0
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'sales_invoice_no',
'fieldtype': u'Link',
'hidden': 1,
'label': u'Sales Invoice No',
'options': u'Sales Invoice',
'permlevel': 0
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'purchase_receipt_no',
'fieldtype': u'Link',
'hidden': 1,
'label': u'Purchase Receipt No',
'no_copy': 1,
'oldfieldname': u'purchase_receipt_no',
'oldfieldtype': u'Link',
'options': u'Purchase Receipt',
'permlevel': 0
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'cust_supp',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Customer/Supplier',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'cust_supp_name',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Cust/Supp Name',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'cust_supp_address',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Cust/Supp Address',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
u'doctype': u'DocField',
'fieldname': u'get_items',
'fieldtype': u'Button',
'hidden': 1,
'label': u'Get Items',
'oldfieldtype': u'Button',
'permlevel': 0,
'trigger': u'Client'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'return_details',
'fieldtype': u'Table',
'hidden': 1,
'label': u'Sales and Purchase Return Items',
'no_copy': 1,
'oldfieldname': u'return_details',
'oldfieldtype': u'Table',
'options': u'Sales and Purchase Return Item',
'permlevel': 1
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'make_stock_entry',
'fieldtype': u'Button',
'hidden': 1,
'label': u'Make Stock Entry',
'oldfieldtype': u'Button',
'permlevel': 0,
'trigger': u'Client'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'make_excise_invoice',
'fieldtype': u'Button',
'hidden': 1,
'label': u'Make Excise Invoice',
'oldfieldtype': u'Button',
'permlevel': 0,
'trigger': u'Client'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'make_credit_note',
'fieldtype': u'Button',
'hidden': 1,
'label': u'Make Credit Note',
'oldfieldtype': u'Button',
'permlevel': 0,
'trigger': u'Client'
},
# DocField
{
u'doctype': u'DocField',
'fieldname': u'make_debit_note',
'fieldtype': u'Button',
'hidden': 1,
'label': u'Make Debit Note',
'oldfieldtype': u'Button',
'permlevel': 0,
'trigger': u'Client'
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material User',
'submit': 0,
'write': 1
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Manager',
'submit': 0,
'write': 1
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'System Manager',
'submit': 0,
'write': 1
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Accounts Manager',
'write': 1
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Accounts User',
'write': 1
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'All'
}
{
"owner": "wasim@webnotestech.com",
"docstatus": 0,
"creation": "2012-09-19 12:24:41",
"modified_by": "Administrator",
"modified": "2012-10-02 10:40:14"
},
{
"section_style": "Simple",
"istable": 0,
"module": "Stock",
"doctype": "DocType",
"issingle": 1,
"name": "__common__",
"colour": "White:FFF",
"is_transaction_doc": 0,
"server_code_error": " ",
"show_in_menu": 1,
"version": 1,
"menu_index": 1,
"parent_node": "Materials"
},
{
"name": "__common__",
"parent": "Sales and Purchase Return Tool",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Sales and Purchase Return Tool",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Sales and Purchase Return Tool",
"doctype": "DocType"
},
{
"no_copy": 1,
"oldfieldtype": "Date",
"doctype": "DocField",
"label": "Return Date",
"oldfieldname": "return_date",
"fieldname": "return_date",
"fieldtype": "Date",
"reqd": 1,
"permlevel": 0
},
{
"no_copy": 1,
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Return Type",
"oldfieldname": "return_type",
"trigger": "Client",
"fieldname": "return_type",
"fieldtype": "Select",
"reqd": 1,
"options": "\nSales Return\nPurchase Return",
"permlevel": 0
},
{
"no_copy": 1,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Delivery Note No",
"oldfieldname": "delivery_note_no",
"options": "Delivery Note",
"fieldname": "delivery_note_no",
"fieldtype": "Link",
"reqd": 0,
"hidden": 1,
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Sales Invoice No",
"permlevel": 0,
"fieldname": "sales_invoice_no",
"fieldtype": "Link",
"hidden": 1,
"options": "Sales Invoice"
},
{
"no_copy": 1,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Purchase Receipt No",
"oldfieldname": "purchase_receipt_no",
"permlevel": 0,
"fieldname": "purchase_receipt_no",
"fieldtype": "Link",
"hidden": 1,
"options": "Purchase Receipt"
},
{
"print_hide": 1,
"doctype": "DocField",
"label": "Customer/Supplier",
"fieldname": "cust_supp",
"fieldtype": "Data",
"hidden": 1,
"permlevel": 1
},
{
"print_hide": 1,
"doctype": "DocField",
"label": "Cust/Supp Name",
"fieldname": "cust_supp_name",
"fieldtype": "Data",
"hidden": 1,
"permlevel": 1
},
{
"print_hide": 1,
"doctype": "DocField",
"label": "Cust/Supp Address",
"fieldname": "cust_supp_address",
"fieldtype": "Small Text",
"hidden": 1,
"permlevel": 1
},
{
"oldfieldtype": "Button",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Get Items",
"trigger": "Client",
"fieldname": "get_items",
"fieldtype": "Button",
"hidden": 1,
"permlevel": 0
},
{
"no_copy": 1,
"oldfieldtype": "Table",
"doctype": "DocField",
"label": "Sales and Purchase Return Items",
"oldfieldname": "return_details",
"permlevel": 1,
"fieldname": "return_details",
"fieldtype": "Table",
"hidden": 1,
"options": "Sales and Purchase Return Item"
},
{
"oldfieldtype": "Button",
"doctype": "DocField",
"label": "Make Stock Entry",
"trigger": "Client",
"fieldname": "make_stock_entry",
"fieldtype": "Button",
"hidden": 1,
"permlevel": 0
},
{
"oldfieldtype": "Button",
"doctype": "DocField",
"label": "Make Excise Invoice",
"trigger": "Client",
"fieldname": "make_excise_invoice",
"fieldtype": "Button",
"hidden": 1,
"permlevel": 0
},
{
"oldfieldtype": "Button",
"doctype": "DocField",
"label": "Make Credit Note",
"trigger": "Client",
"fieldname": "make_credit_note",
"fieldtype": "Button",
"hidden": 1,
"permlevel": 0
},
{
"oldfieldtype": "Button",
"doctype": "DocField",
"label": "Make Debit Note",
"trigger": "Client",
"fieldname": "make_debit_note",
"fieldtype": "Button",
"hidden": 1,
"permlevel": 0
},
{
"amend": 0,
"create": 1,
"doctype": "DocPerm",
"submit": 0,
"write": 1,
"role": "Material User",
"cancel": 0,
"permlevel": 0
},
{
"amend": 0,
"create": 1,
"doctype": "DocPerm",
"submit": 0,
"write": 1,
"role": "Material Manager",
"cancel": 0,
"permlevel": 0
},
{
"amend": 0,
"create": 1,
"doctype": "DocPerm",
"submit": 0,
"write": 1,
"role": "System Manager",
"cancel": 0,
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Accounts Manager",
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Accounts User",
"permlevel": 0
},
{
"role": "All",
"permlevel": 1,
"doctype": "DocPerm"
}
]

View File

@@ -1,162 +1,131 @@
# DocType, Sales BOM
[
# These values are common in all dictionaries
{
'creation': '2012-07-03 13:30:44',
'docstatus': 0,
'modified': '2012-07-12 18:00:16',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': u'1322549701',
'allow_trash': 1,
'colour': u'White:FFF',
'description': u'Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have "Is Stock Item" as "No" and "Is Sales Item" as "Yes".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Sales BOM Item.\n\nNote: BOM = Bill of Materials',
'doctype': 'DocType',
'document_type': u'Master',
'is_submittable': 0,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Sales BOM',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# These values are common for all DocPerm
{
'amend': 0,
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Sales BOM',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1,
'submit': 0
},
# DocType, Sales BOM
{
'doctype': 'DocType',
'name': u'Sales BOM'
},
# DocPerm
{
'cancel': 0,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material Manager',
'write': 1
},
# DocPerm
{
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Manager',
'write': 1
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material User',
'write': 0
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material User',
'write': 0
},
# DocPerm
{
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales User',
'write': 1
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Sales User',
'write': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'basic_section',
'fieldtype': u'Section Break',
'label': u'Sales BOM Item'
},
# DocField
{
'colour': u'White:FFF',
'description': u'The Item that represents the Package. This Item must have "Is Stock Item" as "No" and "Is Sales Item" as "Yes"',
'doctype': u'DocField',
'fieldname': u'new_item_code',
'fieldtype': u'Link',
'label': u'Parent Item',
'no_copy': 1,
'oldfieldname': u'new_item_code',
'oldfieldtype': u'Data',
'options': u'Item',
'reqd': 1
},
# DocField
{
'colour': u'White:FFF',
'description': u'List items that form the package.',
'doctype': u'DocField',
'fieldname': u'item_section',
'fieldtype': u'Section Break',
'label': u'Package Items'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'sales_bom_items',
'fieldtype': u'Table',
'label': u'Sales BOM Items',
'oldfieldname': u'sales_bom_items',
'oldfieldtype': u'Table',
'options': u'Sales BOM Item',
'reqd': 1
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-07-03 13:30:44",
"modified_by": "Administrator",
"modified": "2012-07-12 18:00:16"
},
{
"section_style": "Simple",
"description": "Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Sales BOM Item.\n\nNote: BOM = Bill of Materials",
"is_submittable": 0,
"module": "Stock",
"doctype": "DocType",
"allow_trash": 1,
"server_code_error": " ",
"document_type": "Master",
"name": "__common__",
"colour": "White:FFF",
"_last_update": "1322549701",
"show_in_menu": 0,
"version": 1
},
{
"name": "__common__",
"parent": "Sales BOM",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Sales BOM",
"read": 1,
"doctype": "DocPerm",
"submit": 0,
"amend": 0,
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Sales BOM",
"doctype": "DocType"
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Material Manager",
"cancel": 0,
"permlevel": 1
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Material Manager",
"cancel": 1,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"role": "Material User",
"cancel": 0,
"permlevel": 1
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"role": "Material User",
"cancel": 0,
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Sales User",
"cancel": 1,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"role": "Sales User",
"cancel": 0,
"permlevel": 1
},
{
"doctype": "DocField",
"fieldname": "basic_section",
"fieldtype": "Section Break",
"label": "Sales BOM Item"
},
{
"description": "The Item that represents the Package. This Item must have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\"",
"no_copy": 1,
"oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Parent Item",
"oldfieldname": "new_item_code",
"fieldname": "new_item_code",
"fieldtype": "Link",
"reqd": 1,
"options": "Item"
},
{
"description": "List items that form the package.",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Package Items",
"fieldname": "item_section",
"fieldtype": "Section Break"
},
{
"oldfieldtype": "Table",
"doctype": "DocField",
"label": "Sales BOM Items",
"oldfieldname": "sales_bom_items",
"fieldname": "sales_bom_items",
"fieldtype": "Table",
"reqd": 1,
"options": "Sales BOM Item"
}
]

View File

@@ -1,102 +1,83 @@
# DocType, Sales BOM Item
[
# These values are common in all dictionaries
{
'creation': '2012-07-03 13:30:46',
'docstatus': 0,
'modified': '2012-07-11 18:56:27',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Sales BOM Item',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Sales BOM Item
{
'doctype': 'DocType',
'name': u'Sales BOM Item'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'label': u'Item',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'reqd': 1,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Qty',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Text',
'permlevel': 0,
'width': u'300px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'rate',
'fieldtype': u'Currency',
'label': u'Rate',
'oldfieldname': u'rate',
'oldfieldtype': u'Currency',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'uom',
'fieldtype': u'Link',
'label': u'UOM',
'oldfieldname': u'uom',
'oldfieldtype': u'Link',
'options': u'UOM',
'permlevel': 1,
'search_index': 0
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-07-03 13:30:46",
"modified_by": "Administrator",
"modified": "2012-07-11 18:56:27"
},
{
"section_style": "Tray",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"show_in_menu": 0,
"version": 1,
"server_code_error": " ",
"doctype": "DocType"
},
{
"name": "__common__",
"parent": "Sales BOM Item",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "Sales BOM Item",
"doctype": "DocType"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Item",
"oldfieldname": "item_code",
"permlevel": 0,
"trigger": "Client",
"fieldname": "item_code",
"fieldtype": "Link",
"reqd": 1,
"options": "Item"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Qty",
"oldfieldname": "qty",
"fieldname": "qty",
"fieldtype": "Currency",
"reqd": 1,
"permlevel": 0
},
{
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Text",
"permlevel": 0
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Rate",
"oldfieldname": "rate",
"fieldname": "rate",
"fieldtype": "Currency",
"permlevel": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "UOM",
"oldfieldname": "uom",
"permlevel": 1,
"fieldname": "uom",
"fieldtype": "Link",
"oldfieldtype": "Link",
"options": "UOM"
}
]

View File

@@ -14,81 +14,77 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.posting_date) doc.posting_date = dateutil.obj_to_str(new Date());
if (!doc.transfer_date) doc.transfer_date = dateutil.obj_to_str(new Date());
if(!doc.purpose) set_multiple(cdt, cdn, {purpose:'Material Issue'});
cfn_set_fields(doc, cdt, cdn);
}
wn.provide("erpnext.stock");
var cfn_set_fields = function(doc, cdt, cdn) {
lst = ['supplier', 'supplier_name', 'supplier_address',
'customer', 'customer_name', 'customer_address'];
if (in_list(['Material Issue', 'Material Transfer', 'Material Receipt', 'Sales Return',
'Purchase Return', 'Production Order', 'Subcontracting', 'Other'], doc.purpose)) {
hide_field(lst);
$(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false);
} else unhide_field(lst);
if (doc.purpose == 'Production Order' || doc.purpose == 'Other') {
unhide_field('get_items');
hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no',
'delivery_note_no', 'sales_invoice_no','warehouse_html',
'transporter', 'is_excisable_goods', 'excisable_goods']);
if (doc.purpose=='Production Order') unhide_field(['production_order', 'process']);
else {
doc.production_order = doc.process = '';
hide_field(['production_order', 'process']);
erpnext.stock.StockEntry = erpnext.utils.Controller.extend({
onload_post_render: function() {
this._super();
if(this.frm.doc.__islocal && (this.frm.doc.production_order || this.frm.doc.bom_no)
&& !getchildren('Stock Entry Detail', this.frm.doc.name, 'mtn_details').length) {
// if production order / bom is mentioned, get items
this.get_items();
}
doc.from_warehouse = '';
doc.to_warehouse = '';
refresh_field(['from_warehosue', 'to_warehouse']);
if (doc.process == 'Backflush' || doc.purpose == 'Other') {
unhide_field('fg_completed_qty');
}
else{
hide_field('fg_completed_qty');
doc.fg_completed_qty = 0;
}
} else {
unhide_field(['from_warehouse', 'to_warehouse']);
hide_field(['production_order', 'process', 'get_items', 'fg_completed_qty',
'purchase_receipt_no','delivery_note_no', 'sales_invoice_no']);
doc.production_order = '';
doc.process = '';
doc.fg_completed_qty = 0;
}
},
refresh: function() {
this._super();
this.toggle_related_fields(this.frm.doc);
if (this.frm.doc.docstatus==1) this.frm.add_custom_button("Show Stock Ledger",
this.show_stock_ledger)
},
get_items: function() {
this.frm.call({
doc: this.frm.doc,
method: "get_items",
callback: function(r) {
if(!r.exc) refresh_field("mtn_details");
}
});
},
qty: function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
d.transfer_qty = flt(d.qty) * flt(d.conversion_factor);
refresh_field('mtn_details');
},
});
cur_frm.cscript = new erpnext.stock.StockEntry({frm: cur_frm});
cur_frm.cscript.toggle_related_fields = function(doc) {
disable_from_warehouse = inList(["Material Receipt", "Sales Return"], doc.purpose);
disable_to_warehouse = inList(["Material Issue", "Purchase Return"], doc.purpose)
cur_frm.toggle_enable("from_warehouse", !disable_from_warehouse);
cur_frm.toggle_enable("to_warehouse", !disable_to_warehouse);
cur_frm.fields_dict["mtn_details"].grid.set_column_disp("s_warehouse", !disable_from_warehouse);
cur_frm.fields_dict["mtn_details"].grid.set_column_disp("t_warehouse", !disable_to_warehouse);
if(doc.purpose == 'Purchase Return') {
doc.customer = doc.customer_name = doc.customer_address =
doc.delivery_note_no = doc.sales_invoice_no = '';
unhide_field(['supplier','supplier_name','supplier_address','purchase_receipt_no']);
$(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
}
else if(doc.purpose == 'Sales Return'){
doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no='';
unhide_field(['customer', 'customer_name', 'customer_address',
'delivery_note_no', 'sales_invoice_no']);
$(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
} else{
doc.delivery_note_no = doc.sales_invoice_no = null;
doc.bom_no = doc.production_order = doc.fg_completed_qty = null;
} else if(doc.purpose == 'Sales Return') {
doc.supplier=doc.supplier_name = doc.supplier_address = doc.purchase_receipt_no=null;
doc.bom_no = doc.production_order = doc.fg_completed_qty = null;
} else {
doc.customer = doc.customer_name = doc.customer_address =
doc.delivery_note_no = doc.sales_invoice_no = doc.supplier =
doc.supplier_name = doc.supplier_address = doc.purchase_receipt_no = '';
doc.supplier_name = doc.supplier_address = doc.purchase_receipt_no = null;
}
refresh_many(lst);
}
//Refresh
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
erpnext.hide_naming_series();
//India related
excise_flds = ['is_excisable_goods', 'excisable_goods', 'under_rule'];
if(wn.control_panel.country == 'India') unhide_field(excise_flds);
else hide_field(excise_flds);
cur_frm.cscript.show_stock_ledger = function() {
var args = {
voucher_no: cur_frm.doc.name,
from_date: wn.datetime.str_to_user(cur_frm.doc.posting_date),
to_date: wn.datetime.str_to_user(cur_frm.doc.posting_date)
};
wn.set_route('stock-ledger',
$.map(args, function(val, key) { return key+"="+val; }).join("&&"));
}
cur_frm.cscript.delivery_note_no = function(doc,cdt,cdn){
@@ -100,7 +96,7 @@ cur_frm.cscript.sales_invoice_no = function(doc,cdt,cdn){
}
cur_frm.cscript.customer = function(doc,cdt,cdn){
if(doc.customer) get_server_fields('get_cust_addr','','',doc,cdt,cdn,1);
if(doc.customer) get_server_fields('get_cust_addr','','',doc,cdt,cdn,1);
}
cur_frm.cscript.purchase_receipt_no = function(doc,cdt,cdn){
@@ -108,48 +104,46 @@ cur_frm.cscript.purchase_receipt_no = function(doc,cdt,cdn){
}
cur_frm.cscript.supplier = function(doc,cdt,cdn){
if(doc.supplier) get_server_fields('get_supp_addr','','',doc,cdt,cdn,1);
if(doc.supplier) get_server_fields('get_supp_addr','','',doc,cdt,cdn,1);
}
cur_frm.fields_dict['production_order'].get_query = function(doc) {
return 'SELECT DISTINCT `tabProduction Order`.`name` FROM `tabProduction Order` WHERE `tabProduction Order`.`docstatus` = 1 AND `tabProduction Order`.`qty` > ifnull(`tabProduction Order`.`produced_qty`,0) AND `tabProduction Order`.`name` like "%s" ORDER BY `tabProduction Order`.`name` DESC LIMIT 50';
return 'select name from `tabProduction Order` \
where docstatus = 1 and qty > ifnull(produced_qty,0) AND %(key)s like "%s%%" \
order by name desc limit 50';
}
cur_frm.cscript.purpose = function(doc, cdt, cdn) {
cfn_set_fields(doc, cdt, cdn);
}
cur_frm.cscript.process = function(doc, cdt, cdn) {
cfn_set_fields(doc, cdt, cdn);
cur_frm.cscript.toggle_related_fields(doc, cdt, cdn);
}
// item code - only if quantity present in source warehosue
//
var fld = cur_frm.fields_dict['mtn_details'].grid.get_field('item_code');
fld.query_description = "If Source Warehouse is selected, only items present in the warehouse with actual qty > 0 will be selected"
fld.query_description = "If Source Warehouse is selected, items with existing stock \
for that warehouse will be selected";
fld.get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(d.s_warehouse) {
return 'SELECT tabItem.name, tabItem.description, tabBin.actual_qty '
+'FROM tabItem, tabBin '
+'WHERE tabItem.name = tabBin.item_code '
+'AND ifnull(`tabBin`.`actual_qty`,0) > 0 '
+'AND tabBin.warehouse="'+ d.s_warehouse +'" '
+'AND tabItem.docstatus < 2 '
+'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC '
+'LIMIT 50'
+ 'FROM tabItem, tabBin '
+ 'WHERE tabItem.name = tabBin.item_code '
+ 'AND ifnull(`tabBin`.`actual_qty`,0) > 0 '
+ 'AND tabBin.warehouse="'+ d.s_warehouse +'" '
+ 'AND tabItem.docstatus < 2 '
+ 'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+ 'AND tabItem.%(key)s LIKE "%s" '
+ 'ORDER BY tabItem.name ASC '
+ 'LIMIT 50'
} else {
return 'SELECT tabItem.name, tabItem.description '
+'FROM tabItem '
+'WHERE tabItem.docstatus < 2 '
+'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC '
+'LIMIT 50'
+ 'FROM tabItem '
+ 'WHERE tabItem.docstatus < 2 '
+ 'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+ 'AND tabItem.%(key)s LIKE "%s" '
+ 'ORDER BY tabItem.name ASC '
+ 'LIMIT 50'
}
}
@@ -195,7 +189,6 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
'warehouse' : cstr(d.s_warehouse) || cstr(d.t_warehouse),
'transfer_qty' : d.transfer_qty,
'serial_no' : d.serial_no,
'fg_item' : d.fg_item,
'bom_no' : d.bom_no
};
get_server_fields('get_item_details',JSON.stringify(args),'mtn_details',doc,cdt,cdn,1);
@@ -208,7 +201,6 @@ cur_frm.cscript.s_warehouse = function(doc, cdt, cdn) {
'warehouse' : cstr(d.s_warehouse) || cstr(d.t_warehouse),
'transfer_qty' : d.transfer_qty,
'serial_no' : d.serial_no,
'fg_item' : d.fg_item,
'bom_no' : d.bom_no
}
get_server_fields('get_warehouse_details', JSON.stringify(args),
@@ -217,19 +209,6 @@ cur_frm.cscript.s_warehouse = function(doc, cdt, cdn) {
cur_frm.cscript.t_warehouse = cur_frm.cscript.s_warehouse;
cur_frm.cscript.transfer_qty = function(doc,cdt,cdn) {
var d = locals[cdt][cdn];
if (doc.from_warehouse && (flt(d.transfer_qty) > flt(d.actual_qty))) {
alert("Transfer Quantity is more than Available Qty");
}
}
cur_frm.cscript.qty = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
set_multiple('Stock Entry Detail', d.name, {'transfer_qty': flt(d.qty) * flt(d.conversion_factor)}, 'mtn_details');
refresh_field('mtn_details');
}
cur_frm.cscript.uom = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(d.uom && d.item_code){

View File

@@ -17,12 +17,12 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, flt, getdate, now
from webnotes.utils import cstr, cint, flt, getdate, now
from webnotes.model import db_exists, delete_doc
from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist, copy_doclist
from webnotes.model.code import get_obj
from webnotes import msgprint
from webnotes import msgprint, _
sql = webnotes.conn.sql
@@ -34,12 +34,250 @@ class DocType(TransactionBase):
self.doclist = doclist
self.item_dict = {}
self.fname = 'mtn_details'
def validate(self):
self.validate_serial_nos()
pro_obj = self.doc.production_order and \
get_obj('Production Order', self.doc.production_order) or None
self.validate_warehouse(pro_obj)
self.validate_production_order(pro_obj)
self.get_stock_and_rate()
self.validate_incoming_rate()
self.validate_bom()
self.validate_finished_goods()
def on_submit(self):
self.update_serial_no(1)
self.update_stock_ledger(0)
# update Production Order
self.update_production_order(1)
def on_cancel(self):
self.update_serial_no(0)
self.update_stock_ledger(1)
# update Production Order
self.update_production_order(0)
def validate_serial_nos(self):
sl_obj = get_obj("Stock Ledger")
sl_obj.scrub_serial_nos(self)
sl_obj.validate_serial_no(self, 'mtn_details')
def validate_warehouse(self, pro_obj):
"""perform various (sometimes conditional) validations on warehouse"""
source_mandatory = ["Material Issue", "Material Transfer", "Purchase Return"]
target_mandatory = ["Material Receipt", "Material Transfer", "Sales Return"]
fg_qty = 0
for d in getlist(self.doclist, 'mtn_details'):
if not d.s_warehouse and not d.t_warehouse:
d.s_warehouse = self.doc.from_warehouse
d.t_warehouse = self.doc.to_warehouse
if not (d.s_warehouse or d.t_warehouse):
msgprint(_("Atleast one warehouse is mandatory"), raise_exception=1)
if self.doc.purpose in source_mandatory:
if not d.s_warehouse:
msgprint(_("Row # ") + "%s: " % cint(d.idx)
+ _("Source Warehouse") + _(" is mandatory"), raise_exception=1)
if self.doc.purpose not in target_mandatory:
d.t_warehouse = None
if self.doc.purpose in target_mandatory:
if not d.t_warehouse:
msgprint(_("Row # ") + "%s: " % cint(d.idx)
+ _("Target Warehouse") + _(" is mandatory"), raise_exception=1)
if self.doc.purpose not in source_mandatory:
d.s_warehouse = None
if self.doc.purpose == "Manufacture/Repack":
if d.bom_no:
d.s_warehouse = None
if not d.t_warehouse:
msgprint(_("Row # ") + "%s: " % cint(d.idx)
+ _("Target Warehouse") + _(" is mandatory"), raise_exception=1)
elif pro_obj and cstr(d.t_warehouse) != pro_obj.doc.fg_warehouse:
msgprint(_("Row # ") + "%s: " % cint(d.idx)
+ _("Target Warehouse") + _(" should be same as that in ")
+ _("Production Order"), raise_exception=1)
else:
d.t_warehouse = None
if not d.s_warehouse:
msgprint(_("Row # ") + "%s: " % cint(d.idx)
+ _("Source Warehouse") + _(" is mandatory"), raise_exception=1)
if d.s_warehouse == d.t_warehouse:
msgprint(_("Source and Target Warehouse cannot be same"), raise_exception=1)
def validate_production_order(self, pro_obj=None):
if not pro_obj:
if self.doc.production_order:
pro_obj = get_obj('Production Order', self.doc.production_order)
else:
return
if self.doc.purpose == "Manufacture/Repack":
if not flt(self.doc.fg_completed_qty):
msgprint(_("Manufacturing Quantity") + _(" is mandatory"), raise_exception=1)
if flt(pro_obj.doc.qty) < (flt(pro_obj.doc.produced_qty)
+ flt(self.doc.fg_completed_qty)):
# do not allow manufacture of qty > production order qty
msgprint(_("For Item ") + pro_obj.doc.production_item
+ _("Quantity already manufactured")
+ " = %s." % flt(pro_obj.doc.produced_qty)
+ _("Hence, maximum allowed Manufacturing Quantity")
+ " = %s." % (flt(pro_obj.doc.qty) - flt(pro_obj.doc.produced_qty)),
raise_exception=1)
elif self.doc.purpose != "Material Transfer":
self.doc.production_order = None
def get_stock_and_rate(self):
"""get stock and incoming rate on posting date"""
for d in getlist(self.doclist, 'mtn_details'):
# get actual stock at source warehouse
d.actual_qty = self.get_as_on_stock(d.item_code, d.s_warehouse or d.t_warehouse,
self.doc.posting_date, self.doc.posting_time)
# get incoming rate
if not flt(d.incoming_rate):
d.incoming_rate = self.get_incoming_rate(d.item_code,
d.s_warehouse or d.t_warehouse, self.doc.posting_date,
self.doc.posting_time, d.transfer_qty, d.serial_no, d.bom_no)
d.amount = flt(d.qty) * flt(d.incoming_rate)
def get_as_on_stock(self, item_code, warehouse, posting_date, posting_time):
"""Get stock qty on any date"""
bin = sql("select name from tabBin where item_code = %s and warehouse = %s",
(item_code, warehouse))
if bin:
prev_sle = get_obj('Bin', bin[0][0]).get_prev_sle(posting_date, posting_time)
return flt(prev_sle.get("bin_aqat")) or 0
else:
return 0
def get_incoming_rate(self, item_code=None, warehouse=None,
posting_date=None, posting_time=None, qty=0, serial_no=None, bom_no=None):
in_rate = 0
if bom_no:
result = webnotes.conn.sql("""select ifnull(total_cost, 0) / ifnull(quantity, 1)
from `tabBOM` where name = %s and docstatus=1 and is_active=1""",
(bom_no,))
in_rate = result and flt(result[0][0]) or 0
elif warehouse:
in_rate = get_obj("Valuation Control").get_incoming_rate(posting_date, posting_time,
item_code, warehouse, qty, serial_no)
return in_rate
def validate_incoming_rate(self):
for d in getlist(self.doclist, 'mtn_details'):
if not flt(d.incoming_rate) and d.t_warehouse:
msgprint("Rate is mandatory for Item: %s at row %s" % (d.item_code, d.idx),
raise_exception=1)
def validate_bom(self):
for d in getlist(self.doclist, 'mtn_details'):
if d.bom_no and not webnotes.conn.sql("""select name from `tabBOM`
where item = %s and name = %s and docstatus = 1 and is_active = 1""",
(d.item_code, d.bom_no)):
msgprint(_("Item") + " %s: " % cstr(d.item_code)
+ _("does not belong to BOM: ") + cstr(d.bom_no)
+ _(" or the BOM is cancelled or inactive"), raise_exception=1)
def validate_finished_goods(self):
"""validation: finished good quantity should be same as manufacturing quantity"""
for d in getlist(self.doclist, 'mtn_details'):
if d.bom_no and flt(d.transfer_qty) != flt(self.doc.fg_completed_qty):
msgprint(_("Row #") + " %s: " % d.idx
+ _("Quantity should be equal to Manufacturing Quantity. ")
+ _("To fetch items again, click on 'Get Items' button \
or update the Quantity manually."), raise_exception=1)
def update_serial_no(self, is_submit):
"""Create / Update Serial No"""
sl_obj = get_obj('Stock Ledger')
if is_submit:
sl_obj.validate_serial_no_warehouse(self, 'mtn_details')
for d in getlist(self.doclist, 'mtn_details'):
if d.serial_no:
serial_nos = sl_obj.get_sr_no_list(d.serial_no)
for x in serial_nos:
serial_no = x.strip()
if d.s_warehouse:
sl_obj.update_serial_delivery_details(self, d, serial_no, is_submit)
if d.t_warehouse:
sl_obj.update_serial_purchase_details(self, d, serial_no, is_submit,
self.doc.purpose)
if self.doc.purpose == 'Purchase Return':
#delete_doc("Serial No", serial_no)
serial_doc = Document("Serial No", serial_no)
serial_doc.status = is_submit and 'Purchase Returned' or 'In Store'
serial_doc.docstatus = is_submit and 2 or 0
serial_doc.save()
def update_stock_ledger(self, is_cancelled=0):
self.values = []
for d in getlist(self.doclist, 'mtn_details'):
if cstr(d.s_warehouse):
self.add_to_values(d, cstr(d.s_warehouse), -flt(d.transfer_qty), is_cancelled)
if cstr(d.t_warehouse):
self.add_to_values(d, cstr(d.t_warehouse), flt(d.transfer_qty), is_cancelled)
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values,
self.doc.amended_from and 'Yes' or 'No')
def update_production_order(self, is_submit):
if self.doc.production_order:
# first perform some validations
# (they are here coz this fn is also called during on_cancel)
pro_obj = get_obj("Production Order", self.doc.production_order)
if flt(pro_obj.doc.docstatus) != 1:
msgprint("""You cannot do any transaction against
Production Order : %s, as it's not submitted"""
% (pro_obj.doc.name), raise_exception=1)
if pro_obj.doc.status == 'Stopped':
msgprint("""You cannot do any transaction against Production Order : %s,
as it's status is 'Stopped'"""% (pro_obj.doc.name), raise_exception=1)
# update bin
if self.doc.purpose == "Manufacture/Repack":
pro_obj.doc.produced_qty = flt(pro_obj.doc.produced_qty) + \
(is_submit and 1 or -1 ) * flt(self.doc.fg_completed_qty)
args = {
"item_code": pro_obj.doc.production_item,
"posting_date": self.doc.posting_date,
"planned_qty": (is_submit and -1 or 1 ) * flt(self.doc.fg_completed_qty)
}
get_obj('Warehouse', pro_obj.doc.fg_warehouse).update_bin(args)
# update production order status
pro_obj.doc.status = (flt(pro_obj.doc.qty)==flt(pro_obj.doc.produced_qty)) \
and 'Completed' or 'In Process'
pro_obj.doc.save()
def get_item_details(self, arg):
import json
arg, actual_qty, in_rate = json.loads(arg), 0, 0
item = sql("select stock_uom, description, item_name from `tabItem` where name = %s and (ifnull(end_of_life,'')='' or end_of_life ='0000-00-00' or end_of_life > now())", (arg.get('item_code')), as_dict = 1)
item = sql("""select stock_uom, description, item_name from `tabItem`
where name = %s and (ifnull(end_of_life,'')='' or end_of_life ='0000-00-00'
or end_of_life > now())""", (arg.get('item_code')), as_dict = 1)
if not item:
msgprint("Item is not active", raise_exception=1)
@@ -59,12 +297,13 @@ class DocType(TransactionBase):
ret.update(stock_and_rate)
return ret
def get_uom_details(self, arg = ''):
arg, ret = eval(arg), {}
uom = sql("select conversion_factor from `tabUOM Conversion Detail` where parent = %s and uom = %s", (arg['item_code'],arg['uom']), as_dict = 1)
uom = sql("""select conversion_factor from `tabUOM Conversion Detail`
where parent = %s and uom = %s""", (arg['item_code'], arg['uom']), as_dict = 1)
if not uom:
msgprint("There is no Conversion Factor for UOM '%s' in Item '%s'" % (arg['uom'], arg['item_code']))
msgprint("There is no Conversion Factor for UOM '%s' in Item '%s'" % (arg['uom'],
arg['item_code']))
ret = {'uom' : ''}
else:
ret = {
@@ -79,58 +318,88 @@ class DocType(TransactionBase):
ret = {
"actual_qty" : self.get_as_on_stock(arg.get('item_code'), arg.get('warehouse'),
self.doc.posting_date, self.doc.posting_time),
"incoming_rate" : self.get_incoming_rate(arg.get('item_code'),
"incoming_rate" : self.get_incoming_rate(arg.get('item_code'),
arg.get('warehouse'), self.doc.posting_date, self.doc.posting_time,
arg.get('transfer_qty'), arg.get('serial_no'), arg.get('fg_item'),
arg.get('bom_no')) or 0
arg.get('transfer_qty'), arg.get('serial_no'), arg.get('bom_no')) or 0
}
return ret
def get_stock_and_rate(self, bom_no = ''):
""" get stock and incoming rate on posting date"""
for d in getlist(self.doclist, 'mtn_details'):
# assign parent warehouse
d.s_warehouse = cstr(d.s_warehouse) or self.doc.purpose != 'Production Order' \
and self.doc.from_warehouse or ''
d.t_warehouse = cstr(d.t_warehouse) or self.doc.purpose != 'Production Order' \
and self.doc.to_warehouse or ''
# get current stock at source warehouse
d.actual_qty = self.get_as_on_stock(d.item_code, d.s_warehouse or d.t_warehouse,
self.doc.posting_date, self.doc.posting_time) or 0
# get incoming rate
if not flt(d.incoming_rate):
d.incoming_rate = self.get_incoming_rate(d.item_code,
d.s_warehouse or d.t_warehouse, self.doc.posting_date,
self.doc.posting_time, d.transfer_qty, d.serial_no,
d.fg_item, d.bom_no or bom_no)
def get_as_on_stock(self, item, wh, dt, tm):
"""Get stock qty on any date"""
bin = sql("select name from tabBin where item_code = %s and warehouse = %s", (item, wh))
bin_id = bin and bin[0][0] or ''
prev_sle = bin_id and get_obj('Bin', bin_id).get_prev_sle(dt, tm) or {}
qty = flt(prev_sle.get('bin_aqat', 0))
return qty
def get_incoming_rate(self, item, wh, dt, tm, qty=0, serial_no='', fg_item=0, bom_no=''):
in_rate = 0
if fg_item and bom_no:
in_rate = webnotes.conn.sql("""select ifnull(total_cost, 0) / ifnull(quantity, 1)
from `tabBOM` where name = %s and docstatus=1""", bom_no, debug=1)
in_rate = in_rate and in_rate[0][0] or 0
elif wh:
in_rate = get_obj('Valuation Control').get_incoming_rate(dt, tm,
item, wh, qty, serial_no)
return in_rate
def get_items(self):
self.doclist = self.doc.clear_table(self.doclist, 'mtn_details', 1)
if self.doc.production_order:
# common validations
pro_obj = get_obj('Production Order', self.doc.production_order)
if pro_obj:
self.validate_production_order(pro_obj)
self.doc.bom_no = pro_obj.doc.bom_no
self.doc.fg_completed_qty = (self.doc.purpose == "Manufacture/Repack") \
and flt(self.doc.fg_completed_qty) \
or flt(pro_obj.doc.qty) - flt(pro_obj.doc.produced_qty)
else:
# invalid production order
self.doc.production_order = None
if self.doc.bom_no:
if self.doc.purpose in ["Material Issue", "Material Transfer", "Manufacture/Repack",
"Subcontract"]:
self.get_raw_materials()
# add raw materials to Stock Entry Detail table
self.add_to_stock_entry_detail(self.doc.from_warehouse, self.doc.to_warehouse,
self.item_dict)
# add finished good item to Stock Entry Detail table -- along with bom_no
if self.doc.production_order and self.doc.purpose == "Manufacture/Repack":
self.add_to_stock_entry_detail(None, pro_obj.doc.fg_warehouse, {
cstr(pro_obj.doc.production_item):
[self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]
}, bom_no=pro_obj.doc.bom_no)
elif self.doc.purpose in ["Material Receipt", "Manufacture/Repack"]:
item = webnotes.conn.sql("""select item, description, uom from `tabBOM`
where name=%s""", (self.doc.bom_no,), as_dict=1)
self.add_to_stock_entry_detail(None, self.doc.to_warehouse, {
item[0]["item"] :
[self.doc.fg_completed_qty, item[0]["description"], item[0]["uom"]]
}, bom_no=self.doc.bom_no)
self.get_stock_and_rate()
def get_raw_materials(self):
"""
get all items from flat bom except
child items of sub-contracted and sub assembly items
and sub assembly items itself.
"""
if self.doc.use_multi_level_bom:
# get all raw materials with sub assembly childs
fl_bom_sa_child_item = sql("""select
item_code,ifnull(sum(qty_consumed_per_unit),0)*%s as qty,description,stock_uom
from ( select distinct fb.name, fb.description, fb.item_code,
fb.qty_consumed_per_unit, fb.stock_uom
from `tabBOM Explosion Item` fb,`tabItem` it
where it.name = fb.item_code and ifnull(it.is_pro_applicable, 'No') = 'No'
and ifnull(it.is_sub_contracted_item, 'No') = 'No' and fb.docstatus<2
and fb.parent=%s
) a
group by item_code, stock_uom""" , (self.doc.fg_completed_qty, self.doc.bom_no))
self.make_items_dict(fl_bom_sa_child_item)
else:
# Get all raw materials considering multi level BOM,
# if multi level bom consider childs of Sub-Assembly items
fl_bom_sa_items = sql("""select item_code, ifnull(sum(qty_consumed_per_unit), 0) * '%s',
description, stock_uom from `tabBOM Item`
where parent = '%s' and docstatus < 2
group by item_code""" % (self.doc.fg_completed_qty, self.doc.bom_no))
self.make_items_dict(fl_bom_sa_items)
# Update only qty remaining to be issued for production
if self.doc.purpose == 'Material Transfer' and self.doc.production_order:
self.update_only_remaining_qty()
def make_items_dict(self, items_list):
"""makes dict of unique items with it's qty"""
for i in items_list:
@@ -138,15 +407,16 @@ class DocType(TransactionBase):
self.item_dict[i[0]][0] = flt(self.item_dict[i[0]][0]) + flt(i[1])
else:
self.item_dict[i[0]] = [flt(i[1]), cstr(i[2]), cstr(i[3])]
def update_only_remaining_qty(self):
""" Only pending raw material to be issued to shop floor """
already_issued_item = {}
for t in sql("""select t1.item_code, sum(t1.qty) from `tabStock Entry Detail` t1, `tabStock Entry` t2
where t1.parent = t2.name and t2.production_order = %s and t2.process = 'Material Transfer'
and t2.docstatus = 1 group by t1.item_code""", self.doc.production_order):
result = sql("""select t1.item_code, sum(t1.qty)
from `tabStock Entry Detail` t1, `tabStock Entry` t2
where t1.parent = t2.name and t2.production_order = %s and t2.docstatus = 1
and t2.purpose = 'Material Transfer'
group by t1.item_code""", self.doc.production_order)
for t in result:
already_issued_item[t[0]] = flt(t[1])
for d in self.item_dict.keys():
@@ -154,367 +424,38 @@ class DocType(TransactionBase):
if self.item_dict[d][0] <= 0:
del self.item_dict[d]
def get_raw_materials(self, bom_no, fg_qty, use_multi_level_bom):
"""
get all items from flat bom except
child items of sub-contracted and sub assembly items
and sub assembly items itself.
"""
if use_multi_level_bom:
# get all raw materials with sub assembly childs
fl_bom_sa_child_item = sql("""
select
item_code,ifnull(sum(qty_consumed_per_unit),0)*%s as qty,description,stock_uom
from
(
select distinct fb.name, fb.description, fb.item_code, fb.qty_consumed_per_unit, fb.stock_uom
from `tabBOM Explosion Item` fb,`tabItem` it
where it.name = fb.item_code and ifnull(it.is_pro_applicable, 'No') = 'No'
and ifnull(it.is_sub_contracted_item, 'No') = 'No' and fb.docstatus<2 and fb.parent=%s
) a
group by item_code,stock_uom
""" , (fg_qty, bom_no))
self.make_items_dict(fl_bom_sa_child_item)
else:
# Get all raw materials considering multi level BOM,
# if multi level bom consider childs of Sub-Assembly items
fl_bom_sa_items = sql("""
select item_code, ifnull(sum(qty_consumed_per_unit), 0) * '%s', description, stock_uom
from `tabBOM Item`
where parent = '%s' and docstatus < 2
group by item_code
""" % (fg_qty, bom_no))
self.make_items_dict(fl_bom_sa_items)
# Update only qty remaining to be issued for production
if self.doc.process == 'Material Transfer':
self.update_only_remaining_qty()
def add_to_stock_entry_detail(self, source_wh, target_wh, item_dict, fg_item = 0, bom_no = ''):
def add_to_stock_entry_detail(self, source_wh, target_wh, item_dict, bom_no=None):
for d in item_dict:
se_child = addchild(self.doc, 'mtn_details', 'Stock Entry Detail', 0, self.doclist)
se_child.s_warehouse = source_wh
se_child.t_warehouse = target_wh
se_child.fg_item = fg_item
se_child.item_code = cstr(d)
se_child.description = item_dict[d][1]
se_child.uom = item_dict[d][2]
se_child.stock_uom = item_dict[d][2]
se_child.reqd_qty = flt(item_dict[d][0])
se_child.qty = flt(item_dict[d][0])
se_child.transfer_qty = flt(item_dict[d][0])
se_child.conversion_factor = 1.00
if fg_item: se_child.bom_no = bom_no
def validate_bom_no(self):
if self.doc.bom_no:
if not webnotes.conn.sql("""select name from tabBOM where name = %s and docstatus = 1
and ifnull(is_active, 'No') = 'Yes'""", self.doc.bom_no):
msgprint("""BOM: %s not found, may be it has been cancelled or inactivated""" %
self.doc.bom_no, raise_exception=1)
if not self.doc.fg_completed_qty:
msgprint("Please enter FG Completed Qty", raise_exception=1)
def get_items(self):
if self.doc.purpose == 'Production Order':
pro_obj = self.doc.production_order and get_obj('Production Order', self.doc.production_order) or ''
self.validate_for_production_order(pro_obj)
bom_no = pro_obj.doc.bom_no
fg_qty = (self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) \
or flt(pro_obj.doc.qty)
use_multi_level_bom = pro_obj.doc.use_multi_level_bom
elif self.doc.purpose == 'Other':
self.validate_bom_no()
bom_no = self.doc.bom_no
fg_qty = self.doc.fg_completed_qty
use_multi_level_bom = self.doc.use_multi_level_bom
self.get_raw_materials(bom_no, fg_qty, use_multi_level_bom)
self.doclist = self.doc.clear_table(self.doclist, 'mtn_details', 1)
sw = (self.doc.process == 'Backflush') and cstr(pro_obj.doc.wip_warehouse) or ''
tw = (self.doc.process == 'Material Transfer') and cstr(pro_obj.doc.wip_warehouse) or ''
self.add_to_stock_entry_detail(sw, tw, self.item_dict)
fg_item_dict = {}
if self.doc.process == 'Backflush':
sw = ''
tw = cstr(pro_obj.doc.fg_warehouse)
fg_item_dict = {
cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty,
pro_obj.doc.description, pro_obj.doc.stock_uom]
}
elif self.doc.purpose == 'Other' and self.doc.bom_no:
sw, tw = '', ''
item = sql("select item, description, uom from `tabBOM` where name = %s", self.doc.bom_no, as_dict=1)
fg_item_dict = {
item[0]['item'] : [self.doc.fg_completed_qty,
item[0]['description'], item[0]['uom']]
}
if fg_item_dict:
self.add_to_stock_entry_detail(sw, tw, fg_item_dict, fg_item = 1, bom_no = bom_no)
self.get_stock_and_rate()
def validate_transfer_qty(self):
for d in getlist(self.doclist, 'mtn_details'):
if flt(d.transfer_qty) <= 0:
msgprint("Transfer Quantity can not be less than or equal to zero \
at Row No " + cstr(d.idx), raise_exception=1)
def calc_amount(self):
total_amount = 0
for d in getlist(self.doclist, 'mtn_details'):
d.amount = flt(d.transfer_qty) * flt(d.incoming_rate)
total_amount += flt(d.amount)
self.doc.total_amount = flt(total_amount)
if bom_no: se_child.bom_no = bom_no
def add_to_values(self, d, wh, qty, is_cancelled):
self.values.append({
'item_code' : d.item_code,
'warehouse' : wh,
'transaction_date' : self.doc.transfer_date,
'posting_date' : self.doc.posting_date,
'posting_time' : self.doc.posting_time,
'voucher_type' : 'Stock Entry',
'voucher_no' : self.doc.name,
'voucher_detail_no' : d.name,
'actual_qty' : qty,
'incoming_rate' : flt(d.incoming_rate) or 0,
'stock_uom' : d.stock_uom,
'company' : self.doc.company,
'fiscal_year' : self.doc.fiscal_year,
'is_cancelled' : (is_cancelled ==1) and 'Yes' or 'No',
'batch_no' : d.batch_no,
'serial_no' : d.serial_no
'item_code': d.item_code,
'warehouse': wh,
'posting_date': self.doc.posting_date,
'posting_time': self.doc.posting_time,
'voucher_type': 'Stock Entry',
'voucher_no': self.doc.name,
'voucher_detail_no': d.name,
'actual_qty': qty,
'incoming_rate': flt(d.incoming_rate) or 0,
'stock_uom': d.stock_uom,
'company': self.doc.company,
'is_cancelled': (is_cancelled ==1) and 'Yes' or 'No',
'batch_no': d.batch_no,
'serial_no': d.serial_no
})
def update_stock_ledger(self, is_cancelled=0):
self.values = []
for d in getlist(self.doclist, 'mtn_details'):
if cstr(d.s_warehouse):
self.add_to_values(d, cstr(d.s_warehouse), -flt(d.transfer_qty), is_cancelled)
if cstr(d.t_warehouse):
self.add_to_values(d, cstr(d.t_warehouse), flt(d.transfer_qty), is_cancelled)
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values, self.doc.amended_from and 'Yes' or 'No')
def validate_for_production_order(self, pro_obj):
if self.doc.purpose == 'Production Order' or self.doc.process or self.doc.production_order:
if self.doc.purpose != 'Production Order':
msgprint("Purpose should be 'Production Order'.")
raise Exception
if not self.doc.process:
msgprint("Process Field is mandatory.")
raise Exception
if self.doc.process == 'Backflush' and not flt(self.doc.fg_completed_qty):
msgprint("FG Completed Qty is mandatory as the process selected is 'Backflush'")
raise Exception
if self.doc.process == 'Material Transfer' and flt(self.doc.fg_completed_qty):
msgprint("FG Completed Qty should be zero. As the Process selected is 'Material Transfer'.")
raise Exception
if not self.doc.production_order:
msgprint("Production Order field is mandatory")
raise Exception
if flt(pro_obj.doc.qty) < flt(pro_obj.doc.produced_qty) + flt(self.doc.fg_completed_qty) :
msgprint("error:Already Produced Qty for %s is %s and maximum allowed Qty is %s" % (pro_obj.doc.production_item, cstr(pro_obj.doc.produced_qty) or 0.00 , cstr(pro_obj.doc.qty)))
raise Exception
def validate(self):
sl_obj = get_obj("Stock Ledger", "Stock Ledger")
sl_obj.scrub_serial_nos(self)
sl_obj.validate_serial_no(self, 'mtn_details')
pro_obj = ''
if self.doc.production_order:
pro_obj = get_obj('Production Order', self.doc.production_order)
self.validate_for_production_order(pro_obj)
self.get_stock_and_rate(pro_obj and pro_obj.doc.bom_no or '')
self.validate_warehouse(pro_obj)
self.validate_incoming_rate()
self.validate_bom_belongs_to_item()
self.calc_amount()
get_obj('Sales Common').validate_fiscal_year(self.doc.fiscal_year,
self.doc.posting_date, 'Posting Date')
if self.doc.purpose == 'Other':
self.validate_bom_no()
# If target warehouse exists, incoming rate is mandatory
# --------------------------------------------------------
def validate_incoming_rate(self):
for d in getlist(self.doclist, 'mtn_details'):
if not flt(d.incoming_rate) and d.t_warehouse:
msgprint("Rate is mandatory for Item: %s at row %s" % (d.item_code, d.idx), raise_exception=1)
def validate_bom_belongs_to_item(self):
for d in getlist(self.doclist, 'mtn_details'):
if d.bom_no and not webnotes.conn.sql("""\
SELECT name FROM `tabBOM`
WHERE item = %s and name = %s
""", (d.item_code, d.bom_no)):
msgprint("BOM %s does not belong to Item: %s at row %s" % (d.bom_no, d.item_code, d.idx), raise_exception=1)
# Validate warehouse
# -----------------------------------
def validate_warehouse(self, pro_obj):
fg_qty = 0
for d in getlist(self.doclist, 'mtn_details'):
if not d.s_warehouse and not d.t_warehouse:
d.s_warehouse = self.doc.from_warehouse
d.t_warehouse = self.doc.to_warehouse
if not (d.s_warehouse or d.t_warehouse):
msgprint("Atleast one warehouse is mandatory for Stock Entry ")
raise Exception
if d.s_warehouse and not sql("select name from tabWarehouse where name = '%s'" % d.s_warehouse):
msgprint("Invalid Warehouse: %s" % self.doc.s_warehouse)
raise Exception
if d.t_warehouse and not sql("select name from tabWarehouse where name = '%s'" % d.t_warehouse):
msgprint("Invalid Warehouse: %s" % self.doc.t_warehouse)
raise Exception
if d.s_warehouse == d.t_warehouse:
msgprint("Source and Target Warehouse Cannot be Same.")
raise Exception
if self.doc.purpose == 'Material Issue':
if not cstr(d.s_warehouse):
msgprint("Source Warehouse is Mandatory for Purpose => 'Material Issue'")
raise Exception
if cstr(d.t_warehouse):
msgprint("Target Warehouse is not Required for Purpose => 'Material Issue'")
raise Exception
if self.doc.purpose == 'Material Transfer':
if not cstr(d.s_warehouse) or not cstr(d.t_warehouse):
msgprint("Source Warehouse and Target Warehouse both are Mandatory for Purpose => 'Material Transfer'")
raise Exception
if self.doc.purpose == 'Material Receipt':
if not cstr(d.t_warehouse):
msgprint("Target Warehouse is Mandatory for Purpose => 'Material Receipt'")
raise Exception
if cstr(d.s_warehouse):
msgprint("Source Warehouse is not Required for Purpose => 'Material Receipt'")
raise Exception
if self.doc.process == 'Material Transfer':
if cstr(d.t_warehouse) != (pro_obj.doc.wip_warehouse):
msgprint(" Target Warehouse should be same as WIP Warehouse %s in Production Order %s at Row No %s" % (cstr(pro_obj.doc.wip_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)) )
raise Exception
if not cstr(d.s_warehouse):
msgprint("Please Enter Source Warehouse at Row No %s." % (cstr(d.idx)))
raise Exception
if self.doc.process == 'Backflush':
if flt(d.fg_item):
if cstr(pro_obj.doc.production_item) != cstr(d.item_code):
msgprint("Item %s in Stock Entry Detail as Row No %s do not match with Item %s in Production Order %s" % (cstr(d.item_code), cstr(d.idx), cstr(pro_obj.doc.production_item), cstr(pro_obj.doc.name)))
raise Exception
if cstr(d.t_warehouse) != cstr(pro_obj.doc.fg_warehouse):
msgprint("As Item %s is FG Item. Target Warehouse should be same as FG Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.fg_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
raise Exception
if cstr(d.s_warehouse):
msgprint("As Item %s is a FG Item. There should be no Source Warehouse at Row No %s" % (cstr(d.item_code), cstr(d.idx)))
raise Exception
if not flt(d.fg_item):
if cstr(d.t_warehouse):
msgprint("As Item %s is not a FG Item. There should no Tareget Warehouse at Row No %s" % (cstr(d.item_code), cstr(d.idx)))
raise Exception
if cstr(d.s_warehouse) != cstr(pro_obj.doc.wip_warehouse):
msgprint("As Item %s is Raw Material. Source Warehouse should be same as WIP Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.wip_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
raise Exception
if d.fg_item and (self.doc.purpose == 'Other' or self.doc.process == 'Backflush'):
fg_qty = flt(fg_qty) + flt(d.transfer_qty)
d.save()
if self.doc.fg_completed_qty and flt(self.doc.fg_completed_qty) != flt(fg_qty):
msgprint("The Total of FG Qty %s in Stock Entry Detail do not match with FG Completed Qty %s" % (flt(fg_qty), flt(self.doc.fg_completed_qty)))
raise Exception
def update_production_order(self, is_submit):
if self.doc.production_order:
pro_obj = get_obj("Production Order", self.doc.production_order)
if flt(pro_obj.doc.docstatus) != 1:
msgprint("""You cannot do any transaction against
Production Order : %s, as it's not submitted"""
% (pro_obj.doc.name), raise_exception=1)
if pro_obj.doc.status == 'Stopped':
msgprint("""You cannot do any transaction against Production Order : %s,
as it's status is 'Stopped'"""% (pro_obj.doc.name), raise_exception=1)
if getdate(pro_obj.doc.posting_date) > getdate(self.doc.posting_date):
msgprint("""Posting Date of Stock Entry cannot be before Posting Date of
Production Order: %s"""% cstr(self.doc.production_order), raise_exception=1)
if self.doc.process == 'Backflush':
pro_obj.doc.produced_qty = flt(pro_obj.doc.produced_qty) + \
(is_submit and 1 or -1 ) * flt(self.doc.fg_completed_qty)
args = {
"item_code": pro_obj.doc.production_item,
"posting_date": self.doc.posting_date,
"planned_qty": (is_submit and -1 or 1 ) * flt(self.doc.fg_completed_qty)
}
get_obj('Warehouse', pro_obj.doc.fg_warehouse).update_bin(args)
pro_obj.doc.status = (flt(pro_obj.doc.qty)==flt(pro_obj.doc.produced_qty)) \
and 'Completed' or 'In Process'
pro_obj.doc.save()
# Create / Update Serial No
# ----------------------------------
def update_serial_no(self, is_submit):
sl_obj = get_obj('Stock Ledger')
if is_submit:
sl_obj.validate_serial_no_warehouse(self, 'mtn_details')
for d in getlist(self.doclist, 'mtn_details'):
if d.serial_no:
serial_nos = sl_obj.get_sr_no_list(d.serial_no)
for x in serial_nos:
serial_no = x.strip()
if d.s_warehouse:
sl_obj.update_serial_delivery_details(self, d, serial_no, is_submit)
if d.t_warehouse:
sl_obj.update_serial_purchase_details(self, d, serial_no, is_submit, self.doc.purpose)
if self.doc.purpose == 'Purchase Return':
#delete_doc("Serial No", serial_no)
serial_doc = Document("Serial No", serial_no)
serial_doc.status = is_submit and 'Purchase Returned' or 'In Store'
serial_doc.docstatus = is_submit and 2 or 0
serial_doc.save()
def on_submit(self):
self.validate_transfer_qty()
# Check for Approving Authority
get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.total_amount)
self.update_serial_no(1)
self.update_stock_ledger(0)
# update Production Order
self.update_production_order(1)
def on_cancel(self):
self.update_serial_no(0)
self.update_stock_ledger(1)
# update Production Order
self.update_production_order(0)
def get_cust_values(self):
"""fetches customer details"""
if self.doc.delivery_note_no:
@@ -548,7 +489,8 @@ class DocType(TransactionBase):
return result and result[0] or {}
def get_supp_addr(self):
res = sql("select supplier_name,address from `tabSupplier` where name = '%s'"%self.doc.supplier)
res = sql("""select supplier_name from `tabSupplier`
where name=%s""", self.doc.supplier)
addr = self.get_address_text(supplier = self.doc.supplier)
ret = {
'supplier_name' : res and res[0][0] or '',

View File

@@ -2,9 +2,9 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-11-28 11:26:22",
"creation": "2012-12-19 12:29:07",
"modified_by": "Administrator",
"modified": "2012-12-03 12:00:59"
"modified": "2012-12-19 18:09:15"
},
{
"is_submittable": 1,
@@ -59,7 +59,6 @@
"description": "To manage multiple series please go to Setup > Manage Series",
"no_copy": 1,
"oldfieldtype": "Select",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Series",
@@ -76,222 +75,23 @@
},
{
"print_hide": 0,
"permlevel": 0,
"no_copy": 0,
"oldfieldtype": "Select",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Purpose",
"oldfieldname": "purpose",
"permlevel": 0,
"trigger": "Client",
"default": "Material Issue",
"fieldname": "purpose",
"fieldtype": "Select",
"search_index": 0,
"reqd": 1,
"hidden": 0,
"options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order\nOther",
"options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nManufacture/Repack\nSubcontract\nSales Return\nPurchase Return",
"report_hide": 0,
"in_filter": 1
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Link",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Delivery Note No",
"oldfieldname": "delivery_note_no",
"permlevel": 0,
"trigger": "Client",
"fieldname": "delivery_note_no",
"fieldtype": "Link",
"search_index": 1,
"reqd": 0,
"hidden": 1,
"options": "Delivery Note",
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Link",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Purchase Receipt No",
"oldfieldname": "purchase_receipt_no",
"permlevel": 0,
"trigger": "Client",
"fieldname": "purchase_receipt_no",
"fieldtype": "Link",
"search_index": 1,
"reqd": 0,
"hidden": 1,
"options": "Purchase Receipt",
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"doctype": "DocField",
"label": "Sales Invoice No",
"options": "Sales Invoice",
"fieldname": "sales_invoice_no",
"fieldtype": "Link",
"hidden": 1,
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Select",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Process",
"oldfieldname": "process",
"permlevel": 0,
"trigger": "Client",
"fieldname": "process",
"fieldtype": "Select",
"search_index": 0,
"reqd": 0,
"hidden": 1,
"options": "\nMaterial Transfer\nBackflush",
"report_hide": 0,
"in_filter": 1
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Link",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Production Order",
"oldfieldname": "production_order",
"permlevel": 0,
"trigger": "Client",
"fieldname": "production_order",
"fieldtype": "Link",
"search_index": 1,
"reqd": 0,
"hidden": 1,
"options": "Production Order",
"report_hide": 0,
"in_filter": 1
},
{
"depends_on": "eval:doc.purpose == 'Other'",
"doctype": "DocField",
"label": "BOM No",
"options": "BOM",
"fieldname": "bom_no",
"fieldtype": "Link",
"permlevel": 0
},
{
"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.",
"depends_on": "eval:doc.purpose == 'Other'",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Use Multi-Level BOM",
"fieldname": "use_multi_level_bom",
"fieldtype": "Check",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Currency",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "FG Completed Qty",
"oldfieldname": "fg_completed_qty",
"trigger": "Client",
"fieldname": "fg_completed_qty",
"fieldtype": "Currency",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"permlevel": 0,
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Button",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Get Items",
"permlevel": 0,
"fieldname": "get_items",
"fieldtype": "Button",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"options": "get_items",
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "HTML",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Warehouse HTML",
"options": "<div class='columnHeading'>Warehouse</div>",
"fieldname": "warehouse_html",
"fieldtype": "HTML",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Link",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Source Warehouse",
"oldfieldname": "from_warehouse",
"permlevel": 0,
"trigger": "Client",
"fieldname": "from_warehouse",
"fieldtype": "Link",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"options": "Warehouse",
"report_hide": 0,
"in_filter": 0
},
{
"no_copy": 0,
"oldfieldtype": "Link",
"oldfieldname": "to_warehouse",
"reqd": 0,
"in_filter": 0,
"print_hide": 1,
"label": "Target Warehouse",
"trigger": "Client",
"hidden": 0,
"permlevel": 0,
"description": "<b>Notes:</b> Either Source or Target is Mandatory",
"search_index": 0,
"allow_on_submit": 0,
"colour": "White:FFF",
"doctype": "DocField",
"fieldname": "to_warehouse",
"fieldtype": "Link",
"options": "Warehouse",
"report_hide": 0
},
{
"oldfieldtype": "Column Break",
"doctype": "DocField",
@@ -303,12 +103,13 @@
{
"print_hide": 1,
"description": "The date at which current entry will get or has actually executed.",
"no_copy": 1,
"default": "Today",
"oldfieldtype": "Date",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Posting Date",
"oldfieldname": "posting_date",
"no_copy": 1,
"fieldname": "posting_date",
"fieldtype": "Date",
"search_index": 1,
@@ -335,23 +136,6 @@
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Text",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Remarks",
"oldfieldname": "remarks",
"fieldname": "remarks",
"fieldtype": "Text",
"search_index": 0,
"reqd": 1,
"hidden": 0,
"permlevel": 0,
"report_hide": 0,
"in_filter": 0
},
{
"oldfieldtype": "Section Break",
"doctype": "DocField",
@@ -360,11 +144,59 @@
"fieldtype": "Section Break",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Link",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Default Source Warehouse",
"oldfieldname": "from_warehouse",
"permlevel": 0,
"fieldname": "from_warehouse",
"fieldtype": "Link",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"options": "Warehouse",
"report_hide": 0,
"in_filter": 0
},
{
"doctype": "DocField",
"fieldname": "cb0",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Link",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Default Target Warehouse",
"oldfieldname": "to_warehouse",
"permlevel": 0,
"fieldname": "to_warehouse",
"fieldtype": "Link",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"options": "Warehouse",
"report_hide": 0,
"in_filter": 0
},
{
"doctype": "DocField",
"options": "Simple",
"fieldname": "sb0",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"print_hide": 0,
"no_copy": 0,
"oldfieldtype": "Table",
"colour": "White:FFF",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "MTN Details",
@@ -379,43 +211,10 @@
"report_hide": 0,
"in_filter": 0
},
{
"oldfieldtype": "Section Break",
"doctype": "DocField",
"options": "Simple",
"fieldname": "item_section",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Currency",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Total Amount",
"oldfieldname": "total_amount",
"fieldname": "total_amount",
"fieldtype": "Currency",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"permlevel": 1,
"report_hide": 0,
"in_filter": 0
},
{
"oldfieldtype": "Column Break",
"doctype": "DocField",
"fieldname": "col3",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"print_hide": 1,
"description": "Get valuation rate and available stock at source/target warehouse on mentioned posting date-time. If serialized item, please press this button after entering serial nos.",
"oldfieldtype": "Button",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Get Stock and Rate",
"options": "get_stock_and_rate",
@@ -424,6 +223,143 @@
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Reference",
"fieldname": "sb1",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"print_hide": 1,
"depends_on": "eval:inList([\"Material Transfer\", \"Manufacture/Repack\"], doc.purpose)",
"no_copy": 0,
"search_index": 1,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Production Order",
"oldfieldname": "production_order",
"permlevel": 0,
"fieldname": "production_order",
"fieldtype": "Link",
"oldfieldtype": "Link",
"reqd": 0,
"hidden": 1,
"options": "Production Order",
"report_hide": 0,
"in_filter": 1
},
{
"depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)",
"doctype": "DocField",
"label": "BOM No",
"options": "BOM",
"fieldname": "bom_no",
"fieldtype": "Link",
"permlevel": 0
},
{
"print_hide": 1,
"depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)",
"description": "As per Stock UOM",
"no_copy": 0,
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Manufacturing Quantity",
"oldfieldname": "fg_completed_qty",
"fieldname": "fg_completed_qty",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"reqd": 0,
"hidden": 0,
"in_filter": 0,
"permlevel": 0,
"report_hide": 0
},
{
"print_hide": 1,
"depends_on": "eval:doc.purpose==\"Sales Return\"",
"no_copy": 0,
"search_index": 1,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Delivery Note No",
"oldfieldname": "delivery_note_no",
"permlevel": 0,
"fieldname": "delivery_note_no",
"fieldtype": "Link",
"oldfieldtype": "Link",
"reqd": 0,
"hidden": 1,
"options": "Delivery Note",
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"depends_on": "eval:doc.purpose==\"Purchase Return\"",
"no_copy": 0,
"search_index": 1,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Purchase Receipt No",
"oldfieldname": "purchase_receipt_no",
"permlevel": 0,
"fieldname": "purchase_receipt_no",
"fieldtype": "Link",
"oldfieldtype": "Link",
"reqd": 0,
"hidden": 1,
"options": "Purchase Receipt",
"report_hide": 0,
"in_filter": 0
},
{
"doctype": "DocField",
"fieldname": "cb1",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"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",
"depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)",
"doctype": "DocField",
"label": "Use Multi-Level BOM",
"fieldname": "use_multi_level_bom",
"fieldtype": "Check",
"permlevel": 0
},
{
"print_hide": 1,
"depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)",
"no_copy": 0,
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Get Items",
"fieldname": "get_items",
"fieldtype": "Button",
"oldfieldtype": "Button",
"reqd": 0,
"hidden": 0,
"permlevel": 0,
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"depends_on": "eval:doc.purpose==\"Sales Return\"",
"doctype": "DocField",
"label": "Sales Invoice No",
"options": "Sales Invoice",
"fieldname": "sales_invoice_no",
"fieldtype": "Link",
"hidden": 1,
"permlevel": 0
},
{
"depends_on": "eval:(doc.purpose==\"Sales Return\" || doc.purpose==\"Purchase Return\")",
"doctype": "DocField",
"label": "Contact Info",
"fieldname": "contact_section",
@@ -432,18 +368,17 @@
},
{
"print_hide": 1,
"depends_on": "eval:doc.purpose==\"Purchase Return\"",
"no_copy": 0,
"oldfieldtype": "Link",
"colour": "White:FFF",
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Supplier",
"oldfieldname": "supplier",
"permlevel": 0,
"trigger": "Client",
"fieldname": "supplier",
"fieldtype": "Link",
"search_index": 0,
"oldfieldtype": "Link",
"reqd": 0,
"hidden": 0,
"options": "Supplier",
@@ -452,15 +387,16 @@
},
{
"print_hide": 0,
"depends_on": "eval:doc.purpose==\"Purchase Return\"",
"no_copy": 0,
"oldfieldtype": "Data",
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Supplier Name",
"oldfieldname": "supplier_name",
"fieldname": "supplier_name",
"fieldtype": "Data",
"search_index": 0,
"oldfieldtype": "Data",
"reqd": 0,
"hidden": 0,
"permlevel": 1,
@@ -469,17 +405,16 @@
},
{
"print_hide": 0,
"depends_on": "eval:doc.purpose==\"Purchase Return\"",
"no_copy": 0,
"oldfieldtype": "Small Text",
"colour": "White:FFF",
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Supplier Address",
"oldfieldname": "supplier_address",
"trigger": "Client",
"fieldname": "supplier_address",
"fieldtype": "Small Text",
"search_index": 0,
"oldfieldtype": "Small Text",
"reqd": 0,
"hidden": 0,
"permlevel": 0,
@@ -488,18 +423,17 @@
},
{
"print_hide": 1,
"depends_on": "eval:doc.purpose==\"Sales Return\"",
"no_copy": 0,
"oldfieldtype": "Link",
"colour": "White:FFF",
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Customer",
"oldfieldname": "customer",
"permlevel": 0,
"trigger": "Client",
"fieldname": "customer",
"fieldtype": "Link",
"search_index": 0,
"oldfieldtype": "Link",
"reqd": 0,
"hidden": 0,
"options": "Customer",
@@ -508,15 +442,16 @@
},
{
"print_hide": 0,
"depends_on": "eval:doc.purpose==\"Sales Return\"",
"no_copy": 0,
"oldfieldtype": "Data",
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Customer Name",
"oldfieldname": "customer_name",
"fieldname": "customer_name",
"fieldtype": "Data",
"search_index": 0,
"oldfieldtype": "Data",
"reqd": 0,
"hidden": 0,
"permlevel": 1,
@@ -525,15 +460,16 @@
},
{
"print_hide": 0,
"depends_on": "eval:doc.purpose==\"Sales Return\"",
"no_copy": 0,
"oldfieldtype": "Small Text",
"search_index": 0,
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Customer Address",
"oldfieldname": "customer_address",
"fieldname": "customer_address",
"fieldtype": "Small Text",
"search_index": 0,
"oldfieldtype": "Small Text",
"reqd": 0,
"hidden": 0,
"permlevel": 0,
@@ -584,119 +520,6 @@
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Data",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Cancel Reason",
"oldfieldname": "cancel_reason",
"fieldname": "cancel_reason",
"fieldtype": "Data",
"search_index": 0,
"reqd": 0,
"hidden": 1,
"permlevel": 1,
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 0,
"no_copy": 1,
"oldfieldtype": "Date",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Transfer Date",
"oldfieldname": "transfer_date",
"default": "Today",
"fieldname": "transfer_date",
"fieldtype": "Date",
"search_index": 0,
"reqd": 1,
"hidden": 0,
"permlevel": 0,
"report_hide": 0,
"in_filter": 1
},
{
"doctype": "DocField",
"width": "50%",
"fieldname": "col5",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Select",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Is Excisable Goods",
"oldfieldname": "is_excisable_goods",
"permlevel": 0,
"fieldname": "is_excisable_goods",
"fieldtype": "Select",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"options": "\nYes\nNo",
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Select",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Excisable Goods",
"oldfieldname": "excisable_goods",
"permlevel": 0,
"fieldname": "excisable_goods",
"fieldtype": "Select",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"options": "\nReturnable\nNon-Returnable",
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Select",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Under Rule",
"oldfieldname": "under_rule",
"permlevel": 0,
"fieldname": "under_rule",
"fieldtype": "Select",
"search_index": 0,
"reqd": 0,
"hidden": 1,
"options": "\nOrdinary\n57 AC (5) a\n57 F (2) Non-Exc.",
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Data",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Transporter",
"oldfieldname": "transporter",
"fieldname": "transporter",
"fieldtype": "Data",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"permlevel": 0,
"report_hide": 0,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 0,
@@ -716,22 +539,11 @@
"in_filter": 1
},
{
"print_hide": 1,
"no_copy": 0,
"oldfieldtype": "Select",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Fiscal Year",
"oldfieldname": "fiscal_year",
"permlevel": 0,
"fieldname": "fiscal_year",
"fieldtype": "Select",
"search_index": 0,
"reqd": 1,
"hidden": 0,
"options": "link:Fiscal Year",
"report_hide": 0,
"in_filter": 0
"width": "50%",
"fieldname": "col5",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"print_hide": 1,
@@ -753,21 +565,20 @@
},
{
"print_hide": 1,
"description": "The date at which current entry is corrected in the system.",
"no_copy": 1,
"oldfieldtype": "Date",
"oldfieldtype": "Text",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Amendment Date",
"oldfieldname": "amendment_date",
"fieldname": "amendment_date",
"fieldtype": "Date",
"label": "Remarks",
"oldfieldname": "remarks",
"fieldname": "remarks",
"fieldtype": "Text",
"search_index": 0,
"reqd": 0,
"hidden": 0,
"in_filter": 0,
"permlevel": 0,
"report_hide": 0
"report_hide": 0,
"in_filter": 0
},
{
"amend": 1,
@@ -793,13 +604,13 @@
"create": 0,
"doctype": "DocPerm",
"write": 1,
"role": "Production User",
"role": "Manufacturing User",
"permlevel": 2
},
{
"doctype": "DocPerm",
"write": 1,
"role": "Production Manager",
"role": "Manufacturing Manager",
"permlevel": 2
},
{
@@ -808,13 +619,13 @@
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Production User",
"role": "Manufacturing User",
"cancel": 1,
"permlevel": 0
},
{
"doctype": "DocPerm",
"role": "Production User",
"role": "Manufacturing User",
"permlevel": 1
},
{
@@ -823,13 +634,13 @@
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Production Manager",
"role": "Manufacturing Manager",
"cancel": 1,
"permlevel": 0
},
{
"doctype": "DocPerm",
"role": "Production Manager",
"role": "Manufacturing Manager",
"permlevel": 1
},
{

View File

@@ -2,9 +2,9 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-07-03 13:29:47",
"creation": "2012-12-18 13:47:41",
"modified_by": "Administrator",
"modified": "2012-12-03 11:37:17"
"modified": "2012-12-18 17:08:52"
},
{
"istable": 1,
@@ -14,6 +14,7 @@
"module": "Stock"
},
{
"read_only": 0,
"name": "__common__",
"parent": "Stock Entry Detail",
"doctype": "DocField",
@@ -52,7 +53,6 @@
"label": "Item Code",
"oldfieldname": "item_code",
"permlevel": 0,
"trigger": "Client",
"fieldname": "item_code",
"fieldtype": "Link",
"search_index": 1,
@@ -75,7 +75,6 @@
"doctype": "DocField",
"label": "Qty",
"oldfieldname": "qty",
"trigger": "Client",
"fieldname": "qty",
"fieldtype": "Currency",
"reqd": 1,
@@ -83,15 +82,13 @@
},
{
"oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField",
"label": "UOM",
"oldfieldname": "uom",
"trigger": "Client",
"options": "UOM",
"fieldname": "uom",
"fieldtype": "Link",
"reqd": 1,
"options": "UOM",
"permlevel": 0
},
{
@@ -130,23 +127,11 @@
"doctype": "DocField",
"label": "Batch No",
"oldfieldname": "batch_no",
"trigger": "Client",
"options": "Batch",
"fieldname": "batch_no",
"fieldtype": "Link",
"options": "Batch",
"permlevel": 0
},
{
"print_hide": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Reqd Qty",
"oldfieldname": "reqd_qty",
"fieldname": "reqd_qty",
"fieldtype": "Currency",
"permlevel": 3,
"in_filter": 0
},
{
"print_hide": 1,
"no_copy": 1,
@@ -174,7 +159,7 @@
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Stock Qty",
"label": "Qty as per Stock UOM",
"oldfieldname": "transfer_qty",
"fieldname": "transfer_qty",
"fieldtype": "Currency",
@@ -186,32 +171,24 @@
"doctype": "DocField",
"label": "Stock UOM",
"oldfieldname": "stock_uom",
"options": "UOM",
"permlevel": 1,
"fieldname": "stock_uom",
"fieldtype": "Link",
"search_index": 0,
"reqd": 1,
"permlevel": 1,
"options": "UOM",
"in_filter": 0
},
{
"print_hide": 1,
"description": "BOM No. for a Finished Good Item",
"no_copy": 0,
"doctype": "DocField",
"label": "BOM No",
"options": "BOM",
"fieldname": "bom_no",
"fieldtype": "Link",
"hidden": 1,
"permlevel": 0
},
{
"print_hide": 1,
"oldfieldtype": "Check",
"doctype": "DocField",
"label": "FG Item",
"oldfieldname": "fg_item",
"fieldname": "fg_item",
"fieldtype": "Check",
"permlevel": 0,
"in_filter": 1
}
]

View File

@@ -125,7 +125,6 @@ class DocType:
s.modified_by = session['user']
s.serial_no = serial_no
s.sle_exists = 1
s.fiscal_year = obj.doc.fiscal_year
s.company = obj.doc.company
s.save(new_rec)

View File

@@ -1,57 +1,44 @@
# DocType, Stock Ledger
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:38',
'docstatus': 0,
'modified': '2012-03-27 14:36:38',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'hide_toolbar': 1,
'in_create': 1,
'issingle': 1,
'module': u'Stock',
'name': '__common__',
'read_only': 1,
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 10
},
# These values are common for all DocPerm
{
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Stock Ledger',
'parentfield': u'permissions',
'parenttype': u'DocType',
'permlevel': 1,
'read': 1
},
# DocType, Stock Ledger
{
'doctype': 'DocType',
'name': u'Stock Ledger'
},
# DocPerm
{
'doctype': u'DocPerm',
'role': u'All'
},
# DocPerm
{
'doctype': u'DocPerm',
'role': u'Material User'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:38",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:38"
},
{
"section_style": "Simple",
"in_create": 1,
"module": "Stock",
"server_code_error": " ",
"read_only": 1,
"issingle": 1,
"name": "__common__",
"colour": "White:FFF",
"doctype": "DocType",
"show_in_menu": 0,
"version": 10,
"hide_toolbar": 1
},
{
"name": "__common__",
"parent": "Stock Ledger",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"permlevel": 1,
"parentfield": "permissions"
},
{
"name": "Stock Ledger",
"doctype": "DocType"
},
{
"role": "All",
"doctype": "DocPerm"
},
{
"role": "Material User",
"doctype": "DocPerm"
}
]

View File

@@ -44,7 +44,7 @@ class DocType:
def validate_mandatory(self):
mandatory = ['warehouse','transaction_date','posting_date','voucher_type','voucher_no','actual_qty','company','fiscal_year']
mandatory = ['warehouse','posting_date','voucher_type','voucher_no','actual_qty','company']
for k in mandatory:
if self.doc.fields.get(k)==None:
msgprint("Stock Ledger Entry: '%s' is mandatory" % k, raise_exception = 1)

View File

@@ -1,420 +1,353 @@
# DocType, Stock Ledger Entry
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:38',
'docstatus': 0,
'modified': '2012-03-27 14:36:38',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': u'1322549701',
'autoname': u'SLE/.########',
'colour': u'White:FFF',
'doctype': 'DocType',
'hide_toolbar': 1,
'in_create': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 53
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Stock Ledger Entry',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Stock Ledger Entry',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, Stock Ledger Entry
{
'doctype': 'DocType',
'name': u'Stock Ledger Entry'
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'All'
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material User',
'submit': 0,
'write': 0
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material User',
'submit': 0,
'write': 0
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 2,
'role': u'System Manager'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 1,
'reqd': 0,
'search_index': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'serial_no',
'fieldtype': u'Text',
'in_filter': 0,
'label': u'Serial No',
'permlevel': 0,
'search_index': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'batch_no',
'fieldtype': u'Data',
'label': u'Batch No',
'oldfieldname': u'batch_no',
'oldfieldtype': u'Data',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 1,
'search_index': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'warehouse_type',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Warehouse Type',
'oldfieldname': u'warehouse_type',
'oldfieldtype': u'Select',
'options': u'link:Warehouse Type',
'permlevel': 1,
'search_index': 0
},
# DocField
{
'description': u'The date at which current entry will get or has actually executed.',
'doctype': u'DocField',
'fieldname': u'posting_date',
'fieldtype': u'Date',
'in_filter': 1,
'label': u'Posting Date',
'oldfieldname': u'posting_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'reqd': 0,
'search_index': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'posting_time',
'fieldtype': u'Time',
'in_filter': 0,
'label': u'Posting Time',
'oldfieldname': u'posting_time',
'oldfieldtype': u'Time',
'permlevel': 1,
'search_index': 0,
'width': u'100px'
},
# DocField
{
'description': u'The date at which current entry is made in system.',
'doctype': u'DocField',
'fieldname': u'transaction_date',
'fieldtype': u'Date',
'in_filter': 1,
'label': u'Transaction Date',
'oldfieldname': u'transaction_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'search_index': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'voucher_type',
'fieldtype': u'Data',
'in_filter': 1,
'label': u'Voucher Type',
'oldfieldname': u'voucher_type',
'oldfieldtype': u'Data',
'permlevel': 1,
'search_index': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'voucher_no',
'fieldtype': u'Data',
'in_filter': 1,
'label': u'Voucher No',
'oldfieldname': u'voucher_no',
'oldfieldtype': u'Data',
'permlevel': 1,
'search_index': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'voucher_detail_no',
'fieldtype': u'Data',
'label': u'Voucher Detail No',
'oldfieldname': u'voucher_detail_no',
'oldfieldtype': u'Data',
'permlevel': 1,
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'in_filter': 1,
'label': u'Actual Quantity',
'oldfieldname': u'actual_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'incoming_rate',
'fieldtype': u'Currency',
'label': u'Incoming Rate',
'oldfieldname': u'incoming_rate',
'oldfieldtype': u'Currency',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'label': u'Stock UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'permlevel': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'bin_aqat',
'fieldtype': u'Currency',
'in_filter': 1,
'label': u'Bin Actual Qty After Transaction',
'oldfieldname': u'bin_aqat',
'oldfieldtype': u'Currency',
'permlevel': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'ma_rate',
'fieldtype': u'Currency',
'hidden': 1,
'label': u'Moving Average Rate',
'oldfieldname': u'ma_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'fcfs_rate',
'fieldtype': u'Currency',
'hidden': 1,
'label': u'FIFO Rate',
'oldfieldname': u'fcfs_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'valuation_rate',
'fieldtype': u'Currency',
'label': u'Valuation Rate',
'oldfieldname': u'valuation_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'stock_value',
'fieldtype': u'Currency',
'label': u'Stock Value',
'oldfieldname': u'stock_value',
'oldfieldtype': u'Currency',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'fcfs_stack',
'fieldtype': u'Text',
'hidden': 1,
'in_filter': 0,
'label': u'FIFO Stack',
'oldfieldname': u'fcfs_stack',
'oldfieldtype': u'Text',
'permlevel': 2,
'print_hide': 1,
'report_hide': 1,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'company',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Company',
'oldfieldname': u'company',
'oldfieldtype': u'Data',
'options': u'link:Company',
'permlevel': 1,
'search_index': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'fiscal_year',
'fieldtype': u'Data',
'in_filter': 1,
'label': u'Fiscal Year',
'oldfieldname': u'fiscal_year',
'oldfieldtype': u'Data',
'permlevel': 1,
'search_index': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'is_cancelled',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Is Cancelled',
'oldfieldname': u'is_cancelled',
'oldfieldtype': u'Select',
'options': u'\nYes\nNo',
'permlevel': 1,
'search_index': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'is_stock_entry',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Is Stock Entry',
'oldfieldname': u'is_stock_entry',
'oldfieldtype': u'Select',
'options': u'\nYes\nNo',
'permlevel': 1,
'search_index': 0,
'width': u'100px'
}
]
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:38",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:38"
},
{
"section_style": "Simple",
"in_create": 1,
"module": "Stock",
"doctype": "DocType",
"server_code_error": " ",
"autoname": "SLE/.########",
"name": "__common__",
"colour": "White:FFF",
"_last_update": "1322549701",
"show_in_menu": 0,
"version": 53,
"hide_toolbar": 1
},
{
"name": "__common__",
"parent": "Stock Ledger Entry",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Stock Ledger Entry",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Stock Ledger Entry",
"doctype": "DocType"
},
{
"role": "All",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Material User",
"cancel": 0,
"permlevel": 1
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Material User",
"cancel": 0,
"permlevel": 0
},
{
"role": "System Manager",
"permlevel": 2,
"doctype": "DocPerm"
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Item Code",
"oldfieldname": "item_code",
"width": "100px",
"options": "Item",
"fieldname": "item_code",
"fieldtype": "Link",
"oldfieldtype": "Link",
"reqd": 0,
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Serial No",
"width": "100px",
"fieldname": "serial_no",
"fieldtype": "Text",
"permlevel": 0,
"in_filter": 0
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Batch No",
"oldfieldname": "batch_no",
"fieldname": "batch_no",
"fieldtype": "Data",
"permlevel": 0
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Warehouse",
"oldfieldname": "warehouse",
"width": "100px",
"options": "Warehouse",
"fieldname": "warehouse",
"fieldtype": "Link",
"oldfieldtype": "Link",
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Warehouse Type",
"oldfieldname": "warehouse_type",
"permlevel": 1,
"fieldname": "warehouse_type",
"fieldtype": "Select",
"oldfieldtype": "Select",
"options": "link:Warehouse Type",
"in_filter": 1
},
{
"description": "The date at which current entry will get or has actually executed.",
"search_index": 1,
"doctype": "DocField",
"label": "Posting Date",
"oldfieldname": "posting_date",
"width": "100px",
"fieldname": "posting_date",
"fieldtype": "Date",
"oldfieldtype": "Date",
"reqd": 0,
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Posting Time",
"oldfieldname": "posting_time",
"width": "100px",
"fieldname": "posting_time",
"fieldtype": "Time",
"oldfieldtype": "Time",
"permlevel": 1,
"in_filter": 0
},
{
"description": "The date at which current entry is made in system.",
"search_index": 0,
"doctype": "DocField",
"label": "Transaction Date",
"oldfieldname": "transaction_date",
"width": "100px",
"fieldname": "transaction_date",
"fieldtype": "Date",
"oldfieldtype": "Date",
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Voucher Type",
"oldfieldname": "voucher_type",
"width": "150px",
"fieldname": "voucher_type",
"fieldtype": "Data",
"oldfieldtype": "Data",
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Voucher No",
"oldfieldname": "voucher_no",
"width": "150px",
"fieldname": "voucher_no",
"fieldtype": "Data",
"oldfieldtype": "Data",
"permlevel": 1,
"in_filter": 1
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Voucher Detail No",
"oldfieldname": "voucher_detail_no",
"width": "150px",
"fieldname": "voucher_detail_no",
"fieldtype": "Data",
"permlevel": 1
},
{
"oldfieldtype": "Currency",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Actual Quantity",
"oldfieldname": "actual_qty",
"width": "150px",
"fieldname": "actual_qty",
"fieldtype": "Currency",
"permlevel": 1,
"in_filter": 1
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Incoming Rate",
"oldfieldname": "incoming_rate",
"fieldname": "incoming_rate",
"fieldtype": "Currency",
"permlevel": 0
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Stock UOM",
"oldfieldname": "stock_uom",
"width": "150px",
"fieldname": "stock_uom",
"fieldtype": "Data",
"permlevel": 1
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Bin Actual Qty After Transaction",
"oldfieldname": "bin_aqat",
"width": "150px",
"fieldname": "bin_aqat",
"fieldtype": "Currency",
"permlevel": 1,
"in_filter": 1
},
{
"print_hide": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Moving Average Rate",
"oldfieldname": "ma_rate",
"fieldname": "ma_rate",
"fieldtype": "Currency",
"hidden": 1,
"permlevel": 0,
"report_hide": 1
},
{
"print_hide": 1,
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "FIFO Rate",
"oldfieldname": "fcfs_rate",
"fieldname": "fcfs_rate",
"fieldtype": "Currency",
"hidden": 1,
"permlevel": 0,
"report_hide": 1
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Valuation Rate",
"oldfieldname": "valuation_rate",
"width": "150px",
"fieldname": "valuation_rate",
"fieldtype": "Currency",
"permlevel": 0
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Stock Value",
"oldfieldname": "stock_value",
"fieldname": "stock_value",
"fieldtype": "Currency",
"permlevel": 0
},
{
"print_hide": 1,
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "FIFO Stack",
"oldfieldname": "fcfs_stack",
"fieldname": "fcfs_stack",
"fieldtype": "Text",
"search_index": 0,
"hidden": 1,
"permlevel": 2,
"report_hide": 1,
"in_filter": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Company",
"oldfieldname": "company",
"width": "150px",
"options": "link:Company",
"fieldname": "company",
"fieldtype": "Select",
"oldfieldtype": "Data",
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Fiscal Year",
"oldfieldname": "fiscal_year",
"width": "150px",
"fieldname": "fiscal_year",
"fieldtype": "Data",
"oldfieldtype": "Data",
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Is Cancelled",
"oldfieldname": "is_cancelled",
"width": "100px",
"options": "\nYes\nNo",
"fieldname": "is_cancelled",
"fieldtype": "Select",
"oldfieldtype": "Select",
"permlevel": 1,
"in_filter": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Is Stock Entry",
"oldfieldname": "is_stock_entry",
"width": "100px",
"options": "\nYes\nNo",
"fieldname": "is_stock_entry",
"fieldtype": "Select",
"oldfieldtype": "Select",
"permlevel": 1,
"in_filter": 1
}
]

View File

@@ -1,197 +1,162 @@
# DocType, Stock Reconciliation
[
# These values are common in all dictionaries
{
'creation': '2012-04-13 11:56:39',
'docstatus': 0,
'modified': '2012-05-10 11:54:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': u'1321617741',
'allow_attach': 1,
'autoname': u'SR/.######',
'colour': u'White:FFF',
'doctype': 'DocType',
'is_submittable': 1,
'max_attachments': 1,
'module': u'Stock',
'name': '__common__',
'search_fields': u'reconciliation_date',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'subject': u'Date: %(reconciliation_date)s, Time: %(reconciliation_time)s',
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Stock Reconciliation',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Stock Reconciliation',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, Stock Reconciliation
{
'doctype': 'DocType',
'name': u'Stock Reconciliation'
},
# DocPerm
{
'amend': 0,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material Manager',
'submit': 0,
'write': 0
},
# DocPerm
{
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'System Manager',
'submit': 1,
'write': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'steps',
'fieldtype': u'HTML',
'label': u'Steps',
'options': u'<div class="field_description"><b>Steps:</b><br>1. Enter Reconciliation Date and Time<br>2. Save the document<br>3. Attach csv file as per template.<br>4. Submit the document<br>5. Enter tilde (~) sign if no difference in qty or valuation rate</div>',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'reconciliation_date',
'fieldtype': u'Date',
'in_filter': 0,
'label': u'Reconciliation Date',
'oldfieldname': u'reconciliation_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'reconciliation_time',
'fieldtype': u'Time',
'in_filter': 0,
'label': u'Reconciliation Time',
'oldfieldname': u'reconciliation_time',
'oldfieldtype': u'Time',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'remark',
'fieldtype': u'Text',
'label': u'Remark',
'oldfieldname': u'remark',
'oldfieldtype': u'Text',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'download_template',
'fieldtype': u'Button',
'label': u'Download Template',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'file_list',
'fieldtype': u'Text',
'hidden': 1,
'label': u'File List',
'no_copy': 1,
'oldfieldname': u'file_list',
'oldfieldtype': u'Text',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'diff_info',
'fieldtype': u'Text',
'hidden': 1,
'label': u'Diff Info',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'depends_on': u'eval:doc.amended_from',
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'label': u'Amendment Date',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amended_from',
'fieldtype': u'Link',
'label': u'Amended From',
'no_copy': 1,
'options': u'Sales Invoice',
'permlevel': 1,
'print_hide': 1
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-13 11:56:39",
"modified_by": "Administrator",
"modified": "2012-05-10 11:54:52"
},
{
"section_style": "Tray",
"allow_attach": 1,
"is_submittable": 1,
"search_fields": "reconciliation_date",
"module": "Stock",
"server_code_error": " ",
"subject": "Date: %(reconciliation_date)s, Time: %(reconciliation_time)s",
"_last_update": "1321617741",
"autoname": "SR/.######",
"name": "__common__",
"colour": "White:FFF",
"doctype": "DocType",
"show_in_menu": 0,
"max_attachments": 1,
"version": 1
},
{
"name": "__common__",
"parent": "Stock Reconciliation",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Stock Reconciliation",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Stock Reconciliation",
"doctype": "DocType"
},
{
"amend": 0,
"create": 1,
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "Material Manager",
"cancel": 1,
"permlevel": 0
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Material Manager",
"cancel": 0,
"permlevel": 1
},
{
"create": 1,
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"role": "System Manager",
"cancel": 1,
"permlevel": 0
},
{
"doctype": "DocField",
"options": "<div class=\"field_description\"><b>Steps:</b><br>1. Enter Reconciliation Date and Time<br>2. Save the document<br>3. Attach csv file as per template.<br>4. Submit the document<br>5. Enter tilde (~) sign if no difference in qty or valuation rate</div>",
"fieldname": "steps",
"fieldtype": "HTML",
"label": "Steps",
"permlevel": 0
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"label": "Reconciliation Date",
"oldfieldname": "reconciliation_date",
"fieldname": "reconciliation_date",
"fieldtype": "Date",
"reqd": 1,
"permlevel": 0,
"in_filter": 0
},
{
"oldfieldtype": "Time",
"doctype": "DocField",
"label": "Reconciliation Time",
"oldfieldname": "reconciliation_time",
"fieldname": "reconciliation_time",
"fieldtype": "Time",
"reqd": 1,
"permlevel": 0,
"in_filter": 0
},
{
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Remark",
"oldfieldname": "remark",
"fieldname": "remark",
"fieldtype": "Text",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Download Template",
"fieldname": "download_template",
"fieldtype": "Button",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "File List",
"oldfieldname": "file_list",
"fieldname": "file_list",
"fieldtype": "Text",
"hidden": 1,
"permlevel": 1
},
{
"print_hide": 1,
"doctype": "DocField",
"label": "Diff Info",
"fieldname": "diff_info",
"fieldtype": "Text",
"hidden": 1,
"permlevel": 0
},
{
"print_hide": 1,
"description": "The date at which current entry is corrected in the system.",
"no_copy": 1,
"depends_on": "eval:doc.amended_from",
"doctype": "DocField",
"label": "Amendment Date",
"fieldname": "amendment_date",
"fieldtype": "Date",
"permlevel": 0
},
{
"print_hide": 1,
"no_copy": 1,
"doctype": "DocField",
"label": "Amended From",
"permlevel": 1,
"fieldname": "amended_from",
"fieldtype": "Link",
"options": "Sales Invoice"
}
]

View File

@@ -1,151 +1,118 @@
# DocType, Stock UOM Replace Utility
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:40',
'docstatus': 0,
'modified': '2012-03-27 14:36:40',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'in_create': 0,
'issingle': 1,
'module': u'Stock',
'name': '__common__',
'read_only': 0,
'section_style': u'Simple',
'server_code_error': u' ',
'version': 25
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'Stock UOM Replace Utility',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'doctype': u'DocPerm',
'name': '__common__',
'parent': u'Stock UOM Replace Utility',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, Stock UOM Replace Utility
{
'doctype': 'DocType',
'name': u'Stock UOM Replace Utility'
},
# DocPerm
{
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'System Manager',
'write': 1
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'System Manager',
'write': 0
},
# DocPerm
{
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Master Manager',
'write': 1
},
# DocPerm
{
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Manager',
'write': 1
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material Master Manager'
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material Manager'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'label': u'Item',
'options': u'Item',
'permlevel': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'current_stock_uom',
'fieldtype': u'Link',
'label': u'Current Stock UOM',
'options': u'UOM',
'permlevel': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'new_stock_uom',
'fieldtype': u'Link',
'label': u'New Stock UOM',
'options': u'UOM',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'update',
'fieldtype': u'Button',
'label': u'Update',
'options': u'update_stock_uom',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'conversion_factor',
'fieldtype': u'Currency',
'label': u'Conversion Factor',
'permlevel': 0
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:40",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:40"
},
{
"section_style": "Simple",
"in_create": 0,
"module": "Stock",
"server_code_error": " ",
"doctype": "DocType",
"issingle": 1,
"read_only": 0,
"name": "__common__",
"colour": "White:FFF",
"version": 25
},
{
"name": "__common__",
"parent": "Stock UOM Replace Utility",
"doctype": "DocField",
"parenttype": "DocType",
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Stock UOM Replace Utility",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "Stock UOM Replace Utility",
"doctype": "DocType"
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "System Manager",
"permlevel": 0
},
{
"write": 0,
"role": "System Manager",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Material Master Manager",
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "Material Manager",
"permlevel": 0
},
{
"role": "Material Master Manager",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"role": "Material Manager",
"permlevel": 1,
"doctype": "DocPerm"
},
{
"colour": "White:FFF",
"doctype": "DocField",
"label": "Item",
"permlevel": 0,
"trigger": "Client",
"fieldname": "item_code",
"fieldtype": "Link",
"options": "Item"
},
{
"doctype": "DocField",
"options": "UOM",
"fieldname": "current_stock_uom",
"fieldtype": "Link",
"label": "Current Stock UOM",
"permlevel": 1
},
{
"doctype": "DocField",
"options": "UOM",
"fieldname": "new_stock_uom",
"fieldtype": "Link",
"label": "New Stock UOM",
"permlevel": 0
},
{
"doctype": "DocField",
"options": "update_stock_uom",
"fieldname": "update",
"fieldtype": "Button",
"label": "Update",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Conversion Factor",
"fieldname": "conversion_factor",
"fieldtype": "Currency",
"permlevel": 0
}
]

View File

@@ -1,63 +1,50 @@
# DocType, UOM Conversion Detail
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:40',
'docstatus': 0,
'modified': '2012-03-27 14:36:40',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': u'UCDD/.#####',
'colour': u'White:FFF',
'doctype': 'DocType',
'istable': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': u'DocField',
'name': '__common__',
'parent': u'UOM Conversion Detail',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# DocType, UOM Conversion Detail
{
'doctype': 'DocType',
'name': u'UOM Conversion Detail'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'uom',
'fieldtype': u'Link',
'label': u'UOM',
'oldfieldname': u'uom',
'oldfieldtype': u'Link',
'options': u'UOM'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'conversion_factor',
'fieldtype': u'Float',
'label': u'Conversion Factor',
'oldfieldname': u'conversion_factor',
'oldfieldtype': u'Float'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:40",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:40"
},
{
"section_style": "Tray",
"istable": 1,
"module": "Stock",
"server_code_error": " ",
"doctype": "DocType",
"autoname": "UCDD/.#####",
"name": "__common__",
"colour": "White:FFF",
"show_in_menu": 0,
"version": 1
},
{
"name": "__common__",
"parent": "UOM Conversion Detail",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "UOM Conversion Detail",
"doctype": "DocType"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "UOM",
"oldfieldname": "uom",
"fieldname": "uom",
"fieldtype": "Link",
"options": "UOM"
},
{
"oldfieldtype": "Float",
"doctype": "DocField",
"label": "Conversion Factor",
"oldfieldname": "conversion_factor",
"fieldname": "conversion_factor",
"fieldtype": "Float"
}
]

View File

@@ -1,31 +1,24 @@
# DocType, Valuation Control
[
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:40',
'docstatus': 0,
'modified': '2012-03-27 14:36:40',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'colour': u'White:FFF',
'doctype': 'DocType',
'in_create': 1,
'issingle': 1,
'module': u'Stock',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'version': 4
},
# DocType, Valuation Control
{
'doctype': 'DocType',
'name': u'Valuation Control'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:40",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:40"
},
{
"section_style": "Simple",
"in_create": 1,
"colour": "White:FFF",
"module": "Stock",
"server_code_error": " ",
"version": 4,
"doctype": "DocType",
"issingle": 1,
"name": "__common__"
},
{
"name": "Valuation Control",
"doctype": "DocType"
}
]

View File

@@ -1,49 +1,36 @@
# Page, stock-ageing
[
# These values are common in all dictionaries
{
u'creation': '2012-09-21 20:15:14',
u'docstatus': 0,
u'modified': '2012-10-04 17:34:24',
u'modified_by': u'Administrator',
u'owner': u'Administrator'
},
# These values are common for all Page
{
u'doctype': u'Page',
'module': u'Stock',
u'name': u'__common__',
'page_name': u'stock-ageing',
'standard': u'Yes',
'title': u'Stock Ageing'
},
# These values are common for all Page Role
{
u'doctype': u'Page Role',
u'name': u'__common__',
'parent': u'stock-ageing',
'parentfield': u'roles',
'parenttype': u'Page'
},
# Page, stock-ageing
{
u'doctype': u'Page',
u'name': u'stock-ageing'
},
# Page Role
{
u'doctype': u'Page Role',
'role': u'Analytics'
},
# Page Role
{
u'doctype': u'Page Role',
'role': u'Material Manager'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-09-21 20:15:14",
"modified_by": "Administrator",
"modified": "2012-10-04 17:34:24"
},
{
"name": "__common__",
"title": "Stock Ageing",
"module": "Stock",
"doctype": "Page",
"page_name": "stock-ageing",
"standard": "Yes"
},
{
"name": "__common__",
"parent": "stock-ageing",
"doctype": "Page Role",
"parenttype": "Page",
"parentfield": "roles"
},
{
"name": "stock-ageing",
"doctype": "Page"
},
{
"role": "Analytics",
"doctype": "Page Role"
},
{
"role": "Material Manager",
"doctype": "Page Role"
}
]

View File

@@ -1,49 +1,36 @@
# Page, stock-analytics
[
# These values are common in all dictionaries
{
u'creation': '2012-09-21 20:15:14',
u'docstatus': 0,
u'modified': '2012-10-04 17:32:20',
u'modified_by': u'Administrator',
u'owner': u'Administrator'
},
# These values are common for all Page
{
u'doctype': u'Page',
'module': u'Stock',
u'name': u'__common__',
'page_name': u'stock-analytics',
'standard': u'Yes',
'title': u'Stock Analytics'
},
# These values are common for all Page Role
{
u'doctype': u'Page Role',
u'name': u'__common__',
'parent': u'stock-analytics',
'parentfield': u'roles',
'parenttype': u'Page'
},
# Page, stock-analytics
{
u'doctype': u'Page',
u'name': u'stock-analytics'
},
# Page Role
{
u'doctype': u'Page Role',
'role': u'Analytics'
},
# Page Role
{
u'doctype': u'Page Role',
'role': u'Material Manager'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-09-21 20:15:14",
"modified_by": "Administrator",
"modified": "2012-10-04 17:32:20"
},
{
"name": "__common__",
"title": "Stock Analytics",
"module": "Stock",
"doctype": "Page",
"page_name": "stock-analytics",
"standard": "Yes"
},
{
"name": "__common__",
"parent": "stock-analytics",
"doctype": "Page Role",
"parenttype": "Page",
"parentfield": "roles"
},
{
"name": "stock-analytics",
"doctype": "Page"
},
{
"role": "Analytics",
"doctype": "Page Role"
},
{
"role": "Material Manager",
"doctype": "Page Role"
}
]

View File

@@ -1,28 +1,21 @@
# Page, stock-home
[
# These values are common in all dictionaries
{
'creation': '2012-02-21 13:23:22',
'docstatus': 0,
'modified': '2012-02-21 13:23:22',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Page
{
'doctype': 'Page',
'module': u'Stock',
'name': '__common__',
'page_name': u'stock-home',
'standard': u'Yes',
'title': u'Stock Home'
},
# Page, stock-home
{
'doctype': 'Page',
'name': u'stock-home'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-02-21 13:23:22",
"modified_by": "Administrator",
"modified": "2012-02-21 13:23:22"
},
{
"name": "__common__",
"title": "Stock Home",
"module": "Stock",
"doctype": "Page",
"page_name": "stock-home",
"standard": "Yes"
},
{
"name": "stock-home",
"doctype": "Page"
}
]

View File

@@ -1,55 +1,40 @@
# Page, stock-ledger
[
# These values are common in all dictionaries
{
u'creation': '2012-09-21 20:15:14',
u'docstatus': 0,
u'modified': '2012-10-04 17:25:35',
u'modified_by': u'Administrator',
u'owner': u'Administrator'
},
# These values are common for all Page
{
u'doctype': u'Page',
'module': u'Stock',
u'name': u'__common__',
'page_name': u'stock-ledger',
'standard': u'Yes',
'title': u'Stock Ledger'
},
# These values are common for all Page Role
{
u'doctype': u'Page Role',
u'name': u'__common__',
'parent': u'stock-ledger',
'parentfield': u'roles',
'parenttype': u'Page'
},
# Page, stock-ledger
{
u'doctype': u'Page',
u'name': u'stock-ledger'
},
# Page Role
{
u'doctype': u'Page Role',
'role': u'Analytics'
},
# Page Role
{
u'doctype': u'Page Role',
'role': u'Material Manager'
},
# Page Role
{
u'doctype': u'Page Role',
'role': u'Material User'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-09-21 20:15:14",
"modified_by": "Administrator",
"modified": "2012-10-04 17:25:35"
},
{
"name": "__common__",
"title": "Stock Ledger",
"module": "Stock",
"doctype": "Page",
"page_name": "stock-ledger",
"standard": "Yes"
},
{
"name": "__common__",
"parent": "stock-ledger",
"doctype": "Page Role",
"parenttype": "Page",
"parentfield": "roles"
},
{
"name": "stock-ledger",
"doctype": "Page"
},
{
"role": "Analytics",
"doctype": "Page Role"
},
{
"role": "Material Manager",
"doctype": "Page Role"
},
{
"role": "Material User",
"doctype": "Page Role"
}
]

View File

@@ -1,26 +1,19 @@
# Report, Stock Ledger
[
# These values are common in all dictionaries
{
'creation': '2012-09-06 18:47:05',
'docstatus': 0,
'modified': '2012-09-06 18:48:22',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Report
{
'doctype': 'Report',
'json': u'{"filters":[["Stock Ledger Entry","is_cancelled","=","No"]],"columns":[["item_code","Stock Ledger Entry"],["warehouse","Stock Ledger Entry"],["posting_date","Stock Ledger Entry"],["posting_time","Stock Ledger Entry"],["actual_qty","Stock Ledger Entry"],["bin_aqat","Stock Ledger Entry"],["voucher_type","Stock Ledger Entry"],["voucher_no","Stock Ledger Entry"]],"sort_by":"Stock Ledger Entry.posting_date","sort_order":"desc","sort_by_next":"Stock Ledger Entry.posting_time","sort_order_next":"desc"}',
'name': '__common__',
'ref_doctype': u'Stock Ledger Entry'
},
# Report, Stock Ledger
{
'doctype': 'Report',
'name': u'Stock Ledger'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-09-06 18:47:05",
"modified_by": "Administrator",
"modified": "2012-09-06 18:48:22"
},
{
"name": "__common__",
"ref_doctype": "Stock Ledger Entry",
"doctype": "Report",
"json": "{\"filters\":[[\"Stock Ledger Entry\",\"is_cancelled\",\"=\",\"No\"]],\"columns\":[[\"item_code\",\"Stock Ledger Entry\"],[\"warehouse\",\"Stock Ledger Entry\"],[\"posting_date\",\"Stock Ledger Entry\"],[\"posting_time\",\"Stock Ledger Entry\"],[\"actual_qty\",\"Stock Ledger Entry\"],[\"bin_aqat\",\"Stock Ledger Entry\"],[\"voucher_type\",\"Stock Ledger Entry\"],[\"voucher_no\",\"Stock Ledger Entry\"]],\"sort_by\":\"Stock Ledger Entry.posting_date\",\"sort_order\":\"desc\",\"sort_by_next\":\"Stock Ledger Entry.posting_time\",\"sort_order_next\":\"desc\"}"
},
{
"name": "Stock Ledger",
"doctype": "Report"
}
]

View File

@@ -1,34 +1,27 @@
# Search Criteria, itemwise_price_list
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:51',
'docstatus': 0,
'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
# These values are common for all Search Criteria
{
'columns': u'Item\x01Item Name,Item\x01Item Group,Item Price\x01Price List Name,Item Price\x01Ref Rate,Item Price\x01Currency',
'criteria_name': u'Itemwise Price List',
'doc_type': u'Item Price',
'doctype': 'Search Criteria',
'filters': u"{'Item\x01Saved':1,'Item Price\x01Price List Name':'','Item Price\x01Currency':''}",
'module': u'Stock',
'name': '__common__',
'page_len': 50,
'parent_doc_type': u'Item',
'sort_by': u'`tabItem`.`item_name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, itemwise_price_list
{
'doctype': 'Search Criteria',
'name': u'itemwise_price_list'
}
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"parent_doc_type": "Item",
"module": "Stock",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Item\u0001Saved':1,'Item Price\u0001Price List Name':'','Item Price\u0001Currency':''}",
"doc_type": "Item Price",
"name": "__common__",
"doctype": "Search Criteria",
"sort_by": "`tabItem`.`item_name`",
"page_len": 50,
"criteria_name": "Itemwise Price List",
"columns": "Item\u0001Item Name,Item\u0001Item Group,Item Price\u0001Price List Name,Item Price\u0001Ref Rate,Item Price\u0001Currency"
},
{
"name": "itemwise_price_list",
"doctype": "Search Criteria"
}
]

View File

@@ -1,34 +1,27 @@
# Search Criteria, itemwise_receipt_details
[
# These values are common in all dictionaries
{
'creation': '2012-04-11 13:16:55',
'docstatus': 0,
'modified': '2012-04-13 11:16:40',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Search Criteria
{
'columns': u'Purchase Receipt\x01ID,Purchase Receipt\x01Posting Date,Purchase Receipt Item\x01Item Code,Purchase Receipt Item\x01Item Name,Purchase Receipt Item\x01Accepted Quantity,Purchase Receipt Item\x01Rejected Quantity,Purchase Receipt Item\x01UOM,Purchase Receipt Item\x01Accepted Warehouse,Purchase Receipt Item\x01Rejected Warehouse,Purchase Receipt Item\x01Amount',
'criteria_name': u'Itemwise Receipt Details',
'doc_type': u'Purchase Receipt Item',
'doctype': 'Search Criteria',
'filters': u'{"Purchase Receipt\\u0001Submitted":1,"Purchase Receipt\\u0001Status":[""],"Purchase Receipt\\u0001Fiscal Year":[""]}',
'module': u'Stock',
'name': '__common__',
'page_len': 50,
'parent_doc_type': u'Purchase Receipt',
'sort_by': u'`tabPurchase Receipt`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, itemwise_receipt_details
{
'doctype': 'Search Criteria',
'name': u'itemwise_receipt_details'
}
]
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-11 13:16:55",
"modified_by": "Administrator",
"modified": "2012-04-13 11:16:40"
},
{
"parent_doc_type": "Purchase Receipt",
"module": "Stock",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{\"Purchase Receipt\\u0001Submitted\":1,\"Purchase Receipt\\u0001Status\":[\"\"],\"Purchase Receipt\\u0001Fiscal Year\":[\"\"]}",
"doc_type": "Purchase Receipt Item",
"name": "__common__",
"doctype": "Search Criteria",
"sort_by": "`tabPurchase Receipt`.`name`",
"page_len": 50,
"criteria_name": "Itemwise Receipt Details",
"columns": "Purchase Receipt\u0001ID,Purchase Receipt\u0001Posting Date,Purchase Receipt Item\u0001Item Code,Purchase Receipt Item\u0001Item Name,Purchase Receipt Item\u0001Accepted Quantity,Purchase Receipt Item\u0001Rejected Quantity,Purchase Receipt Item\u0001UOM,Purchase Receipt Item\u0001Accepted Warehouse,Purchase Receipt Item\u0001Rejected Warehouse,Purchase Receipt Item\u0001Amount"
},
{
"name": "itemwise_receipt_details",
"doctype": "Search Criteria"
}
]

View File

@@ -1,33 +1,26 @@
# Search Criteria, shortage_to_purchase_request
[
# These values are common in all dictionaries
{
'creation': '2012-03-30 14:50:44',
'docstatus': 0,
'modified': '2012-03-30 14:50:44',
'modified_by': u'Administrator',
'owner': u'wasim@webnotestech.com'
},
# These values are common for all Search Criteria
{
'columns': u'Item\x01ID,Item\x01Item Name,Item\x01Description,Item\x01Lead Time Days',
'criteria_name': u'Shortage To Purchase Request',
'doc_type': u'Item',
'doctype': 'Search Criteria',
'filters': u"{'Item\x01Saved':1}",
'module': u'Stock',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabItem`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, shortage_to_purchase_request
{
'doctype': 'Search Criteria',
'name': u'shortage_to_purchase_request'
}
{
"owner": "wasim@webnotestech.com",
"docstatus": 0,
"creation": "2012-03-30 14:50:44",
"modified_by": "Administrator",
"modified": "2012-03-30 14:50:44"
},
{
"module": "Stock",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Item\u0001Saved':1}",
"doctype": "Search Criteria",
"doc_type": "Item",
"name": "__common__",
"sort_by": "`tabItem`.`name`",
"page_len": 50,
"criteria_name": "Shortage To Purchase Request",
"columns": "Item\u0001ID,Item\u0001Item Name,Item\u0001Description,Item\u0001Lead Time Days"
},
{
"name": "shortage_to_purchase_request",
"doctype": "Search Criteria"
}
]

View File

@@ -1,34 +1,27 @@
# Search Criteria, stock_aging_report
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:53',
'docstatus': 0,
'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
# These values are common for all Search Criteria
{
'add_cond': u"`tabSerial No`.status = 'In Store'",
'columns': u'Serial No\x01ID,Serial No\x01Item Code,Serial No\x01Description,Serial No\x01Item Group,Serial No\x01Purchase Date',
'criteria_name': u'Stock Aging Report',
'doc_type': u'Serial No',
'doctype': 'Search Criteria',
'filters': u"{'Serial No\x01Saved':1,'Serial No\x01Submitted':1,'Serial No\x01Status':'In Store','Serial No\x01Maintenance Status':''}",
'module': u'Stock',
'name': '__common__',
'page_len': 1000,
'sort_by': u'`tabSerial No`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, stock_aging_report
{
'doctype': 'Search Criteria',
'name': u'stock_aging_report'
}
{
"owner": "ashwini@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:53",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:53"
},
{
"module": "Stock",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Submitted':1,'Serial No\u0001Status':'In Store','Serial No\u0001Maintenance Status':''}",
"doc_type": "Serial No",
"name": "__common__",
"add_cond": "`tabSerial No`.status = 'In Store'",
"doctype": "Search Criteria",
"sort_by": "`tabSerial No`.`name`",
"page_len": 1000,
"criteria_name": "Stock Aging Report",
"columns": "Serial No\u0001ID,Serial No\u0001Item Code,Serial No\u0001Description,Serial No\u0001Item Group,Serial No\u0001Purchase Date"
},
{
"name": "stock_aging_report",
"doctype": "Search Criteria"
}
]

View File

@@ -1,36 +1,29 @@
# Search Criteria, stock_ledger
[
# These values are common in all dictionaries
{
u'creation': '2012-09-14 11:30:39',
u'docstatus': 0,
u'modified': '2012-11-06 10:27:11',
u'modified_by': u'Administrator',
u'owner': u'Administrator'
},
# These values are common for all Search Criteria
{
'add_col': u'`tabItem`.`item_name`\n`tabItem`.`description`',
'add_cond': u'`tabItem`.`name` = `tabStock Ledger Entry`.`item_code`',
'add_tab': u'`tabItem`',
'columns': u'Stock Ledger Entry\x01Item Code,Stock Ledger Entry\x01Warehouse,Stock Ledger Entry\x01Posting Date,Stock Ledger Entry\x01Posting Time,Stock Ledger Entry\x01Actual Quantity,Stock Ledger Entry\x01Bin Actual Qty After Transaction,Stock Ledger Entry\x01Voucher Type,Stock Ledger Entry\x01Voucher No',
'criteria_name': u'Stock Ledger',
'doc_type': u'Stock Ledger Entry',
u'doctype': u'Search Criteria',
'filters': u'{"Stock Ledger Entry\\u0001Warehouse Type":[],"Stock Ledger Entry\\u0001Company":[],"Stock Ledger Entry\\u0001Is Cancelled":["No"],"Stock Ledger Entry\\u0001Is Stock Entry":[]}',
'module': u'Stock',
u'name': u'__common__',
'page_len': 50,
'sort_by': u'`tabStock Ledger Entry`.`posting_date`, `tabStock Ledger Entry`.`posting_time`, `tabStock Ledger Entry`.`name`',
'sort_order': u'ASC',
'standard': u'Yes'
},
# Search Criteria, stock_ledger
{
u'doctype': u'Search Criteria',
u'name': u'stock_ledger'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-09-14 11:30:39",
"modified_by": "Administrator",
"modified": "2012-11-06 10:27:11"
},
{
"add_col": "`tabItem`.`item_name`\n`tabItem`.`description`",
"module": "Stock",
"standard": "Yes",
"sort_order": "ASC",
"add_tab": "`tabItem`",
"doc_type": "Stock Ledger Entry",
"name": "__common__",
"filters": "{\"Stock Ledger Entry\\u0001Warehouse Type\":[],\"Stock Ledger Entry\\u0001Company\":[],\"Stock Ledger Entry\\u0001Is Cancelled\":[\"No\"],\"Stock Ledger Entry\\u0001Is Stock Entry\":[]}",
"add_cond": "`tabItem`.`name` = `tabStock Ledger Entry`.`item_code`",
"doctype": "Search Criteria",
"sort_by": "`tabStock Ledger Entry`.`posting_date`, `tabStock Ledger Entry`.`posting_time`, `tabStock Ledger Entry`.`name`",
"page_len": 50,
"criteria_name": "Stock Ledger",
"columns": "Stock Ledger Entry\u0001Item Code,Stock Ledger Entry\u0001Warehouse,Stock Ledger Entry\u0001Posting Date,Stock Ledger Entry\u0001Posting Time,Stock Ledger Entry\u0001Actual Quantity,Stock Ledger Entry\u0001Bin Actual Qty After Transaction,Stock Ledger Entry\u0001Voucher Type,Stock Ledger Entry\u0001Voucher No"
},
{
"name": "stock_ledger",
"doctype": "Search Criteria"
}
]

View File

@@ -1,36 +1,29 @@
# Search Criteria, stock_level
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:53',
'docstatus': 0,
'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Search Criteria
{
'add_col': u'`tabItem`.`item_name`\n`tabItem`.`description`',
'add_cond': u'`tabItem`.name = `tabBin`.item_code',
'add_tab': u'`tabItem`',
'columns': u'Bin\x01Warehouse,Bin\x01Item Code,Bin\x01UOM,Bin\x01Reserved Quantity,Bin\x01Actual Quantity,Bin\x01Ordered Quantity,Bin\x01Planned Qty,Bin\x01Projected Qty,Bin\x01Quantity Requested for Purchase,Bin\x01Valuation Rate,Bin\x01Stock Value',
'criteria_name': u'Stock Level',
'doc_type': u'Bin',
'doctype': 'Search Criteria',
'filters': u'{}',
'module': u'Stock',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabBin`.`warehouse`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, stock_level
{
'doctype': 'Search Criteria',
'name': u'stock_level'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:53",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:53"
},
{
"add_col": "`tabItem`.`item_name`\n`tabItem`.`description`",
"module": "Stock",
"standard": "Yes",
"sort_order": "DESC",
"add_tab": "`tabItem`",
"doc_type": "Bin",
"name": "__common__",
"filters": "{}",
"add_cond": "`tabItem`.name = `tabBin`.item_code",
"doctype": "Search Criteria",
"sort_by": "`tabBin`.`warehouse`",
"page_len": 50,
"criteria_name": "Stock Level",
"columns": "Bin\u0001Warehouse,Bin\u0001Item Code,Bin\u0001UOM,Bin\u0001Reserved Quantity,Bin\u0001Actual Quantity,Bin\u0001Ordered Quantity,Bin\u0001Planned Qty,Bin\u0001Projected Qty,Bin\u0001Quantity Requested for Purchase,Bin\u0001Valuation Rate,Bin\u0001Stock Value"
},
{
"name": "stock_level",
"doctype": "Search Criteria"
}
]

View File

@@ -1,33 +1,26 @@
# Search Criteria, stock_report
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:53',
'docstatus': 0,
'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Search Criteria
{
'columns': u'Stock Ledger Entry\x01ID',
'criteria_name': u'Stock Report',
'doc_type': u'Stock Ledger Entry',
'doctype': 'Search Criteria',
'filters': u"{'Stock Ledger Entry\x01Is Cancelled':'','Stock Ledger Entry\x01Is Stock Entry':''}",
'module': u'Stock',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabStock Ledger Entry`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, stock_report
{
'doctype': 'Search Criteria',
'name': u'stock_report'
}
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:53",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:53"
},
{
"module": "Stock",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Stock Ledger Entry\u0001Is Cancelled':'','Stock Ledger Entry\u0001Is Stock Entry':''}",
"doctype": "Search Criteria",
"doc_type": "Stock Ledger Entry",
"name": "__common__",
"sort_by": "`tabStock Ledger Entry`.`name`",
"page_len": 50,
"criteria_name": "Stock Report",
"columns": "Stock Ledger Entry\u0001ID"
},
{
"name": "stock_report",
"doctype": "Search Criteria"
}
]