brotherton-erpnext/sandbox/testdata/stock_entry.py

154 lines
3.5 KiB
Python
Raw Normal View History

2012-02-23 07:05:32 +00:00
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from webnotes.model.doc import Document
2011-09-30 12:35:08 +00:00
# Material Receipt
#-----------------------
mr = [
Document(
fielddata = {
'doctype': 'Stock Entry',
'posting_date': '2011-09-01',
'transfer_date': '2011-09-01',
'posting_time': '12:00',
'company': 'comp',
'fiscal_year' : '2011-2012',
'purpose': 'Material Receipt',
2011-09-30 11:50:06 +00:00
'name': 'mr'
}
),
Document(
fielddata ={
'doctype': 'Stock Entry Detail',
'parenttype': 'Stock Entry',
'parentfield' : 'mtn_details',
2011-09-30 11:50:06 +00:00
'parent' : 'mr',
'item_code' : 'it',
't_warehouse' : 'wh1',
'qty' : 10,
'transfer_qty' : 10,
'incoming_rate': 100,
'stock_uom': 'Nos',
'conversion_factor': 1,
'serial_no': 'srno1, srno2, srno3, srno4, srno5, srno6, srno7, srno8, srno9, srno10'
}
)
]
2011-09-30 11:50:06 +00:00
mr1 = [
Document(
fielddata = {
'doctype': 'Stock Entry',
'posting_date': '2011-09-01',
'transfer_date': '2011-09-01',
'posting_time': '12:00',
'company': 'comp',
'fiscal_year' : '2011-2012',
'purpose': 'Material Receipt',
'name': 'mr1'
}
),
Document(
fielddata ={
'doctype': 'Stock Entry Detail',
'parenttype': 'Stock Entry',
'parentfield' : 'mtn_details',
'parent' : 'mr1',
'item_code' : 'it',
't_warehouse' : 'wh1',
'qty' : 5,
'transfer_qty' : 5,
'incoming_rate': 400,
'stock_uom': 'Nos',
'conversion_factor': 1,
'serial_no': 'srno11, srno12, srno13, srno14, srno15'
}
)
]
2011-09-30 12:35:08 +00:00
# Material Transfer
#--------------------
2011-09-30 11:50:06 +00:00
mtn = [
Document(
fielddata = {
'doctype': 'Stock Entry',
'posting_date': '2011-09-01',
'transfer_date': '2011-09-01',
2011-11-08 10:00:04 +00:00
'posting_time': '12:00',
2011-09-30 11:50:06 +00:00
'company': 'comp',
'fiscal_year' : '2011-2012',
'purpose': 'Material Transfer',
'name': 'mtn'
}
),
Document(
fielddata ={
'doctype': 'Stock Entry Detail',
'parenttype': 'Stock Entry',
'parentfield' : 'mtn_details',
'parent' : 'mtn',
'item_code' : 'it',
's_warehouse' : 'wh1',
't_warehouse' : 'wh2',
'qty' : 5,
'transfer_qty' : 5,
'incoming_rate': 100,
'stock_uom': 'Nos',
'conversion_factor': 1,
'serial_no': 'srno1, srno2, srno3, srno4, srno5'
}
)
]
2011-09-30 12:35:08 +00:00
# Material Issue
#--------------------
mi = [
Document(
fielddata = {
'doctype': 'Stock Entry',
'posting_date': '2011-09-01',
'transfer_date': '2011-09-01',
'posting_time': '14:00',
'company': 'comp',
'fiscal_year' : '2011-2012',
'purpose': 'Material Issue',
'name': 'mi'
}
),
Document(
fielddata ={
'doctype': 'Stock Entry Detail',
'parenttype': 'Stock Entry',
'parentfield' : 'mtn_details',
'parent' : 'mi',
'item_code' : 'it',
's_warehouse' : 'wh1',
'qty' : 4,
'transfer_qty' : 4,
'incoming_rate': 100,
'stock_uom': 'Nos',
'conversion_factor': 1,
'serial_no': 'srno1, srno2, srno3, srno4'
}
)
]