[fix] [minor] autoload chart of accounts
This commit is contained in:
parent
9a2dc8332b
commit
5a700820e7
@ -165,6 +165,7 @@ erpnext.patches.v5_0.set_footer_address
|
|||||||
execute:frappe.db.set_value("Backup Manager", None, "send_backups_to_dropbox", 1 if frappe.db.get_value("Backup Manager", None, "upload_backups_to_dropbox") in ("Daily", "Weekly") else 0)
|
execute:frappe.db.set_value("Backup Manager", None, "send_backups_to_dropbox", 1 if frappe.db.get_value("Backup Manager", None, "upload_backups_to_dropbox") in ("Daily", "Weekly") else 0)
|
||||||
execute:frappe.db.sql_list("delete from `tabDocPerm` where parent='Issue' and modified_by='Administrator' and role='Guest'")
|
execute:frappe.db.sql_list("delete from `tabDocPerm` where parent='Issue' and modified_by='Administrator' and role='Guest'")
|
||||||
erpnext.patches.v5_0.update_item_and_description_again
|
erpnext.patches.v5_0.update_item_and_description_again
|
||||||
|
erpnext.patches.v6_0.multi_currency
|
||||||
erpnext.patches.v5_0.repost_gle_for_jv_with_multiple_party
|
erpnext.patches.v5_0.repost_gle_for_jv_with_multiple_party
|
||||||
erpnext.patches.v5_0.portal_fixes
|
erpnext.patches.v5_0.portal_fixes
|
||||||
erpnext.patches.v5_0.reset_values_in_tools
|
erpnext.patches.v5_0.reset_values_in_tools
|
||||||
@ -207,7 +208,6 @@ execute:frappe.db.set_value("Stock Settings", None, "automatically_set_serial_no
|
|||||||
execute:frappe.db.sql("""update `tabProject` set percent_complete=round(percent_complete, 2) where percent_complete is not null""")
|
execute:frappe.db.sql("""update `tabProject` set percent_complete=round(percent_complete, 2) where percent_complete is not null""")
|
||||||
erpnext.patches.v6_0.fix_outstanding_amount
|
erpnext.patches.v6_0.fix_outstanding_amount
|
||||||
erpnext.patches.v6_0.fix_planned_qty
|
erpnext.patches.v6_0.fix_planned_qty
|
||||||
erpnext.patches.v6_0.multi_currency
|
|
||||||
erpnext.patches.v6_2.remove_newsletter_duplicates
|
erpnext.patches.v6_2.remove_newsletter_duplicates
|
||||||
erpnext.patches.v6_2.fix_missing_default_taxes_and_lead
|
erpnext.patches.v6_2.fix_missing_default_taxes_and_lead
|
||||||
erpnext.patches.v6_3.convert_applicable_territory
|
erpnext.patches.v6_3.convert_applicable_territory
|
||||||
|
|||||||
@ -139,8 +139,8 @@ class SerialNo(StockController):
|
|||||||
return sle_dict
|
return sle_dict
|
||||||
|
|
||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
sl_entries = frappe.db.sql("""select serial_no from `tabStock Ledger Entry`
|
sl_entries = frappe.db.sql("""select serial_no from `tabStock Ledger Entry`
|
||||||
where serial_no like %s and item_code=%s and ifnull(is_cancelled, 'No')='No'""",
|
where serial_no like %s and item_code=%s and ifnull(is_cancelled, 'No')='No'""",
|
||||||
("%%%s%%" % self.name, self.item_code), as_dict=True)
|
("%%%s%%" % self.name, self.item_code), as_dict=True)
|
||||||
|
|
||||||
# Find the exact match
|
# Find the exact match
|
||||||
@ -149,7 +149,7 @@ class SerialNo(StockController):
|
|||||||
if self.name.upper() in get_serial_nos(d.serial_no):
|
if self.name.upper() in get_serial_nos(d.serial_no):
|
||||||
sle_exists = True
|
sle_exists = True
|
||||||
break
|
break
|
||||||
|
|
||||||
if sle_exists:
|
if sle_exists:
|
||||||
frappe.throw(_("Cannot delete Serial No {0}, as it is used in stock transactions").format(self.name))
|
frappe.throw(_("Cannot delete Serial No {0}, as it is used in stock transactions").format(self.name))
|
||||||
|
|
||||||
@ -208,9 +208,9 @@ def validate_serial_no(sle, item_det):
|
|||||||
if not allow_serial_nos_with_different_item(serial_no, sle):
|
if not allow_serial_nos_with_different_item(serial_no, sle):
|
||||||
frappe.throw(_("Serial No {0} does not belong to Item {1}").format(serial_no,
|
frappe.throw(_("Serial No {0} does not belong to Item {1}").format(serial_no,
|
||||||
sle.item_code), SerialNoItemError)
|
sle.item_code), SerialNoItemError)
|
||||||
|
|
||||||
if sr.warehouse and sle.actual_qty > 0:
|
if sr.warehouse and sle.actual_qty > 0:
|
||||||
frappe.throw(_("Serial No {0} has already been received").format(sr.name),
|
frappe.throw(_("Serial No {0} has already been received").format(serial_no),
|
||||||
SerialNoDuplicateError)
|
SerialNoDuplicateError)
|
||||||
|
|
||||||
if sle.actual_qty < 0:
|
if sle.actual_qty < 0:
|
||||||
@ -229,10 +229,10 @@ def validate_serial_no(sle, item_det):
|
|||||||
elif sle.actual_qty < 0 or not item_det.serial_no_series:
|
elif sle.actual_qty < 0 or not item_det.serial_no_series:
|
||||||
frappe.throw(_("Serial Nos Required for Serialized Item {0}").format(sle.item_code),
|
frappe.throw(_("Serial Nos Required for Serialized Item {0}").format(sle.item_code),
|
||||||
SerialNoRequiredError)
|
SerialNoRequiredError)
|
||||||
|
|
||||||
def allow_serial_nos_with_different_item(sle_serial_no, sle):
|
def allow_serial_nos_with_different_item(sle_serial_no, sle):
|
||||||
"""
|
"""
|
||||||
Allows same serial nos for raw materials and finished goods
|
Allows same serial nos for raw materials and finished goods
|
||||||
in Manufacture / Repack type Stock Entry
|
in Manufacture / Repack type Stock Entry
|
||||||
"""
|
"""
|
||||||
allow_serial_nos = False
|
allow_serial_nos = False
|
||||||
@ -244,9 +244,9 @@ def allow_serial_nos_with_different_item(sle_serial_no, sle):
|
|||||||
serial_nos = get_serial_nos(d.serial_no)
|
serial_nos = get_serial_nos(d.serial_no)
|
||||||
if sle_serial_no in serial_nos:
|
if sle_serial_no in serial_nos:
|
||||||
allow_serial_nos = True
|
allow_serial_nos = True
|
||||||
|
|
||||||
return allow_serial_nos
|
return allow_serial_nos
|
||||||
|
|
||||||
def update_serial_nos(sle, item_det):
|
def update_serial_nos(sle, item_det):
|
||||||
if sle.is_cancelled == "No" and not sle.serial_no and sle.actual_qty > 0 \
|
if sle.is_cancelled == "No" and not sle.serial_no and sle.actual_qty > 0 \
|
||||||
and item_det.has_serial_no == 1 and item_det.serial_no_series:
|
and item_det.has_serial_no == 1 and item_det.serial_no_series:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user