feat: default account head for operating cost (backport #41985) (#41987)

* feat: default account head for operating cost (#41985)

(cherry picked from commit fd7666a029)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.py
#	erpnext/setup/doctype/company/company.json

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-06-22 10:39:53 +05:30
committed by GitHub
parent 8d299d1495
commit 44c16713ba
5 changed files with 108 additions and 7 deletions

View File

@@ -28,6 +28,12 @@ frappe.ui.form.on("Company", {
};
});
frm.set_query("default_operating_cost_account", function (doc) {
return {
filters: { company: doc.name, root_type: "Expense" },
};
});
frm.set_query("default_selling_terms", function () {
return { filters: { selling: 1 } };
});

View File

@@ -109,6 +109,8 @@
"stock_received_but_not_billed",
"default_provisional_account",
"expenses_included_in_valuation",
"manufacturing_section",
"default_operating_cost_account",
"dashboard_tab"
],
"fields": [
@@ -773,7 +775,7 @@
{
"fieldname": "stock_tab",
"fieldtype": "Tab Break",
"label": "Stock"
"label": "Stock and Manufacturing"
},
{
"fieldname": "dashboard_tab",
@@ -788,6 +790,17 @@
"fieldname": "reconcile_on_advance_payment_date",
"fieldtype": "Check",
"label": "Reconcile on Advance Payment Date"
},
{
"fieldname": "manufacturing_section",
"fieldtype": "Section Break",
"label": "Manufacturing"
},
{
"fieldname": "default_operating_cost_account",
"fieldtype": "Link",
"label": "Default Operating Cost Account",
"options": "Account"
}
],
"icon": "fa fa-building",
@@ -795,7 +808,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
"modified": "2024-05-27 17:32:49.057386",
"modified": "2024-06-21 17:46:25.567565",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
@@ -862,4 +875,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View File

@@ -62,6 +62,7 @@ class Company(NestedSet):
default_income_account: DF.Link | None
default_inventory_account: DF.Link | None
default_letter_head: DF.Link | None
default_operating_cost_account: DF.Link | None
default_payable_account: DF.Link | None
default_provisional_account: DF.Link | None
default_receivable_account: DF.Link | None