i edit config/stock.py, and change some modules name like “label”: _(“Help”) change to “label”: _(“Help you”), but it doesn’t work, is there anything i missed?
@makarand_b ,
it doesn’t work too. And i remove all .pyc but it just only init.py and desktop.py generate .pyc, i think it might not execute the stock.py.
thanks
Stop and restart bench
@JoEz ,
i try > bench start and > bench --site erpnext migrate but it doesn’t work,
and > bench restart has something wrong
thanks
you seems in production env so u have to restart supervisionctl
:
sudo supervisorctl stop
sudo supervisorctl start
if you are in develop env u should use:
ctrl+c
to stop
bench start
@JoEz ,
yes, i put erpnext in production.
i try supervisorctl stop, start
and bench restart
and then…
if you are in production u have to use only:
sudo supervisorctl stop
sudo supervisorctl start
post entire trace
this is whole trace
Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/app.py”, line 59, in application
response = frappe.handler.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 42, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 900, in call
return fn(*args, **newargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/moduleview.py”, line 14, in get
data = get_data(module)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/moduleview.py”, line 30, in get_data
data = build_config_from_file(module)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/moduleview.py”, line 54, in build_config_from_file
data += get_config(app, module)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/moduleview.py”, line 160, in get_config
for item in section[“items”]:
TypeError: string indices must be integers
did u modify the code?
i only change “label”: _(“Help you”) for “label”: _(“Help”) in config/stock.py
“label”: _(“Help you”),
“icon”: “fa fa-facetime-video”,
“items”:
that bug trace only show at the first time i clicked “Stock”, and then it show “Help” not “Help you” as usual
can u post all the stock.py
file
from future import unicode_literals
from frappe import _
def get_data():
return [
{
“label”: _(“Stock Transactions”),
“items”: [
{
“type”: “doctype”,
“name”: “Stock Entry”,
“description”: _(“Record item movement.”),
},
{
“type”: “doctype”,
“name”: “Delivery Note”,
“description”: _(“Shipments to customers.”),
},
{
“type”: “doctype”,
“name”: “Purchase Receipt”,
“description”: _(“Goods received from Suppliers.”),
},
{
“type”: “doctype”,
“name”: “Material Request”,
“description”: _(“Requests for items.”),
},
]
},
{
“label”: _(“Stock Reports”),
“items”: [
{
“type”: “report”,
“is_query_report”: True,
“name”: “Stock Ledger”,
“doctype”: “Stock Ledger Entry”,
},
{
“type”: “report”,
“is_query_report”: True,
“name”: “Stock Balance”,
“doctype”: “Stock Ledger Entry”
},
{
“type”: “report”,
“is_query_report”: True,
“name”: “Stock Projected Qty”,
“doctype”: “Item”,
},
{
“type”: “report”,
“is_query_report”: True,
“name”: “Stock Ageing”,
“doctype”: “Item”,
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "doctype",
"name": "Item Group",
"icon": "fa fa-sitemap",
"label": _("Item Group"),
"link": "Tree/Item Group",
"description": _("Tree of Item Groups."),
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "Report/Item Price"
},
{
"type": "doctype",
"name": "Shipping Rule",
"description": _("Rules for adding shipping costs.")
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
]
},
{
"label": _("Serial No and Batch"),
"items": [
{
"type": "doctype",
"name": "Serial No",
"description": _("Single unit of an Item."),
},
{
"type": "doctype",
"name": "Batch",
"description": _("Batch (lot) of an Item."),
},
{
"type": "doctype",
"name": "Installation Note",
"description": _("Installation record for a Serial No.")
},
{
"type": "report",
"name": "Serial No Service Contract Expiry",
"doctype": "Serial No"
},
{
"type": "report",
"name": "Serial No Status",
"doctype": "Serial No"
},
{
"type": "report",
"name": "Serial No Warranty Expiry",
"doctype": "Serial No"
},
]
},
{
"label": _("Tools"),
"icon": "fa fa-wrench",
"items": [
{
"type": "doctype",
"name": "Stock Reconciliation",
"description": _("Upload stock balance via csv.")
},
{
"type": "doctype",
"name": "Packing Slip",
"description": _("Split Delivery Note into packages.")
},
{
"type": "doctype",
"name": "Quality Inspection",
"description": _("Incoming quality inspection.")
},
{
"type": "doctype",
"name": "Landed Cost Voucher",
"description": _("Update additional costs to calculate landed cost of items"),
}
]
},
{
"label": _("Setup"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Stock Settings",
"description": _("Default settings for stock transactions.")
},
{
"type": "doctype",
"name": "Warehouse",
"description": _("Where items are stored."),
},
{
"type": "doctype",
"name": "UOM",
"label": _("Unit of Measure") + " (UOM)",
"description": _("e.g. Kg, Unit, Nos, m")
},
{
"type": "doctype",
"name": "Item Attribute",
"description": _("Attributes for Item Variants. e.g Size, Color etc."),
},
{
"type": "doctype",
"name": "Brand",
"description": _("Brand master.")
},
]
},
{
"label": _("Analytics"),
"icon": "fa fa-table",
"items": [
{
"type": "report",
"is_query_report": False,
"name": "Item-wise Price List Rate",
"doctype": "Item Price",
},
{
"type": "page",
"name": "stock-analytics",
"label": _("Stock Analytics"),
"icon": "fa fa-bar-chart"
},
{
"type": "report",
"is_query_report": True,
"name": "Delivery Note Trends",
"doctype": "Delivery Note"
},
{
"type": "report",
"is_query_report": True,
"name": "Purchase Receipt Trends",
"doctype": "Purchase Receipt"
},
]
},
{
"label": _("Reports"),
"icon": "fa fa-list",
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Ordered Items To Be Delivered",
"doctype": "Delivery Note"
},
{
"type": "report",
"is_query_report": True,
"name": "Purchase Order Items To Be Received",
"doctype": "Purchase Receipt"
},
{
"type": "report",
"name": "Item Shortage Report",
"route": "Report/Bin/Item Shortage Report",
"doctype": "Purchase Receipt"
},
{
"type": "report",
"is_query_report": True,
"name": "Requested Items To Be Transferred",
"doctype": "Material Request"
},
{
"type": "report",
"is_query_report": True,
"name": "Batch-Wise Balance History",
"doctype": "Batch"
},
{
"type": "report",
"is_query_report": True,
"name": "Batch Item Expiry Status",
"doctype": "Stock Ledger Entry"
},
{
"type": "report",
"is_query_report": True,
"name": "Item Prices",
"doctype": "Price List"
},
{
"type": "report",
"is_query_report": True,
"name": "Itemwise Recommended Reorder Level",
"doctype": "Item"
},
]
},
{
"label": _("Help you"),
"icon": "fa fa-facetime-video",
"items": [
{
"type": "help",
"label": _("Items and Pricing"),
"youtube_id": "qXaEwld4_Ps"
},
{
"type": "help",
"label": _("Item Variants"),
"youtube_id": "OGBETlCzU5o"
},
{
"type": "help",
"label": _("Opening Stock Balance"),
"youtube_id": "0yPgrtfeCTs"
},
{
"type": "help",
"label": _("Making Stock Entries"),
"youtube_id": "Njt107hlY3I"
},
{
"type": "help",
"label": _("Serialized Inventory"),
"youtube_id": "gvOVlEwFDAk"
},
{
"type": "help",
"label": _("Batch Inventory"),
"youtube_id": "J0QKl7ABPKM"
},
{
"type": "help",
"label": _("Managing Subcontracting"),
"youtube_id": "ThiMCC2DtKo"
},
]
}
]
@1117 can’t find the error, what about to use a erpnext.vm from https://erpnext.com/download? Not sure bitnami is up to date …
bench migrate
will do the job same issue happen to me .
regards