blob: e617c083137a8367fd29fd33f5206b1d714e3dcb [file] [log] [blame]
Rushabh Mehta3966f1d2012-02-23 12:35:32 +05301# 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 Doshi486f9df2012-07-19 13:40:31 +053017from __future__ import unicode_literals
Nabin Hait31665e52011-09-29 10:41:02 +053018from webnotes.model.doc import Document
19
Nabin Haita970b112011-09-30 18:05:08 +053020# Material Receipt
21#-----------------------
22
Nabin Hait31665e52011-09-29 10:41:02 +053023mr = [
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 Hait88f9cb52011-09-30 17:20:06 +053033 'name': 'mr'
Nabin Hait31665e52011-09-29 10:41:02 +053034 }
35 ),
36 Document(
37 fielddata ={
38 'doctype': 'Stock Entry Detail',
39 'parenttype': 'Stock Entry',
40 'parentfield' : 'mtn_details',
Nabin Hait88f9cb52011-09-30 17:20:06 +053041 'parent' : 'mr',
Nabin Hait31665e52011-09-29 10:41:02 +053042 '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 Hait88f9cb52011-09-30 17:20:06 +053053
Nabin Hait2cca0e72011-11-09 12:12:53 +053054mr1 = [
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 Haita970b112011-09-30 18:05:08 +053086# Material Transfer
87#--------------------
Nabin Hait88f9cb52011-09-30 17:20:06 +053088
89mtn = [
90 Document(
91 fielddata = {
92 'doctype': 'Stock Entry',
93 'posting_date': '2011-09-01',
94 'transfer_date': '2011-09-01',
Nabin Hait93ba4fb2011-11-08 15:30:04 +053095 'posting_time': '12:00',
Nabin Hait88f9cb52011-09-30 17:20:06 +053096 '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 Haita970b112011-09-30 18:05:08 +0530120
121# Material Issue
122#--------------------
123
124mi = [
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]