Merge pull request #4691 from anandpdoshi/cleanup/remove-is-service-item

[cleanup] Removed 'Is Service Item' checkbox and filters
This commit is contained in:
Nabin Hait
2016-01-29 11:10:54 +05:30
10 changed files with 20 additions and 81 deletions

View File

@@ -28,14 +28,9 @@ class Quotation(SellingController):
def validate_order_type(self):
super(Quotation, self).validate_order_type()
if self.order_type in ['Maintenance', 'Service']:
for d in self.get('items'):
if not frappe.db.get_value("Item", d.item_code, "is_service_item"):
frappe.throw(_("Item {0} must be Service Item").format(d.item_code))
else:
for d in self.get('items'):
if not frappe.db.get_value("Item", d.item_code, "is_sales_item"):
frappe.throw(_("Item {0} must be Sales Item").format(d.item_code))
for d in self.get('items'):
if not frappe.db.get_value("Item", d.item_code, "is_sales_item"):
frappe.throw(_("Item {0} must be Sales Item").format(d.item_code))
def validate_quotation_to(self):
if self.customer:

View File

@@ -56,9 +56,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
this.frm.set_query("item_code", "items", function() {
return {
query: "erpnext.controllers.queries.item_query",
filters: (me.frm.doc.order_type === "Maintenance" ?
{'is_service_item': 1}:
{'is_sales_item': 1 })
filters: {'is_sales_item': 1}
}
});
}
@@ -289,7 +287,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
}
refresh_field('product_bundle_help');
},
make_payment_request: function() {
frappe.call({
method:"erpnext.accounts.doctype.payment_request.payment_request.make_payment_request",