Files
schuetz3-erpnext/erpnext/patches/v14_0/update_company_in_ldc.py
mergify[bot] d732083166 fix: Add company field to lower deduction certificate (#34914)
* fix: Add company field to lower deduction certificate (#34914)

(cherry picked from commit b545e3def0)

# Conflicts:
#	erpnext/patches.txt

* chore: resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-04-25 21:33:43 +05:30

15 lines
389 B
Python

# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
from erpnext import get_default_company
def execute():
company = get_default_company()
if company:
for d in frappe.get_all("Lower Deduction Certificate", pluck="name"):
frappe.db.set_value("Lower Deduction Certificate", d, "company", company, update_modified=False)