Merge branch 'develop' into remove-move-stock-summary
This commit is contained in:
commit
aea2b64fd0
@ -3,43 +3,6 @@ from frappe import _
|
||||
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Production"),
|
||||
"icon": "fa fa-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Work Order",
|
||||
"description": _("Orders released for production."),
|
||||
"onboard": 1,
|
||||
"dependencies": ["Item", "BOM"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Plan",
|
||||
"description": _("Generate Material Requests (MRP) and Work Orders."),
|
||||
"onboard": 1,
|
||||
"dependencies": ["Item", "BOM"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Stock Entry",
|
||||
"onboard": 1,
|
||||
"dependencies": ["Item"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Timesheet",
|
||||
"description": _("Time Sheet for manufacturing."),
|
||||
"onboard": 1,
|
||||
"dependencies": ["Activity Type"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Job Card"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Bill of Materials"),
|
||||
"items": [
|
||||
@ -85,6 +48,43 @@ def get_data():
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Production"),
|
||||
"icon": "fa fa-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Work Order",
|
||||
"description": _("Orders released for production."),
|
||||
"onboard": 1,
|
||||
"dependencies": ["Item", "BOM"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Plan",
|
||||
"description": _("Generate Material Requests (MRP) and Work Orders."),
|
||||
"onboard": 1,
|
||||
"dependencies": ["Item", "BOM"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Stock Entry",
|
||||
"onboard": 1,
|
||||
"dependencies": ["Item"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Timesheet",
|
||||
"description": _("Time Sheet for manufacturing."),
|
||||
"onboard": 1,
|
||||
"dependencies": ["Activity Type"]
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Job Card"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "fa fa-wrench",
|
||||
|
@ -110,4 +110,4 @@ def build_cache(item_code):
|
||||
def enqueue_build_cache(item_code):
|
||||
if frappe.cache().hget('item_cache_build_in_progress', item_code):
|
||||
return
|
||||
frappe.enqueue(build_cache, item_code=item_code, queue='short')
|
||||
frappe.enqueue(build_cache, item_code=item_code, queue='long')
|
||||
|
@ -383,8 +383,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
|
||||
setup_sms: function() {
|
||||
var me = this;
|
||||
let blacklist = ['Purchase Invoice', 'BOM'];
|
||||
if(this.frm.doc.docstatus===1 && !in_list(["Lost", "Stopped", "Closed"], this.frm.doc.status)
|
||||
&& this.frm.doctype != "Purchase Invoice") {
|
||||
&& !blacklist.includes(this.frm.doctype)) {
|
||||
this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); });
|
||||
}
|
||||
},
|
||||
|
@ -324,8 +324,10 @@ class StockEntry(StockController):
|
||||
completed_qty = d.completed_qty + (allowance_percentage/100 * d.completed_qty)
|
||||
if total_completed_qty > flt(completed_qty):
|
||||
job_card = frappe.db.get_value('Job Card', {'operation_id': d.name}, 'name')
|
||||
frappe.throw(_("Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Work Order # {3}. Please update operation status via Job Card # {4}")
|
||||
.format(d.idx, d.operation, total_completed_qty, self.work_order, job_card), OperationsNotCompleteError)
|
||||
work_order_link = frappe.utils.get_link_to_form('Work Order', self.work_order)
|
||||
job_card_link = frappe.utils.get_link_to_form('Job Card', job_card)
|
||||
frappe.throw(_("Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Work Order {3}. Please update operation status via Job Card {4}.")
|
||||
.format(d.idx, frappe.bold(d.operation), frappe.bold(total_completed_qty), work_order_link, job_card_link), OperationsNotCompleteError)
|
||||
|
||||
def check_duplicate_entry_for_work_order(self):
|
||||
other_ste = [t[0] for t in frappe.db.get_values("Stock Entry", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user