fix: port from hotfix (#18974)
* fix: '>' not supported between instances of 'int' and 'str' * fix: not able to save item because price list has disabled
This commit is contained in:
parent
69aeff15ef
commit
d312d11062
@ -32,10 +32,16 @@ class ItemPrice(Document):
|
||||
|
||||
def update_price_list_details(self):
|
||||
if self.price_list:
|
||||
self.buying, self.selling, self.currency = \
|
||||
frappe.db.get_value("Price List",
|
||||
{"name": self.price_list, "enabled": 1},
|
||||
["buying", "selling", "currency"])
|
||||
price_list_details = frappe.db.get_value("Price List",
|
||||
{"name": self.price_list, "enabled": 1},
|
||||
["buying", "selling", "currency"])
|
||||
|
||||
if not price_list_details:
|
||||
link = frappe.utils.get_link_to_form('Price List', self.price_list)
|
||||
frappe.throw("The price list {0} does not exists or disabled".
|
||||
format(link))
|
||||
|
||||
self.buying, self.selling, self.currency = price_list_details
|
||||
|
||||
def update_item_details(self):
|
||||
if self.item_code:
|
||||
|
@ -74,7 +74,7 @@
|
||||
{
|
||||
"description": "Identification of the package for the delivery (for print)",
|
||||
"fieldname": "from_case_no",
|
||||
"fieldtype": "Data",
|
||||
"fieldtype": "Int",
|
||||
"in_list_view": 1,
|
||||
"label": "From Package No.",
|
||||
"no_copy": 1,
|
||||
@ -88,7 +88,7 @@
|
||||
{
|
||||
"description": "If more than one package of the same type (for print)",
|
||||
"fieldname": "to_case_no",
|
||||
"fieldtype": "Data",
|
||||
"fieldtype": "Int",
|
||||
"in_list_view": 1,
|
||||
"label": "To Package No.",
|
||||
"no_copy": 1,
|
||||
@ -180,7 +180,7 @@
|
||||
"icon": "fa fa-suitcase",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2019-05-31 04:45:08.082862",
|
||||
"modified": "2019-09-09 04:45:08.082862",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Packing Slip",
|
||||
@ -261,4 +261,4 @@
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ class PackingSlip(Document):
|
||||
frappe.msgprint(_("'To Case No.' cannot be less than 'From Case No.'"),
|
||||
raise_exception=1)
|
||||
|
||||
|
||||
res = frappe.db.sql("""SELECT name FROM `tabPacking Slip`
|
||||
WHERE delivery_note = %(delivery_note)s AND docstatus = 1 AND
|
||||
((from_case_no BETWEEN %(from_case_no)s AND %(to_case_no)s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user