2018-08-30 13:48:26 +00:00
|
|
|
import frappe
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2018-08-30 13:48:26 +00:00
|
|
|
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,
|
|
|
|
)
|