Made POS Profile mandatory and changed test order
This commit is contained in:
parent
eb760d6d09
commit
ff73646212
@ -16,6 +16,8 @@ def get_pos_data():
|
||||
doc = frappe.new_doc('Sales Invoice')
|
||||
doc.is_pos = 1;
|
||||
pos_profile = get_pos_profile(doc.company) or {}
|
||||
if not pos_profile:
|
||||
frappe.throw(_("POS Profile is required to use Point-of-Sale"))
|
||||
if not doc.company: doc.company = pos_profile.get('company')
|
||||
doc.update_stock = pos_profile.get('update_stock')
|
||||
|
||||
|
@ -6,7 +6,8 @@ import frappe
|
||||
|
||||
def execute():
|
||||
doctype = 'POS Profile'
|
||||
frappe.reload_doctype(doctype)
|
||||
frappe.reload_doc('accounts', 'doctype', doctype)
|
||||
frappe.reload_doc('accounts', 'doctype', 'POS Profile User')
|
||||
|
||||
for doc in frappe.get_all(doctype):
|
||||
_doc = frappe.get_doc(doctype, doc.name)
|
||||
|
@ -326,6 +326,9 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
__('Select POS Profile')
|
||||
);
|
||||
}
|
||||
} else {
|
||||
frappe.dom.unfreeze();
|
||||
frappe.throw(__("POS Profile is required to use Point-of-Sale"));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -50,8 +50,8 @@ erpnext/schools/doctype/room/test_room.js
|
||||
erpnext/schools/doctype/instructor/test_instructor.js
|
||||
erpnext/stock/doctype/warehouse/test_warehouse.js
|
||||
erpnext/manufacturing/doctype/production_order/test_production_order.js #long
|
||||
erpnext/selling/page/point_of_sale/tests/test_point_of_sale.js
|
||||
erpnext/accounts/page/pos/test_pos.js
|
||||
erpnext/selling/page/point_of_sale/tests/test_point_of_sale.js
|
||||
erpnext/selling/doctype/product_bundle/test_product_bundle.js
|
||||
erpnext/stock/doctype/delivery_note/test_delivery_note.js
|
||||
erpnext/stock/doctype/material_request/tests/test_material_request.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user