fix(patch): billable field not renamed
This commit is contained in:
parent
1270febfff
commit
0d8b9a9d0a
@ -3,12 +3,13 @@ import frappe
|
|||||||
from frappe.model.utils.rename_field import rename_field
|
from frappe.model.utils.rename_field import rename_field
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
if "billable" in frappe.db.get_table_columns("Timesheet Detail"):
|
frappe.reload_doc("projects", "doctype", "timesheet")
|
||||||
|
frappe.reload_doc("projects", "doctype", "timesheet_detail")
|
||||||
|
|
||||||
|
if frappe.db.has_column("Timesheet Detail", "billable"):
|
||||||
rename_field("Timesheet Detail", "billable", "is_billable")
|
rename_field("Timesheet Detail", "billable", "is_billable")
|
||||||
|
|
||||||
base_currency = frappe.defaults.get_global_default('currency')
|
base_currency = frappe.defaults.get_global_default('currency')
|
||||||
frappe.reload_doc("projects", "doctype", "timesheet")
|
|
||||||
frappe.reload_doc("projects", "doctype", "timesheet_detail")
|
|
||||||
|
|
||||||
frappe.db.sql("""UPDATE `tabTimesheet Detail`
|
frappe.db.sql("""UPDATE `tabTimesheet Detail`
|
||||||
SET base_billing_rate = billing_rate,
|
SET base_billing_rate = billing_rate,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user