Add location on Asset to use make_demo
This commit is contained in:
parent
0fde102ea5
commit
aa08fb9716
@ -4,48 +4,55 @@
|
|||||||
"item_code": "Computer",
|
"item_code": "Computer",
|
||||||
"gross_purchase_amount": 100000,
|
"gross_purchase_amount": 100000,
|
||||||
"asset_owner": "Company",
|
"asset_owner": "Company",
|
||||||
"available_for_use_date": "2017-01-02"
|
"available_for_use_date": "2017-01-02",
|
||||||
|
"location": "Main Location"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"asset_name": "Macbook Air - 1",
|
"asset_name": "Macbook Air - 1",
|
||||||
"item_code": "Computer",
|
"item_code": "Computer",
|
||||||
"gross_purchase_amount": 60000,
|
"gross_purchase_amount": 60000,
|
||||||
"asset_owner": "Company",
|
"asset_owner": "Company",
|
||||||
"available_for_use_date": "2017-10-02"
|
"available_for_use_date": "2017-10-02",
|
||||||
|
"location": "Avg Location"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"asset_name": "Conferrence Table",
|
"asset_name": "Conferrence Table",
|
||||||
"item_code": "Table",
|
"item_code": "Table",
|
||||||
"gross_purchase_amount": 30000,
|
"gross_purchase_amount": 30000,
|
||||||
"asset_owner": "Company",
|
"asset_owner": "Company",
|
||||||
"available_for_use_date": "2018-10-02"
|
"available_for_use_date": "2018-10-02",
|
||||||
|
"location": "Zany Location"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"asset_name": "Lunch Table",
|
"asset_name": "Lunch Table",
|
||||||
"item_code": "Table",
|
"item_code": "Table",
|
||||||
"gross_purchase_amount": 20000,
|
"gross_purchase_amount": 20000,
|
||||||
"asset_owner": "Company",
|
"asset_owner": "Company",
|
||||||
"available_for_use_date": "2018-06-02"
|
"available_for_use_date": "2018-06-02",
|
||||||
|
"location": "Fletcher Location"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"asset_name": "ERPNext",
|
"asset_name": "ERPNext",
|
||||||
"item_code": "ERP",
|
"item_code": "ERP",
|
||||||
"gross_purchase_amount": 100000,
|
"gross_purchase_amount": 100000,
|
||||||
"asset_owner": "Company",
|
"asset_owner": "Company",
|
||||||
"available_for_use_date": "2018-09-02"
|
"available_for_use_date": "2018-09-02",
|
||||||
|
"location":"Main Location"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"asset_name": "Chair 1",
|
"asset_name": "Chair 1",
|
||||||
"item_code": "Chair",
|
"item_code": "Chair",
|
||||||
"gross_purchase_amount": 10000,
|
"gross_purchase_amount": 10000,
|
||||||
"asset_owner": "Company",
|
"asset_owner": "Company",
|
||||||
"available_for_use_date": "2018-07-02"
|
"available_for_use_date": "2018-07-02",
|
||||||
|
"location": "Zany Location"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"asset_name": "Chair 2",
|
"asset_name": "Chair 2",
|
||||||
"item_code": "Chair",
|
"item_code": "Chair",
|
||||||
"gross_purchase_amount": 10000,
|
"gross_purchase_amount": 10000,
|
||||||
"asset_owner": "Company",
|
"asset_owner": "Company",
|
||||||
"available_for_use_date": "2018-07-02"
|
"available_for_use_date": "2018-07-02",
|
||||||
|
"location": "Avg Location"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
22
erpnext/demo/data/location.json
Normal file
22
erpnext/demo/data/location.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"location_name": "Main Location",
|
||||||
|
"latitude": 40.0,
|
||||||
|
"longitude": 20.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"location_name": "Avg Location",
|
||||||
|
"latitude": 63.0,
|
||||||
|
"longitude": 99.3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"location_name": "Zany Location",
|
||||||
|
"latitude": 47.5,
|
||||||
|
"longitude": 10.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"location_name": "Fletcher Location",
|
||||||
|
"latitude": 100.90,
|
||||||
|
"longitude": 80
|
||||||
|
}
|
||||||
|
]
|
@ -9,6 +9,7 @@ from erpnext.demo.domains import data
|
|||||||
from six import iteritems
|
from six import iteritems
|
||||||
|
|
||||||
def setup_data():
|
def setup_data():
|
||||||
|
import_json("Location")
|
||||||
import_json("Asset Category")
|
import_json("Asset Category")
|
||||||
setup_item()
|
setup_item()
|
||||||
setup_workstation()
|
setup_workstation()
|
||||||
|
@ -79,7 +79,7 @@ def make_stock_reconciliation():
|
|||||||
if item.qty:
|
if item.qty:
|
||||||
item.qty = item.qty - round(random.randint(1, item.qty))
|
item.qty = item.qty - round(random.randint(1, item.qty))
|
||||||
try:
|
try:
|
||||||
stock_reco.insert(ignore_permissions=True)
|
stock_reco.insert(ignore_permissions=True, ignore_mandatory=True)
|
||||||
stock_reco.submit()
|
stock_reco.submit()
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
except OpeningEntryAccountError:
|
except OpeningEntryAccountError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user