From 95054a5a02ba19c70841ab2da5d151daa281d452 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Thu, 4 Jul 2019 16:13:56 +0530 Subject: [PATCH 1/8] fix: Try Faster Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8a0d82614..4a297e11c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ install: - nvm install 10 - pip install python-coveralls - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py - - sudo python install.py --develop --user travis --without-bench-setup + - sudo python install.py --develop --user travis --without-bench-setup --frappe-branch-url https://github.com/adityahase/frappe --frappe-branch faster-travis - sudo pip install -e ~/bench - rm $TRAVIS_BUILD_DIR/.git/shallow From 697f995b27b4717823c13521e4a534ae04531783 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Thu, 4 Jul 2019 16:19:22 +0530 Subject: [PATCH 2/8] fix: Send --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4a297e11c0..200668d79b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ install: - nvm install 10 - pip install python-coveralls - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py - - sudo python install.py --develop --user travis --without-bench-setup --frappe-branch-url https://github.com/adityahase/frappe --frappe-branch faster-travis + - sudo python install.py --develop --user travis --without-bench-setup --frappe-repo-url https://github.com/adityahase/frappe --frappe-branch faster-travis - sudo pip install -e ~/bench - rm $TRAVIS_BUILD_DIR/.git/shallow From d7291dbcad7dd9036eaad279ba6a30815a7486e6 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Thu, 4 Jul 2019 16:51:53 +0530 Subject: [PATCH 3/8] Revert "fix: Send" This reverts commit 697f995b27b4717823c13521e4a534ae04531783. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 200668d79b..4a297e11c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ install: - nvm install 10 - pip install python-coveralls - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py - - sudo python install.py --develop --user travis --without-bench-setup --frappe-repo-url https://github.com/adityahase/frappe --frappe-branch faster-travis + - sudo python install.py --develop --user travis --without-bench-setup --frappe-branch-url https://github.com/adityahase/frappe --frappe-branch faster-travis - sudo pip install -e ~/bench - rm $TRAVIS_BUILD_DIR/.git/shallow From e5dc834ddb1f312a4d9514df6af9ddcffa0ad9a4 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Thu, 4 Jul 2019 16:52:01 +0530 Subject: [PATCH 4/8] Revert "fix: Try Faster Travis" This reverts commit 95054a5a02ba19c70841ab2da5d151daa281d452. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4a297e11c0..a8a0d82614 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ install: - nvm install 10 - pip install python-coveralls - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py - - sudo python install.py --develop --user travis --without-bench-setup --frappe-branch-url https://github.com/adityahase/frappe --frappe-branch faster-travis + - sudo python install.py --develop --user travis --without-bench-setup - sudo pip install -e ~/bench - rm $TRAVIS_BUILD_DIR/.git/shallow From a5d975d867a0f09cdf97d93b2a579658bde1717b Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 4 Jul 2019 17:47:28 +0530 Subject: [PATCH 5/8] fix: Don't show Send SMS in BOM --- erpnext/public/js/controllers/transaction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index bbd1f1c17b..741f21e712 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -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(); }); } }, From 1d3008750c6de8a83b5ecbde0bb261ebde3fc8c4 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 4 Jul 2019 17:53:10 +0530 Subject: [PATCH 6/8] fix(UX): Move Bill of Materials section to first --- erpnext/config/manufacturing.py | 74 ++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/erpnext/config/manufacturing.py b/erpnext/config/manufacturing.py index da60550221..c79c5b8b11 100644 --- a/erpnext/config/manufacturing.py +++ b/erpnext/config/manufacturing.py @@ -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", From 2b969a469a05c2e4962cc080e71a6b6acf716616 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 4 Jul 2019 18:52:32 +0530 Subject: [PATCH 7/8] fix: Build item cache in long worker (#18165) --- erpnext/portal/product_configurator/item_variants_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/portal/product_configurator/item_variants_cache.py b/erpnext/portal/product_configurator/item_variants_cache.py index f33c8d605b..fc294ce58b 100644 --- a/erpnext/portal/product_configurator/item_variants_cache.py +++ b/erpnext/portal/product_configurator/item_variants_cache.py @@ -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') From 23c80658bae91468f18b6305430ed328ad582f5f Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 4 Jul 2019 18:54:04 +0530 Subject: [PATCH 8/8] fix: Add links in validation message --- erpnext/stock/doctype/stock_entry/stock_entry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 464101e672..0abcbb328a 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -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", {