mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-03 13:38:27 +00:00
chore: linting issues
This commit is contained in:
@@ -35,7 +35,6 @@ BUYING_DOCTYPES = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class AccountsSettings(Document):
|
class AccountsSettings(Document):
|
||||||
# begin: auto-generated types
|
# begin: auto-generated types
|
||||||
# This code is auto-generated. Do not modify anything in this block.
|
# This code is auto-generated. Do not modify anything in this block.
|
||||||
@@ -193,11 +192,13 @@ class AccountsSettings(Document):
|
|||||||
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.init_procedure_name}")
|
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.init_procedure_name}")
|
||||||
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.allocate_procedure_name}")
|
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.allocate_procedure_name}")
|
||||||
|
|
||||||
|
|
||||||
def toggle_accounting_dimension_sections(hide):
|
def toggle_accounting_dimension_sections(hide):
|
||||||
accounting_dimension_doctypes = frappe.get_hooks("accounting_dimension_doctypes")
|
accounting_dimension_doctypes = frappe.get_hooks("accounting_dimension_doctypes")
|
||||||
for doctype in accounting_dimension_doctypes:
|
for doctype in accounting_dimension_doctypes:
|
||||||
create_property_setter_for_hiding_field(doctype, "accounting_dimensions_section", hide)
|
create_property_setter_for_hiding_field(doctype, "accounting_dimensions_section", hide)
|
||||||
|
|
||||||
|
|
||||||
def toggle_sales_discount_section(hide):
|
def toggle_sales_discount_section(hide):
|
||||||
for doctype in SELLING_DOCTYPES + BUYING_DOCTYPES:
|
for doctype in SELLING_DOCTYPES + BUYING_DOCTYPES:
|
||||||
meta = frappe.get_meta(doctype)
|
meta = frappe.get_meta(doctype)
|
||||||
@@ -206,12 +207,14 @@ def toggle_sales_discount_section(hide):
|
|||||||
if meta.has_field("discount_and_margin"):
|
if meta.has_field("discount_and_margin"):
|
||||||
create_property_setter_for_hiding_field(doctype, "discount_and_margin", hide)
|
create_property_setter_for_hiding_field(doctype, "discount_and_margin", hide)
|
||||||
|
|
||||||
|
|
||||||
def toggle_loyalty_point_program_section(hide):
|
def toggle_loyalty_point_program_section(hide):
|
||||||
for doctype in SELLING_DOCTYPES:
|
for doctype in SELLING_DOCTYPES:
|
||||||
meta = frappe.get_meta(doctype)
|
meta = frappe.get_meta(doctype)
|
||||||
if meta.has_field("loyalty_points_redemption"):
|
if meta.has_field("loyalty_points_redemption"):
|
||||||
create_property_setter_for_hiding_field(doctype, "loyalty_points_redemption", hide)
|
create_property_setter_for_hiding_field(doctype, "loyalty_points_redemption", hide)
|
||||||
|
|
||||||
|
|
||||||
def create_property_setter_for_hiding_field(doctype, field_name, hide):
|
def create_property_setter_for_hiding_field(doctype, field_name, hide):
|
||||||
make_property_setter(
|
make_property_setter(
|
||||||
doctype,
|
doctype,
|
||||||
|
|||||||
@@ -62,18 +62,23 @@ class SalesInvoice(SellingController):
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from frappe.types import DF
|
||||||
|
|
||||||
from erpnext.accounts.doctype.item_wise_tax_detail.item_wise_tax_detail import ItemWiseTaxDetail
|
from erpnext.accounts.doctype.item_wise_tax_detail.item_wise_tax_detail import ItemWiseTaxDetail
|
||||||
from erpnext.accounts.doctype.payment_schedule.payment_schedule import PaymentSchedule
|
from erpnext.accounts.doctype.payment_schedule.payment_schedule import PaymentSchedule
|
||||||
from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail
|
from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail
|
||||||
from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import SalesInvoiceAdvance
|
from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import SalesInvoiceAdvance
|
||||||
from erpnext.accounts.doctype.sales_invoice_item.sales_invoice_item import SalesInvoiceItem
|
from erpnext.accounts.doctype.sales_invoice_item.sales_invoice_item import SalesInvoiceItem
|
||||||
from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import SalesInvoicePayment
|
from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import SalesInvoicePayment
|
||||||
from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import SalesInvoiceTimesheet
|
from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import (
|
||||||
from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import SalesTaxesandCharges
|
SalesInvoiceTimesheet,
|
||||||
|
)
|
||||||
|
from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import (
|
||||||
|
SalesTaxesandCharges,
|
||||||
|
)
|
||||||
from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import TaxWithholdingEntry
|
from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import TaxWithholdingEntry
|
||||||
from erpnext.selling.doctype.sales_team.sales_team import SalesTeam
|
from erpnext.selling.doctype.sales_team.sales_team import SalesTeam
|
||||||
from erpnext.stock.doctype.packed_item.packed_item import PackedItem
|
from erpnext.stock.doctype.packed_item.packed_item import PackedItem
|
||||||
from frappe.types import DF
|
|
||||||
|
|
||||||
account_for_change_amount: DF.Link | None
|
account_for_change_amount: DF.Link | None
|
||||||
additional_discount_account: DF.Link | None
|
additional_discount_account: DF.Link | None
|
||||||
@@ -193,7 +198,22 @@ class SalesInvoice(SellingController):
|
|||||||
shipping_address: DF.TextEditor | None
|
shipping_address: DF.TextEditor | None
|
||||||
shipping_address_name: DF.Link | None
|
shipping_address_name: DF.Link | None
|
||||||
shipping_rule: DF.Link | None
|
shipping_rule: DF.Link | None
|
||||||
status: DF.Literal["", "Draft", "Return", "Credit Note Issued", "Submitted", "Paid", "Partly Paid", "Unpaid", "Unpaid and Discounted", "Partly Paid and Discounted", "Overdue and Discounted", "Overdue", "Cancelled", "Internal Transfer"]
|
status: DF.Literal[
|
||||||
|
"",
|
||||||
|
"Draft",
|
||||||
|
"Return",
|
||||||
|
"Credit Note Issued",
|
||||||
|
"Submitted",
|
||||||
|
"Paid",
|
||||||
|
"Partly Paid",
|
||||||
|
"Unpaid",
|
||||||
|
"Unpaid and Discounted",
|
||||||
|
"Partly Paid and Discounted",
|
||||||
|
"Overdue and Discounted",
|
||||||
|
"Overdue",
|
||||||
|
"Cancelled",
|
||||||
|
"Internal Transfer",
|
||||||
|
]
|
||||||
subscription: DF.Link | None
|
subscription: DF.Link | None
|
||||||
tax_category: DF.Link | None
|
tax_category: DF.Link | None
|
||||||
tax_id: DF.Data | None
|
tax_id: DF.Data | None
|
||||||
|
|||||||
@@ -27,12 +27,17 @@ class Supplier(TransactionBase):
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import AllowedToTransactWith
|
|
||||||
from erpnext.accounts.doctype.party_account.party_account import PartyAccount
|
|
||||||
from erpnext.buying.doctype.customer_number_at_supplier.customer_number_at_supplier import CustomerNumberAtSupplier
|
|
||||||
from erpnext.utilities.doctype.portal_user.portal_user import PortalUser
|
|
||||||
from frappe.types import DF
|
from frappe.types import DF
|
||||||
|
|
||||||
|
from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import (
|
||||||
|
AllowedToTransactWith,
|
||||||
|
)
|
||||||
|
from erpnext.accounts.doctype.party_account.party_account import PartyAccount
|
||||||
|
from erpnext.buying.doctype.customer_number_at_supplier.customer_number_at_supplier import (
|
||||||
|
CustomerNumberAtSupplier,
|
||||||
|
)
|
||||||
|
from erpnext.utilities.doctype.portal_user.portal_user import PortalUser
|
||||||
|
|
||||||
accounts: DF.Table[PartyAccount]
|
accounts: DF.Table[PartyAccount]
|
||||||
allow_purchase_invoice_creation_without_purchase_order: DF.Check
|
allow_purchase_invoice_creation_without_purchase_order: DF.Check
|
||||||
allow_purchase_invoice_creation_without_purchase_receipt: DF.Check
|
allow_purchase_invoice_creation_without_purchase_receipt: DF.Check
|
||||||
|
|||||||
@@ -1751,6 +1751,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
"base_total_cost",
|
"base_total_cost",
|
||||||
"base_scrap_material_cost",
|
"base_scrap_material_cost",
|
||||||
"base_rounding_adjustment",
|
"base_rounding_adjustment",
|
||||||
|
"base_totals_section",
|
||||||
],
|
],
|
||||||
company_currency
|
company_currency
|
||||||
);
|
);
|
||||||
@@ -1774,6 +1775,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
"rounding_adjustment",
|
"rounding_adjustment",
|
||||||
"raw_material_cost",
|
"raw_material_cost",
|
||||||
"total_cost",
|
"total_cost",
|
||||||
|
"totals_section",
|
||||||
],
|
],
|
||||||
this.frm.doc.currency
|
this.frm.doc.currency
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -34,13 +34,18 @@ class Customer(TransactionBase):
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import AllowedToTransactWith
|
from frappe.types import DF
|
||||||
|
|
||||||
|
from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import (
|
||||||
|
AllowedToTransactWith,
|
||||||
|
)
|
||||||
from erpnext.accounts.doctype.party_account.party_account import PartyAccount
|
from erpnext.accounts.doctype.party_account.party_account import PartyAccount
|
||||||
from erpnext.selling.doctype.customer_credit_limit.customer_credit_limit import CustomerCreditLimit
|
from erpnext.selling.doctype.customer_credit_limit.customer_credit_limit import CustomerCreditLimit
|
||||||
from erpnext.selling.doctype.sales_team.sales_team import SalesTeam
|
from erpnext.selling.doctype.sales_team.sales_team import SalesTeam
|
||||||
from erpnext.selling.doctype.supplier_number_at_customer.supplier_number_at_customer import SupplierNumberAtCustomer
|
from erpnext.selling.doctype.supplier_number_at_customer.supplier_number_at_customer import (
|
||||||
|
SupplierNumberAtCustomer,
|
||||||
|
)
|
||||||
from erpnext.utilities.doctype.portal_user.portal_user import PortalUser
|
from erpnext.utilities.doctype.portal_user.portal_user import PortalUser
|
||||||
from frappe.types import DF
|
|
||||||
|
|
||||||
account_manager: DF.Link | None
|
account_manager: DF.Link | None
|
||||||
accounts: DF.Table[PartyAccount]
|
accounts: DF.Table[PartyAccount]
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from frappe.custom.doctype.property_setter.property_setter import make_property_
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import cint
|
from frappe.utils import cint
|
||||||
|
|
||||||
|
|
||||||
class SellingSettings(Document):
|
class SellingSettings(Document):
|
||||||
# begin: auto-generated types
|
# begin: auto-generated types
|
||||||
# This code is auto-generated. Do not modify anything in this block.
|
# This code is auto-generated. Do not modify anything in this block.
|
||||||
@@ -181,8 +182,12 @@ class SellingSettings(Document):
|
|||||||
validate_fields_for_doctype=False,
|
validate_fields_for_doctype=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def toggle_tracking_sales_commissions_section(hide):
|
def toggle_tracking_sales_commissions_section(hide):
|
||||||
from erpnext.accounts.doctype.accounts_settings.accounts_settings import create_property_setter_for_hiding_field, SELLING_DOCTYPES
|
from erpnext.accounts.doctype.accounts_settings.accounts_settings import (
|
||||||
|
SELLING_DOCTYPES,
|
||||||
|
create_property_setter_for_hiding_field,
|
||||||
|
)
|
||||||
|
|
||||||
for doctype in SELLING_DOCTYPES:
|
for doctype in SELLING_DOCTYPES:
|
||||||
meta = frappe.get_meta(doctype)
|
meta = frappe.get_meta(doctype)
|
||||||
|
|||||||
Reference in New Issue
Block a user