* chore: Added isort to pre-commit config * chore: Sort imports with isort * chore: Remove imports with pycln * chore: Sort imports with isort * chore: Fix import issues * chore: Fix sider issues * chore: linting * chore: linting / sorting import from ecommerce refactor merge * ci: dont allow unused imports * chore: sort / clean ecommerce imports Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
17 lines
695 B
Python
17 lines
695 B
Python
import frappe
|
|
from frappe.model.utils.rename_field import rename_field
|
|
|
|
|
|
def execute():
|
|
frappe.reload_doc("stock", "doctype", "item")
|
|
frappe.reload_doc("stock", "doctype", "stock_settings")
|
|
frappe.reload_doc("accounts", "doctype", "accounts_settings")
|
|
|
|
rename_field('Stock Settings', "tolerance", "over_delivery_receipt_allowance")
|
|
rename_field('Item', "tolerance", "over_delivery_receipt_allowance")
|
|
|
|
qty_allowance = frappe.db.get_single_value("Stock Settings", "over_delivery_receipt_allowance")
|
|
frappe.db.set_value("Accounts Settings", None, "over_delivery_receipt_allowance", qty_allowance)
|
|
|
|
frappe.db.sql("update tabItem set over_billing_allowance=over_delivery_receipt_allowance")
|