Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update stock module onboarding (frontport #25745) #27055

Merged
merged 16 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions erpnext/stock/doctype/delivery_note/delivery_note.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,23 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
dn_fields['taxes'].print_hide = 0;
}
}


frappe.tour['Delivery Note'] = [
{
fieldname: "customer",
title: __("Customer"),
description: __("This field is used to set the 'Customer'.")
},
{
fieldname: "items",
title: __("Items"),
description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.") + " " +
__("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
},
{
fieldname: "set_posting_time",
title: __("Edit Posting Date and Time"),
description: __("This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.")
}
]
2 changes: 1 addition & 1 deletion erpnext/stock/doctype/item/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,4 +792,4 @@ frappe.ui.form.on("UOM Conversion Detail", {
});
}
}
})
});
1 change: 1 addition & 0 deletions erpnext/stock/doctype/stock_entry/stock_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,3 +1101,4 @@ function check_should_not_attach_bom_items(bom_no) {
}

$.extend(cur_frm.cscript, new erpnext.stock.StockEntry({frm: cur_frm}));

Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,4 @@ erpnext.stock.StockReconciliation = class StockReconciliation extends erpnext.st
};

cur_frm.cscript = new erpnext.stock.StockReconciliation({frm: cur_frm});

33 changes: 0 additions & 33 deletions erpnext/stock/doctype/stock_settings/stock_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,3 @@ frappe.ui.form.on('Stock Settings', {
}
});

frappe.tour['Stock Settings'] = [
{
fieldname: "item_naming_by",
title: __("Item Naming By"),
description: __("By default, the Item Name is set as per the Item Code entered. If you want Items to be named by a ") + "<a href='https://docs.erpnext.com/docs/user/manual/en/setting-up/settings/naming-series' target='_blank'>Naming Series</a>" + __(" choose the 'Naming Series' option."),
},
{
fieldname: "default_warehouse",
title: __("Default Warehouse"),
description: __("Set a Default Warehouse for Inventory Transactions. This will be fetched into the Default Warehouse in the Item master.")
},
{
fieldname: "allow_negative_stock",
title: __("Allow Negative Stock"),
description: __("This will allow stock items to be displayed in negative values. Using this option depends on your use case. With this option unchecked, the system warns before obstructing a transaction that is causing negative stock.")

},
{
fieldname: "valuation_method",
title: __("Valuation Method"),
description: __("Choose between FIFO and Moving Average Valuation Methods. Click ") + "<a href='https://docs.erpnext.com/docs/user/manual/en/stock/articles/item-valuation-fifo-and-moving-average' target='_blank'>here</a>" + __(" to know more about them.")
},
{
fieldname: "show_barcode_field",
title: __("Show Barcode Field"),
description: __("Show 'Scan Barcode' field above every child table to insert Items with ease.")
},
{
fieldname: "automatically_set_serial_nos_based_on_fifo",
title: __("Automatically Set Serial Nos based on FIFO"),
description: __("Serial numbers for stock will be set automatically based on the Items entered based on first in first out in transactions like Purchase/Sales Invoices, Delivery Notes, etc.")
}
];
1 change: 1 addition & 0 deletions erpnext/stock/doctype/warehouse/warehouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ function convert_to_group_or_ledger(frm){

})
}

56 changes: 56 additions & 0 deletions erpnext/stock/form_tour/stock_entry/stock_entry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"creation": "2021-08-24 14:44:22.292652",
"docstatus": 0,
"doctype": "Form Tour",
"idx": 0,
"is_standard": 1,
"modified": "2021-08-25 16:31:31.441194",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",
"owner": "Administrator",
"reference_doctype": "Stock Entry",
"save_on_complete": 1,
"steps": [
{
"description": "Select the type of Stock Entry to be made. For now, to receive stock into a warehouses select <a href=\"https://docs.erpnext.com/docs/v13/user/manual/en/stock/articles/stock-entry-purpose#2purpose-material-receipt\" target=\"_blank\">Material Receipt.</a>",
"field": "",
"fieldname": "stock_entry_type",
"fieldtype": "Link",
"has_next_condition": 1,
"is_table_field": 0,
"label": "Stock Entry Type",
"next_step_condition": "eval: doc.stock_entry_type === \"Material Receipt\"",
"parent_field": "",
"position": "Top",
"title": "Stock Entry Type"
},
{
"description": "Select a target warehouse where the stock will be received.",
"field": "",
"fieldname": "to_warehouse",
"fieldtype": "Link",
"has_next_condition": 1,
"is_table_field": 0,
"label": "Default Target Warehouse",
"next_step_condition": "eval: doc.to_warehouse",
"parent_field": "",
"position": "Top",
"title": "Default Target Warehouse"
},
{
"description": "Select an item and entry quantity to be delivered.",
"field": "",
"fieldname": "items",
"fieldtype": "Table",
"has_next_condition": 1,
"is_table_field": 0,
"label": "Items",
"next_step_condition": "eval: doc.items[0]?.item_code",
"parent_field": "",
"position": "Top",
"title": "Items"
}
],
"title": "Stock Entry"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"creation": "2021-08-24 14:44:46.770952",
"docstatus": 0,
"doctype": "Form Tour",
"idx": 0,
"is_standard": 1,
"modified": "2021-08-25 16:26:11.718664",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Reconciliation",
"owner": "Administrator",
"reference_doctype": "Stock Reconciliation",
"save_on_complete": 1,
"steps": [
{
"description": "Set Purpose to Opening Stock to set the stock opening balance.",
"field": "",
"fieldname": "purpose",
"fieldtype": "Select",
"has_next_condition": 1,
"is_table_field": 0,
"label": "Purpose",
"next_step_condition": "eval: doc.purpose === \"Opening Stock\"",
"parent_field": "",
"position": "Top",
"title": "Purpose"
},
{
"description": "Select the items for which the opening stock has to be set.",
"field": "",
"fieldname": "items",
"fieldtype": "Table",
"has_next_condition": 1,
"is_table_field": 0,
"label": "Items",
"next_step_condition": "eval: doc.items[0]?.item_code",
"parent_field": "",
"position": "Top",
"title": "Items"
},
{
"description": "Edit the Posting Date by clicking on the Edit Posting Date and Time checkbox below.",
"field": "",
"fieldname": "posting_date",
"fieldtype": "Date",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Posting Date",
"parent_field": "",
"position": "Bottom",
"title": "Posting Date"
}
],
"title": "Stock Reconciliation"
}
89 changes: 89 additions & 0 deletions erpnext/stock/form_tour/stock_settings/stock_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"creation": "2021-08-20 15:20:59.336585",
"docstatus": 0,
"doctype": "Form Tour",
"idx": 0,
"is_standard": 1,
"modified": "2021-08-25 16:19:37.699528",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Settings",
"owner": "Administrator",
"reference_doctype": "Stock Settings",
"save_on_complete": 1,
"steps": [
{
"description": "By default, the Item Name is set as per the Item Code entered. If you want Items to be named by a Naming Series choose the 'Naming Series' option.",
"field": "",
"fieldname": "item_naming_by",
"fieldtype": "Select",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Item Naming By",
"parent_field": "",
"position": "Bottom",
"title": "Item Naming By"
},
{
"description": "Set a Default Warehouse for Inventory Transactions. This will be fetched into the Default Warehouse in the Item master.",
"field": "",
"fieldname": "default_warehouse",
"fieldtype": "Link",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Default Warehouse",
"parent_field": "",
"position": "Bottom",
"title": "Default Warehouse"
},
{
"description": "Quality inspection is performed on the inward and outward movement of goods. Receipt and delivery transactions will be stopped or the user will be warned if the quality inspection is not performed.",
"field": "",
"fieldname": "action_if_quality_inspection_is_not_submitted",
"fieldtype": "Select",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Action If Quality Inspection Is Not Submitted",
"parent_field": "",
"position": "Bottom",
"title": "Action if Quality Inspection Is Not Submitted"
},
{
"description": "Serial numbers for stock will be set automatically based on the Items entered based on first in first out in transactions like Purchase/Sales Invoices, Delivery Notes, etc.",
"field": "",
"fieldname": "automatically_set_serial_nos_based_on_fifo",
"fieldtype": "Check",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Automatically Set Serial Nos Based on FIFO",
"parent_field": "",
"position": "Bottom",
"title": "Automatically Set Serial Nos based on FIFO"
},
{
"description": "Show 'Scan Barcode' field above every child table to insert Items with ease.",
"field": "",
"fieldname": "show_barcode_field",
"fieldtype": "Check",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Show Barcode Field in Stock Transactions",
"parent_field": "",
"position": "Bottom",
"title": "Show Barcode Field"
},
{
"description": "Choose between FIFO and Moving Average Valuation Methods. Click <a href=\"https://docs.erpnext.com/docs/user/manual/en/stock/articles/item-valuation-fifo-and-moving-average\" target=\"_blank\">here</a> to know more about them.",
"field": "",
"fieldname": "valuation_method",
"fieldtype": "Select",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Default Valuation Method",
"parent_field": "",
"position": "Bottom",
"title": "Default Valuation Method"
}
],
"title": "Stock Settings"
}
54 changes: 54 additions & 0 deletions erpnext/stock/form_tour/warehouse/warehouse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"creation": "2021-08-24 14:43:44.465237",
"docstatus": 0,
"doctype": "Form Tour",
"idx": 0,
"is_standard": 1,
"modified": "2021-08-24 14:50:31.988256",
"modified_by": "Administrator",
"module": "Stock",
"name": "Warehouse",
"owner": "Administrator",
"reference_doctype": "Warehouse",
"save_on_complete": 1,
"steps": [
{
"description": "Select a name for the warehouse. This should reflect its location or purpose.",
"field": "",
"fieldname": "warehouse_name",
"fieldtype": "Data",
"has_next_condition": 1,
"is_table_field": 0,
"label": "Warehouse Name",
"next_step_condition": "eval: doc.warehouse_name",
"parent_field": "",
"position": "Bottom",
"title": "Warehouse Name"
},
{
"description": "Select a warehouse type to categorize the warehouse into a sub-group.",
"field": "",
"fieldname": "warehouse_type",
"fieldtype": "Link",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Warehouse Type",
"parent_field": "",
"position": "Top",
"title": "Warehouse Type"
},
{
"description": "Select an account to set a default account for all transactions with this warehouse.",
"field": "",
"fieldname": "account",
"fieldtype": "Link",
"has_next_condition": 0,
"is_table_field": 0,
"label": "Account",
"parent_field": "",
"position": "Top",
"title": "Account"
}
],
"title": "Warehouse"
}
16 changes: 5 additions & 11 deletions erpnext/stock/module_onboarding/stock/stock.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,26 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock",
"idx": 0,
"is_complete": 0,
"modified": "2020-10-14 14:54:42.741971",
"modified": "2021-08-20 14:38:55.570067",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock",
"owner": "Administrator",
"steps": [
{
"step": "Setup your Warehouse"
},
{
"step": "Create a Product"
},
{
"step": "Create a Supplier"
"step": "Stock Settings"
},
{
"step": "Introduction to Stock Entry"
"step": "Create a Warehouse"
},
{
"step": "Create a Stock Entry"
},
{
"step": "Create a Purchase Receipt"
"step": "Stock Opening Balance"
},
{
"step": "Stock Settings"
"step": "View Stock Projected Qty"
}
],
"subtitle": "Inventory, Warehouses, Analysis, and more.",
Expand Down
Loading