Rushabh Mehta | 3966f1d | 2012-02-23 12:35:32 +0530 | [diff] [blame] | 1 | # ERPNext - web based ERP (http://erpnext.com) |
| 2 | # Copyright (C) 2012 Web Notes Technologies Pvt Ltd |
| 3 | # |
| 4 | # This program is free software: you can redistribute it and/or modify |
| 5 | # it under the terms of the GNU General Public License as published by |
| 6 | # the Free Software Foundation, either version 3 of the License, or |
| 7 | # (at your option) any later version. |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 17 | from webnotes.model.doc import Document |
| 18 | |
Nabin Hait | a970b11 | 2011-09-30 18:05:08 +0530 | [diff] [blame] | 19 | # Material Receipt |
| 20 | #----------------------- |
| 21 | |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 22 | mr = [ |
| 23 | Document( |
| 24 | fielddata = { |
| 25 | 'doctype': 'Stock Entry', |
| 26 | 'posting_date': '2011-09-01', |
| 27 | 'transfer_date': '2011-09-01', |
| 28 | 'posting_time': '12:00', |
| 29 | 'company': 'comp', |
| 30 | 'fiscal_year' : '2011-2012', |
| 31 | 'purpose': 'Material Receipt', |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 32 | 'name': 'mr' |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 33 | } |
| 34 | ), |
| 35 | Document( |
| 36 | fielddata ={ |
| 37 | 'doctype': 'Stock Entry Detail', |
| 38 | 'parenttype': 'Stock Entry', |
| 39 | 'parentfield' : 'mtn_details', |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 40 | 'parent' : 'mr', |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 41 | 'item_code' : 'it', |
| 42 | 't_warehouse' : 'wh1', |
| 43 | 'qty' : 10, |
| 44 | 'transfer_qty' : 10, |
| 45 | 'incoming_rate': 100, |
| 46 | 'stock_uom': 'Nos', |
| 47 | 'conversion_factor': 1, |
| 48 | 'serial_no': 'srno1, srno2, srno3, srno4, srno5, srno6, srno7, srno8, srno9, srno10' |
| 49 | } |
| 50 | ) |
| 51 | ] |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 52 | |
Nabin Hait | 2cca0e7 | 2011-11-09 12:12:53 +0530 | [diff] [blame] | 53 | mr1 = [ |
| 54 | Document( |
| 55 | fielddata = { |
| 56 | 'doctype': 'Stock Entry', |
| 57 | 'posting_date': '2011-09-01', |
| 58 | 'transfer_date': '2011-09-01', |
| 59 | 'posting_time': '12:00', |
| 60 | 'company': 'comp', |
| 61 | 'fiscal_year' : '2011-2012', |
| 62 | 'purpose': 'Material Receipt', |
| 63 | 'name': 'mr1' |
| 64 | } |
| 65 | ), |
| 66 | Document( |
| 67 | fielddata ={ |
| 68 | 'doctype': 'Stock Entry Detail', |
| 69 | 'parenttype': 'Stock Entry', |
| 70 | 'parentfield' : 'mtn_details', |
| 71 | 'parent' : 'mr1', |
| 72 | 'item_code' : 'it', |
| 73 | 't_warehouse' : 'wh1', |
| 74 | 'qty' : 5, |
| 75 | 'transfer_qty' : 5, |
| 76 | 'incoming_rate': 400, |
| 77 | 'stock_uom': 'Nos', |
| 78 | 'conversion_factor': 1, |
| 79 | 'serial_no': 'srno11, srno12, srno13, srno14, srno15' |
| 80 | } |
| 81 | ) |
| 82 | ] |
| 83 | |
| 84 | |
Nabin Hait | a970b11 | 2011-09-30 18:05:08 +0530 | [diff] [blame] | 85 | # Material Transfer |
| 86 | #-------------------- |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 87 | |
| 88 | mtn = [ |
| 89 | Document( |
| 90 | fielddata = { |
| 91 | 'doctype': 'Stock Entry', |
| 92 | 'posting_date': '2011-09-01', |
| 93 | 'transfer_date': '2011-09-01', |
Nabin Hait | 93ba4fb | 2011-11-08 15:30:04 +0530 | [diff] [blame] | 94 | 'posting_time': '12:00', |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 95 | 'company': 'comp', |
| 96 | 'fiscal_year' : '2011-2012', |
| 97 | 'purpose': 'Material Transfer', |
| 98 | 'name': 'mtn' |
| 99 | } |
| 100 | ), |
| 101 | Document( |
| 102 | fielddata ={ |
| 103 | 'doctype': 'Stock Entry Detail', |
| 104 | 'parenttype': 'Stock Entry', |
| 105 | 'parentfield' : 'mtn_details', |
| 106 | 'parent' : 'mtn', |
| 107 | 'item_code' : 'it', |
| 108 | 's_warehouse' : 'wh1', |
| 109 | 't_warehouse' : 'wh2', |
| 110 | 'qty' : 5, |
| 111 | 'transfer_qty' : 5, |
| 112 | 'incoming_rate': 100, |
| 113 | 'stock_uom': 'Nos', |
| 114 | 'conversion_factor': 1, |
| 115 | 'serial_no': 'srno1, srno2, srno3, srno4, srno5' |
| 116 | } |
| 117 | ) |
| 118 | ] |
Nabin Hait | a970b11 | 2011-09-30 18:05:08 +0530 | [diff] [blame] | 119 | |
| 120 | # Material Issue |
| 121 | #-------------------- |
| 122 | |
| 123 | mi = [ |
| 124 | Document( |
| 125 | fielddata = { |
| 126 | 'doctype': 'Stock Entry', |
| 127 | 'posting_date': '2011-09-01', |
| 128 | 'transfer_date': '2011-09-01', |
| 129 | 'posting_time': '14:00', |
| 130 | 'company': 'comp', |
| 131 | 'fiscal_year' : '2011-2012', |
| 132 | 'purpose': 'Material Issue', |
| 133 | 'name': 'mi' |
| 134 | } |
| 135 | ), |
| 136 | Document( |
| 137 | fielddata ={ |
| 138 | 'doctype': 'Stock Entry Detail', |
| 139 | 'parenttype': 'Stock Entry', |
| 140 | 'parentfield' : 'mtn_details', |
| 141 | 'parent' : 'mi', |
| 142 | 'item_code' : 'it', |
| 143 | 's_warehouse' : 'wh1', |
| 144 | 'qty' : 4, |
| 145 | 'transfer_qty' : 4, |
| 146 | 'incoming_rate': 100, |
| 147 | 'stock_uom': 'Nos', |
| 148 | 'conversion_factor': 1, |
| 149 | 'serial_no': 'srno1, srno2, srno3, srno4' |
| 150 | } |
| 151 | ) |
| 152 | ] |