Added new print formats_auto

This commit is contained in:
Away 2025-04-07 17:53:41 +00:00
commit 092678860e
4 changed files with 46 additions and 1843 deletions

View File

@ -47,6 +47,26 @@ def create_custom_fields():
insert_after='reason' insert_after='reason'
) )
], ],
"Account": [
dict(
fieldname='is_account',
label='Is Account',
fieldtype='Check',
insert_after='is_group'
),
dict(
fieldname='is_sub_account',
label='Is Sub Account',
fieldtype='Check',
insert_after='is_account'
),
dict(
fieldname='description',
label='Description',
fieldtype='Text',
insert_after='balance_must_be'
)
],
"Company": [ "Company": [
dict( dict(
fieldname='ceo', fieldname='ceo',

File diff suppressed because one or more lines are too long

View File

@ -8,8 +8,13 @@ app_license = "unlicense"
boot_session = "jey_erp.extend_party_types.add_company_to_party_account_types" boot_session = "jey_erp.extend_party_types.add_company_to_party_account_types"
app_include_js = [
"/assets/jey_erp/js/account_tree_custom.js"
]
doctype_js = { doctype_js = {
"Payment Entry": "public/js/payment_entry_mod.js" "Payment Entry": "/public/js/payment_entry_mod.js",
"Account": "/public/js/account_tree_custom.js"
} }
override_doctype_class = { override_doctype_class = {

View File

@ -0,0 +1,20 @@
frappe.provide("frappe.treeview_settings");
// Сохраняем оригинальные поля
var original_fields = frappe.treeview_settings["Account"].fields;
// Переопределяем массив полей, добавляя наши новые поля
frappe.treeview_settings["Account"].fields = original_fields.concat([
{
fieldtype: "Check",
fieldname: "is_account",
label: __("Is Account"),
description: __("Check if this is a regular account")
},
{
fieldtype: "Check",
fieldname: "is_sub_account",
label: __("Is Sub Account"),
description: __("Check if this is a sub account")
}
]);