diff --git a/erpnext/healthcare/doctype/inpatient_record/test_inpatient_record.py b/erpnext/healthcare/doctype/inpatient_record/test_inpatient_record.py index 884974853d..f10725ed9b 100644 --- a/erpnext/healthcare/doctype/inpatient_record/test_inpatient_record.py +++ b/erpnext/healthcare/doctype/inpatient_record/test_inpatient_record.py @@ -105,7 +105,9 @@ def get_healthcare_service_unit(): parent_service_unit.healthcare_service_unit_name = "All Healthcare Service Units" parent_service_unit.is_group = 1 parent_service_unit.save(ignore_permissions = True) - service_unit.parent_healthcare_service_unit = "All Healthcare Service Units" + service_unit.parent_healthcare_service_unit = parent_service_unit.name + else: + service_unit.parent_healthcare_service_unit = service_unit_parent_name[0][0] service_unit.save(ignore_permissions = True) return service_unit.name return service_unit diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 35804899c8..925b159930 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -12,7 +12,7 @@ app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" develop_version = '12.x.x-develop' -staging_version = '11.0.3-beta.7' +staging_version = '11.0.3-beta.8' error_report_email = "support@erpnext.com" diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index bce5b9088a..81c5eb9550 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -141,9 +141,6 @@ class JobCard(Document): self.db_set('status', status) -def update_job_card_reference(name, fieldname, value): - frappe.db.set_value('Job Card', name, fieldname, value) - @frappe.whitelist() def make_material_request(source_name, target_doc=None): def update_item(obj, target, source_parent): diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 82f7512b5f..e0efda095d 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -50,7 +50,7 @@ def make_tax_account(company, account_name, tax_rate): "tax_rate": flt(tax_rate) if tax_rate else None }).insert(ignore_permissions=True, ignore_mandatory=True) except frappe.NameError: - frappe.message_log.pop() + if frappe.message_log: frappe.message_log.pop() abbr = frappe.get_cached_value('Company', company, 'abbr') account = '{0} - {1}'.format(account_name, abbr) return frappe.get_doc('Account', account) diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 42c837091c..df27a59a4a 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -15,7 +15,6 @@ from erpnext.controllers.buying_controller import BuyingController from erpnext.manufacturing.doctype.work_order.work_order import get_item_details from erpnext.buying.utils import check_for_closed_status, validate_for_items from erpnext.stock.doctype.item.item import get_item_defaults -from erpnext.manufacturing.doctype.job_card.job_card import update_job_card_reference from six import string_types @@ -93,9 +92,6 @@ class MaterialRequest(BuyingController): if self.material_request_type == 'Purchase': self.validate_budget() - if self.job_card: - update_job_card_reference(self.job_card, 'material_request', self.name) - def before_save(self): self.set_status(update=True) @@ -148,8 +144,6 @@ class MaterialRequest(BuyingController): def on_cancel(self): self.update_requested_qty() self.update_requested_qty_in_production_plan() - if self.job_card: - update_job_card_reference(self.job_card, 'material_request', None) def update_completed_qty(self, mr_items=None, update_modified=True): if self.material_request_type == "Purchase": diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index eb817e1756..d4e7b9574f 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -17,7 +17,6 @@ from erpnext.stock.utils import get_bin from erpnext.stock.doctype.serial_no.serial_no import update_serial_nos_after_submit, get_serial_nos import json -from erpnext.manufacturing.doctype.job_card.job_card import update_job_card_reference from six import string_types, itervalues, iteritems @@ -89,10 +88,6 @@ class StockEntry(StockController): if self.work_order and self.purpose == "Manufacture": self.update_so_in_serial_number() - - if self.job_card: - update_job_card_reference(self.job_card, 'stock_entry', self.name) - def on_cancel(self): if self.purchase_order and self.purpose == "Subcontract": @@ -107,9 +102,6 @@ class StockEntry(StockController): self.make_gl_entries_on_cancel() self.update_cost_in_project() - if self.job_card: - update_job_card_reference(self.job_card, 'stock_entry', None) - def set_job_card_data(self): if self.job_card and not self.work_order: data = frappe.db.get_value('Job Card',