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 | |
Anand Doshi | 486f9df | 2012-07-19 13:40:31 +0530 | [diff] [blame] | 17 | from __future__ import unicode_literals |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 18 | from webnotes.model.doc import Document |
| 19 | |
Nabin Hait | a970b11 | 2011-09-30 18:05:08 +0530 | [diff] [blame] | 20 | # Material Receipt |
| 21 | #----------------------- |
| 22 | |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 23 | mr = [ |
| 24 | Document( |
| 25 | fielddata = { |
| 26 | 'doctype': 'Stock Entry', |
| 27 | 'posting_date': '2011-09-01', |
| 28 | 'transfer_date': '2011-09-01', |
| 29 | 'posting_time': '12:00', |
| 30 | 'company': 'comp', |
| 31 | 'fiscal_year' : '2011-2012', |
| 32 | 'purpose': 'Material Receipt', |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 33 | 'name': 'mr' |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 34 | } |
| 35 | ), |
| 36 | Document( |
| 37 | fielddata ={ |
| 38 | 'doctype': 'Stock Entry Detail', |
| 39 | 'parenttype': 'Stock Entry', |
| 40 | 'parentfield' : 'mtn_details', |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 41 | 'parent' : 'mr', |
Nabin Hait | 31665e5 | 2011-09-29 10:41:02 +0530 | [diff] [blame] | 42 | 'item_code' : 'it', |
| 43 | 't_warehouse' : 'wh1', |
| 44 | 'qty' : 10, |
| 45 | 'transfer_qty' : 10, |
| 46 | 'incoming_rate': 100, |
| 47 | 'stock_uom': 'Nos', |
| 48 | 'conversion_factor': 1, |
| 49 | 'serial_no': 'srno1, srno2, srno3, srno4, srno5, srno6, srno7, srno8, srno9, srno10' |
| 50 | } |
| 51 | ) |
| 52 | ] |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 53 | |
Nabin Hait | 2cca0e7 | 2011-11-09 12:12:53 +0530 | [diff] [blame] | 54 | mr1 = [ |
| 55 | Document( |
| 56 | fielddata = { |
| 57 | 'doctype': 'Stock Entry', |
| 58 | 'posting_date': '2011-09-01', |
| 59 | 'transfer_date': '2011-09-01', |
| 60 | 'posting_time': '12:00', |
| 61 | 'company': 'comp', |
| 62 | 'fiscal_year' : '2011-2012', |
| 63 | 'purpose': 'Material Receipt', |
| 64 | 'name': 'mr1' |
| 65 | } |
| 66 | ), |
| 67 | Document( |
| 68 | fielddata ={ |
| 69 | 'doctype': 'Stock Entry Detail', |
| 70 | 'parenttype': 'Stock Entry', |
| 71 | 'parentfield' : 'mtn_details', |
| 72 | 'parent' : 'mr1', |
| 73 | 'item_code' : 'it', |
| 74 | 't_warehouse' : 'wh1', |
| 75 | 'qty' : 5, |
| 76 | 'transfer_qty' : 5, |
| 77 | 'incoming_rate': 400, |
| 78 | 'stock_uom': 'Nos', |
| 79 | 'conversion_factor': 1, |
| 80 | 'serial_no': 'srno11, srno12, srno13, srno14, srno15' |
| 81 | } |
| 82 | ) |
| 83 | ] |
| 84 | |
| 85 | |
Nabin Hait | a970b11 | 2011-09-30 18:05:08 +0530 | [diff] [blame] | 86 | # Material Transfer |
| 87 | #-------------------- |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 88 | |
| 89 | mtn = [ |
| 90 | Document( |
| 91 | fielddata = { |
| 92 | 'doctype': 'Stock Entry', |
| 93 | 'posting_date': '2011-09-01', |
| 94 | 'transfer_date': '2011-09-01', |
Nabin Hait | 93ba4fb | 2011-11-08 15:30:04 +0530 | [diff] [blame] | 95 | 'posting_time': '12:00', |
Nabin Hait | 88f9cb5 | 2011-09-30 17:20:06 +0530 | [diff] [blame] | 96 | 'company': 'comp', |
| 97 | 'fiscal_year' : '2011-2012', |
| 98 | 'purpose': 'Material Transfer', |
| 99 | 'name': 'mtn' |
| 100 | } |
| 101 | ), |
| 102 | Document( |
| 103 | fielddata ={ |
| 104 | 'doctype': 'Stock Entry Detail', |
| 105 | 'parenttype': 'Stock Entry', |
| 106 | 'parentfield' : 'mtn_details', |
| 107 | 'parent' : 'mtn', |
| 108 | 'item_code' : 'it', |
| 109 | 's_warehouse' : 'wh1', |
| 110 | 't_warehouse' : 'wh2', |
| 111 | 'qty' : 5, |
| 112 | 'transfer_qty' : 5, |
| 113 | 'incoming_rate': 100, |
| 114 | 'stock_uom': 'Nos', |
| 115 | 'conversion_factor': 1, |
| 116 | 'serial_no': 'srno1, srno2, srno3, srno4, srno5' |
| 117 | } |
| 118 | ) |
| 119 | ] |
Nabin Hait | a970b11 | 2011-09-30 18:05:08 +0530 | [diff] [blame] | 120 | |
| 121 | # Material Issue |
| 122 | #-------------------- |
| 123 | |
| 124 | mi = [ |
| 125 | Document( |
| 126 | fielddata = { |
| 127 | 'doctype': 'Stock Entry', |
| 128 | 'posting_date': '2011-09-01', |
| 129 | 'transfer_date': '2011-09-01', |
| 130 | 'posting_time': '14:00', |
| 131 | 'company': 'comp', |
| 132 | 'fiscal_year' : '2011-2012', |
| 133 | 'purpose': 'Material Issue', |
| 134 | 'name': 'mi' |
| 135 | } |
| 136 | ), |
| 137 | Document( |
| 138 | fielddata ={ |
| 139 | 'doctype': 'Stock Entry Detail', |
| 140 | 'parenttype': 'Stock Entry', |
| 141 | 'parentfield' : 'mtn_details', |
| 142 | 'parent' : 'mi', |
| 143 | 'item_code' : 'it', |
| 144 | 's_warehouse' : 'wh1', |
| 145 | 'qty' : 4, |
| 146 | 'transfer_qty' : 4, |
| 147 | 'incoming_rate': 100, |
| 148 | 'stock_uom': 'Nos', |
| 149 | 'conversion_factor': 1, |
| 150 | 'serial_no': 'srno1, srno2, srno3, srno4' |
| 151 | } |
| 152 | ) |
| 153 | ] |