Files
schuetz3-erpnext/erpnext/patches/v11_0/add_expense_claim_default_account.py
Ankush Menat c07713b860 style: bulk format code with black
v13 port because otherwise backports will result in conflicts always
2022-03-29 17:29:34 +05:30

17 lines
387 B
Python

import frappe
def execute():
frappe.reload_doc("setup", "doctype", "company")
companies = frappe.get_all("Company", fields=["name", "default_payable_account"])
for company in companies:
if company.default_payable_account is not None:
frappe.db.set_value(
"Company",
company.name,
"default_expense_claim_payable_account",
company.default_payable_account,
)