From 01ec42837a5156e0008633a3274570c40aa216c5 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 30 Nov 2023 13:53:48 +0530 Subject: [PATCH] feat: enable automatic type annotations (#38452) (cherry picked from commit 63313eef6f6618f52c7e6194f7abd345cf920b15) --- erpnext/accounts/doctype/account/account.py | 59 ++++++ .../account_closing_balance.py | 23 +++ .../accounting_dimension.py | 19 ++ .../accounting_dimension_detail.py | 20 ++ .../accounting_dimension_filter.py | 22 +++ .../accounting_period/accounting_period.py | 17 ++ .../accounts_settings/accounts_settings.py | 46 +++++ .../doctype/advance_tax/advance_tax.py | 18 ++ .../advance_taxes_and_charges.py | 29 +++ .../allowed_dimension/allowed_dimension.py | 15 ++ .../allowed_to_transact_with.py | 14 ++ .../applicable_on_account.py | 15 ++ erpnext/accounts/doctype/bank/bank.py | 19 ++ .../doctype/bank_account/bank_account.py | 27 +++ .../bank_account_subtype.py | 11 ++ .../bank_account_type/bank_account_type.py | 11 ++ .../doctype/bank_clearance/bank_clearance.py | 22 +++ .../bank_clearance_detail.py | 21 ++ .../doctype/bank_guarantee/bank_guarantee.py | 34 ++++ .../bank_reconciliation_tool.py | 20 ++ .../bank_statement_import.py | 24 +++ .../bank_transaction/bank_transaction.py | 35 ++++ .../bank_transaction_mapping.py | 15 ++ .../bank_transaction_payments.py | 17 ++ erpnext/accounts/doctype/budget/budget.py | 30 +++ .../doctype/budget_account/budget_account.py | 15 ++ .../doctype/campaign_item/campaign_item.py | 14 ++ .../cashier_closing/cashier_closing.py | 26 +++ .../cashier_closing_payments.py | 15 ++ .../chart_of_accounts_importer.py | 12 ++ .../cheque_print_template.py | 35 ++++ .../closed_document/closed_document.py | 15 ++ .../doctype/cost_center/cost_center.py | 19 ++ .../cost_center_allocation.py | 19 ++ .../cost_center_allocation_percentage.py | 15 ++ .../doctype/coupon_code/coupon_code.py | 21 ++ .../currency_exchange_settings.py | 24 +++ .../currency_exchange_settings_details.py | 15 ++ .../currency_exchange_settings_result.py | 14 ++ .../customer_group_item.py | 14 ++ .../doctype/customer_item/customer_item.py | 14 ++ .../discounted_invoice/discounted_invoice.py | 18 ++ erpnext/accounts/doctype/dunning/dunning.py | 46 +++++ .../dunning_letter_text.py | 17 ++ .../doctype/dunning_type/dunning_type.py | 20 ++ .../exchange_rate_revaluation.py | 22 +++ .../exchange_rate_revaluation_account.py | 25 +++ .../doctype/finance_book/finance_book.py | 11 ++ .../doctype/fiscal_year/fiscal_year.py | 19 ++ .../fiscal_year_company.py | 14 ++ erpnext/accounts/doctype/gl_entry/gl_entry.py | 41 ++++ .../invoice_discounting.py | 28 +++ .../item_tax_template/item_tax_template.py | 18 ++ .../item_tax_template_detail.py | 15 ++ .../doctype/journal_entry/journal_entry.py | 72 +++++++ .../journal_entry_account.py | 52 +++++ .../journal_entry_template.py | 35 ++++ .../journal_entry_template_account.py | 14 ++ .../doctype/ledger_merge/ledger_merge.py | 21 ++ .../ledger_merge_accounts.py | 16 ++ .../loyalty_point_entry.py | 21 ++ .../loyalty_point_entry_redemption.py | 16 ++ .../loyalty_program/loyalty_program.py | 27 +++ .../loyalty_program_collection.py | 16 ++ .../mode_of_payment/mode_of_payment.py | 18 ++ .../mode_of_payment_account.py | 15 ++ .../monthly_distribution.py | 17 ++ .../monthly_distribution_percentage.py | 15 ++ .../opening_invoice_creation_tool.py | 19 ++ .../opening_invoice_creation_tool_item.py | 23 +++ .../overdue_payment/overdue_payment.py | 27 +++ .../doctype/party_account/party_account.py | 16 ++ .../accounts/doctype/party_link/party_link.py | 14 ++ .../payment_entry_deduction.py | 17 ++ .../payment_entry_reference.py | 24 +++ .../payment_gateway_account.py | 16 ++ .../payment_ledger_entry.py | 29 +++ .../doctype/payment_order/payment_order.py | 24 +++ .../payment_order_reference.py | 22 +++ .../payment_reconciliation.py | 42 ++++ .../payment_reconciliation_allocation.py | 28 +++ .../payment_reconciliation_invoice.py | 20 ++ .../payment_reconciliation_payment.py | 24 +++ .../payment_request/payment_request.py | 59 ++++++ .../payment_schedule/payment_schedule.py | 26 +++ .../doctype/payment_term/payment_term.py | 29 +++ .../payment_terms_template.py | 17 ++ .../payment_terms_template_detail.py | 32 +++ .../period_closing_voucher.py | 20 ++ .../pos_closing_entry/pos_closing_entry.py | 37 ++++ .../pos_closing_entry_detail.py | 18 ++ .../pos_closing_entry_taxes.py | 16 ++ .../pos_customer_group/pos_customer_group.py | 14 ++ .../accounts/doctype/pos_field/pos_field.py | 20 ++ .../doctype/pos_invoice/pos_invoice.py | 163 ++++++++++++++++ .../pos_invoice_item/pos_invoice_item.py | 80 ++++++++ .../pos_invoice_merge_log.py | 24 +++ .../pos_invoice_reference.py | 19 ++ .../doctype/pos_item_group/pos_item_group.py | 14 ++ .../pos_opening_entry/pos_opening_entry.py | 25 +++ .../pos_opening_entry_detail.py | 15 ++ .../pos_payment_method/pos_payment_method.py | 16 ++ .../doctype/pos_profile/pos_profile.py | 51 +++++ .../pos_profile_user/pos_profile_user.py | 15 ++ .../pos_search_fields/pos_search_fields.py | 15 ++ .../doctype/pos_settings/pos_settings.py | 15 ++ .../doctype/pricing_rule/pricing_rule.py | 109 +++++++++++ .../pricing_rule_brand/pricing_rule_brand.py | 15 ++ .../pricing_rule_detail.py | 19 ++ .../pricing_rule_item_code.py | 15 ++ .../pricing_rule_item_group.py | 15 ++ .../process_deferred_accounting.py | 17 ++ .../process_payment_reconciliation.py | 25 +++ .../process_payment_reconciliation_log.py | 24 +++ ..._payment_reconciliation_log_allocations.py | 27 +++ .../process_statement_of_accounts.py | 54 ++++++ .../process_statement_of_accounts_customer.py | 17 ++ .../process_subscription.py | 13 ++ .../promotional_scheme/promotional_scheme.py | 67 +++++++ .../promotional_scheme_price_discount.py | 51 +++++ .../promotional_scheme_product_discount.py | 51 +++++ .../psoa_cost_center/psoa_cost_center.py | 14 ++ .../doctype/psoa_project/psoa_project.py | 14 ++ .../purchase_invoice/purchase_invoice.py | 168 ++++++++++++++++ .../purchase_invoice_advance.py | 21 ++ .../purchase_invoice_item.py | 89 +++++++++ .../purchase_taxes_and_charges.py | 38 ++++ .../purchase_taxes_and_charges_template.py | 20 ++ .../repost_accounting_ledger.py | 18 ++ .../repost_accounting_ledger_items.py | 15 ++ .../repost_accounting_ledger_settings.py | 13 ++ .../repost_allowed_types.py | 15 ++ .../repost_payment_ledger.py | 22 +++ .../repost_payment_ledger_items.py | 15 ++ .../doctype/sales_invoice/sales_invoice.py | 183 ++++++++++++++++++ .../sales_invoice_advance.py | 21 ++ .../sales_invoice_item/sales_invoice_item.py | 85 ++++++++ .../sales_invoice_payment.py | 20 ++ .../sales_invoice_timesheet.py | 22 +++ .../sales_partner_item/sales_partner_item.py | 14 ++ .../sales_taxes_and_charges.py | 37 ++++ .../sales_taxes_and_charges_template.py | 20 ++ .../doctype/share_balance/share_balance.py | 21 ++ .../doctype/share_transfer/share_transfer.py | 27 +++ .../accounts/doctype/share_type/share_type.py | 12 ++ .../doctype/shareholder/shareholder.py | 19 ++ .../doctype/shipping_rule/shipping_rule.py | 27 +++ .../shipping_rule_condition.py | 16 ++ .../shipping_rule_country.py | 14 ++ .../south_africa_vat_account.py | 14 ++ .../doctype/subscription/subscription.py | 45 +++++ .../subscription_invoice.py | 15 ++ .../subscription_plan/subscription_plan.py | 21 ++ .../subscription_plan_detail.py | 15 ++ .../subscription_settings.py | 13 ++ .../supplier_group_item.py | 14 ++ .../doctype/supplier_item/supplier_item.py | 14 ++ .../doctype/tax_category/tax_category.py | 12 ++ erpnext/accounts/doctype/tax_rule/tax_rule.py | 35 ++++ .../tax_withheld_vouchers.py | 16 ++ .../tax_withholding_account.py | 15 ++ .../tax_withholding_category.py | 21 ++ .../tax_withholding_rate.py | 18 ++ .../doctype/territory_item/territory_item.py | 14 ++ .../unreconcile_payment.py | 19 ++ .../unreconcile_payment_entries.py | 21 ++ erpnext/assets/doctype/asset/asset.py | 75 +++++++ .../doctype/asset_activity/asset_activity.py | 14 ++ .../asset_capitalization.py | 55 ++++++ .../asset_capitalization_asset_item.py | 22 +++ .../asset_capitalization_service_item.py | 21 ++ .../asset_capitalization_stock_item.py | 25 +++ .../doctype/asset_category/asset_category.py | 19 ++ .../asset_category_account.py | 18 ++ .../asset_depreciation_schedule.py | 34 ++++ .../asset_finance_book/asset_finance_book.py | 26 +++ .../asset_maintenance/asset_maintenance.py | 23 +++ .../asset_maintenance_log.py | 28 +++ .../asset_maintenance_task.py | 27 +++ .../asset_maintenance_team.py | 19 ++ .../doctype/asset_movement/asset_movement.py | 19 ++ .../asset_movement_item.py | 20 ++ .../doctype/asset_repair/asset_repair.py | 36 ++++ .../asset_repair_consumed_item.py | 19 ++ .../asset_shift_allocation.py | 19 ++ .../asset_shift_factor/asset_shift_factor.py | 13 ++ .../asset_value_adjustment.py | 21 ++ .../depreciation_schedule.py | 18 ++ .../linked_location/linked_location.py | 14 ++ erpnext/assets/doctype/location/location.py | 21 ++ .../maintenance_team_member.py | 16 ++ .../bulk_transaction_log.py | 14 ++ .../bulk_transaction_log_detail.py | 18 ++ .../buying_settings/buying_settings.py | 32 +++ .../doctype/purchase_order/purchase_order.py | 131 +++++++++++++ .../purchase_order_item.py | 87 +++++++++ .../purchase_order_item_supplied.py | 27 +++ .../purchase_receipt_item_supplied.py | 29 +++ .../request_for_quotation.py | 39 ++++ .../request_for_quotation_item.py | 31 +++ .../request_for_quotation_supplier.py | 20 ++ erpnext/buying/doctype/supplier/supplier.py | 54 ++++++ .../supplier_quotation/supplier_quotation.py | 89 +++++++++ .../supplier_quotation_item.py | 58 ++++++ .../supplier_scorecard/supplier_scorecard.py | 32 +++ .../supplier_scorecard_criteria.py | 14 ++ .../supplier_scorecard_period.py | 26 +++ .../supplier_scorecard_scoring_criteria.py | 18 ++ .../supplier_scorecard_scoring_standing.py | 24 +++ .../supplier_scorecard_scoring_variable.py | 18 ++ .../supplier_scorecard_standing.py | 21 ++ .../supplier_scorecard_variable.py | 15 ++ .../communication_medium.py | 20 ++ .../communication_medium_timeslot.py | 19 ++ .../crm/doctype/appointment/appointment.py | 20 ++ .../appointment_booking_settings.py | 26 +++ .../appointment_booking_slots.py | 18 ++ .../availability_of_slots.py | 18 ++ erpnext/crm/doctype/campaign/campaign.py | 18 ++ .../campaign_email_schedule.py | 15 ++ erpnext/crm/doctype/competitor/competitor.py | 12 ++ .../competitor_detail/competitor_detail.py | 14 ++ erpnext/crm/doctype/contract/contract.py | 36 ++++ .../contract_fulfilment_checklist.py | 17 ++ .../contract_template/contract_template.py | 18 ++ .../contract_template_fulfilment_terms.py | 14 ++ erpnext/crm/doctype/crm_note/crm_note.py | 17 ++ .../crm/doctype/crm_settings/crm_settings.py | 16 ++ .../doctype/email_campaign/email_campaign.py | 17 ++ erpnext/crm/doctype/lead/lead.py | 66 +++++++ .../crm/doctype/lead_source/lead_source.py | 12 ++ .../lost_reason_detail/lost_reason_detail.py | 14 ++ .../doctype/market_segment/market_segment.py | 11 ++ .../crm/doctype/opportunity/opportunity.py | 66 +++++++ .../opportunity_item/opportunity_item.py | 25 +++ .../opportunity_lost_reason.py | 11 ++ .../opportunity_lost_reason_detail.py | 14 ++ .../opportunity_type/opportunity_type.py | 11 ++ erpnext/crm/doctype/prospect/prospect.py | 28 +++ .../doctype/prospect_lead/prospect_lead.py | 19 ++ .../prospect_opportunity.py | 22 +++ .../crm/doctype/sales_stage/sales_stage.py | 11 ++ .../doctype/plaid_settings/plaid_settings.py | 16 ++ .../quickbooks_migrator.py | 30 +++ .../tally_migration/tally_migration.py | 33 ++++ erpnext/hooks.py | 2 + .../maintenance_schedule.py | 34 ++++ .../maintenance_schedule_detail.py | 21 ++ .../maintenance_schedule_item.py | 24 +++ .../maintenance_visit/maintenance_visit.py | 36 ++++ .../maintenance_visit_purpose.py | 21 ++ .../doctype/blanket_order/blanket_order.py | 25 +++ .../blanket_order_item/blanket_order_item.py | 19 ++ erpnext/manufacturing/doctype/bom/bom.py | 65 +++++++ .../doctype/bom_creator/bom_creator.py | 33 ++++ .../bom_creator_item/bom_creator_item.py | 35 ++++ .../bom_explosion_item/bom_explosion_item.py | 26 +++ .../doctype/bom_item/bom_item.py | 36 ++++ .../doctype/bom_operation/bom_operation.py | 29 +++ .../doctype/bom_scrap_item/bom_scrap_item.py | 21 ++ .../bom_update_batch/bom_update_batch.py | 17 ++ .../doctype/bom_update_log/bom_update_log.py | 21 ++ .../bom_update_tool/bom_update_tool.py | 12 ++ .../bom_website_item/bom_website_item.py | 18 ++ .../bom_website_operation.py | 18 ++ .../doctype/downtime_entry/downtime_entry.py | 27 +++ .../doctype/job_card/job_card.py | 76 ++++++++ .../doctype/job_card_item/job_card_item.py | 23 +++ .../job_card_operation/job_card_operation.py | 17 ++ .../job_card_scheduled_time.py | 16 ++ .../job_card_scrap_item.py | 18 ++ .../job_card_time_log/job_card_time_log.py | 19 ++ .../manufacturing_settings.py | 26 +++ .../material_request_plan_item.py | 34 ++++ .../doctype/operation/operation.py | 20 ++ .../production_plan/production_plan.py | 75 +++++++ .../production_plan_item.py | 31 +++ .../production_plan_item_reference.py | 17 ++ .../production_plan_material_request.py | 15 ++ ...duction_plan_material_request_warehouse.py | 14 ++ .../production_plan_sales_order.py | 17 ++ .../production_plan_sub_assembly_item.py | 33 ++++ .../manufacturing/doctype/routing/routing.py | 15 ++ .../doctype/sub_operation/sub_operation.py | 16 ++ .../doctype/work_order/work_order.py | 74 +++++++ .../work_order_item/work_order_item.py | 28 +++ .../work_order_operation.py | 32 +++ .../doctype/workstation/workstation.py | 25 +++ .../workstation_type/workstation_type.py | 17 ++ .../workstation_working_hour.py | 16 ++ erpnext/portal/doctype/homepage/homepage.py | 18 ++ .../homepage_section/homepage_section.py | 19 ++ .../homepage_section_card.py | 18 ++ .../website_attribute/website_attribute.py | 14 ++ .../website_filter_field.py | 14 ++ .../doctype/activity_cost/activity_cost.py | 17 ++ .../doctype/activity_type/activity_type.py | 14 ++ .../doctype/dependent_task/dependent_task.py | 14 ++ .../project_template/project_template.py | 16 ++ .../project_template_task.py | 15 ++ .../doctype/project_type/project_type.py | 12 ++ .../doctype/project_update/project_update.py | 19 ++ .../doctype/project_user/project_user.py | 20 ++ .../projects_settings/projects_settings.py | 13 ++ erpnext/projects/doctype/task/task.py | 50 +++++ .../task_depends_on/task_depends_on.py | 16 ++ .../projects/doctype/task_type/task_type.py | 12 ++ .../timesheet_detail/timesheet_detail.py | 34 ++++ .../non_conformance/non_conformance.py | 18 ++ .../doctype/quality_action/quality_action.py | 22 +++ .../quality_action_resolution.py | 18 ++ .../quality_feedback/quality_feedback.py | 18 ++ .../quality_feedback_parameter.py | 16 ++ .../quality_feedback_template.py | 16 ++ .../quality_feedback_template_parameter.py | 14 ++ .../doctype/quality_goal/quality_goal.py | 51 +++++ .../quality_goal_objective.py | 16 ++ .../quality_meeting/quality_meeting.py | 20 ++ .../quality_meeting_agenda.py | 14 ++ .../quality_meeting_minutes.py | 16 ++ .../quality_procedure/quality_procedure.py | 23 +++ .../quality_procedure_process.py | 15 ++ .../doctype/quality_review/quality_review.py | 20 ++ .../quality_review_objective.py | 18 ++ .../import_supplier_invoice.py | 18 ++ .../lower_deduction_certificate.py | 20 ++ .../south_africa_vat_settings.py | 16 ++ .../uae_vat_account/uae_vat_account.py | 14 ++ .../uae_vat_settings/uae_vat_settings.py | 14 ++ erpnext/selling/doctype/customer/customer.py | 64 ++++++ .../customer_credit_limit.py | 16 ++ .../doctype/industry_type/industry_type.py | 11 ++ .../installation_note/installation_note.py | 32 +++ .../installation_note_item.py | 21 ++ .../party_specific_item.py | 14 ++ .../doctype/product_bundle/product_bundle.py | 16 ++ .../product_bundle_item.py | 18 ++ .../selling/doctype/quotation/quotation.py | 103 ++++++++++ .../doctype/quotation_item/quotation_item.py | 63 ++++++ .../doctype/sales_order/sales_order.py | 133 +++++++++++++ .../sales_order_item/sales_order_item.py | 84 ++++++++ .../sales_partner_type/sales_partner_type.py | 11 ++ .../selling/doctype/sales_team/sales_team.py | 19 ++ .../selling_settings/selling_settings.py | 31 +++ .../selling/doctype/sms_center/sms_center.py | 29 +++ .../authorization_control.py | 10 + .../authorization_rule/authorization_rule.py | 39 ++++ erpnext/setup/doctype/branch/branch.py | 11 ++ erpnext/setup/doctype/brand/brand.py | 16 ++ erpnext/setup/doctype/company/company.py | 84 ++++++++ .../currency_exchange/currency_exchange.py | 16 ++ .../doctype/customer_group/customer_group.py | 25 +++ .../setup/doctype/department/department.py | 18 ++ .../setup/doctype/designation/designation.py | 12 ++ erpnext/setup/doctype/driver/driver.py | 25 +++ .../driving_license_category.py | 16 ++ .../doctype/email_digest/email_digest.py | 44 +++++ .../email_digest_recipient.py | 14 ++ .../employee_education/employee_education.py | 19 ++ .../employee_external_work_history.py | 19 ++ .../doctype/employee_group/employee_group.py | 14 ++ .../employee_group_table.py | 16 ++ .../employee_internal_work_history.py | 18 ++ .../global_defaults/global_defaults.py | 18 ++ erpnext/setup/doctype/holiday/holiday.py | 16 ++ .../doctype/holiday_list/holiday_list.py | 23 +++ erpnext/setup/doctype/incoterm/incoterm.py | 13 ++ .../setup/doctype/item_group/item_group.py | 22 +++ .../setup/doctype/party_type/party_type.py | 12 ++ .../doctype/print_heading/print_heading.py | 12 ++ .../quotation_lost_reason.py | 11 ++ .../quotation_lost_reason_detail.py | 14 ++ .../doctype/sales_partner/sales_partner.py | 24 +++ .../doctype/sales_person/sales_person.py | 23 +++ .../doctype/supplier_group/supplier_group.py | 20 ++ .../doctype/target_detail/target_detail.py | 18 ++ .../terms_and_conditions.py | 15 ++ erpnext/setup/doctype/territory/territory.py | 20 ++ .../transaction_deletion_record.py | 19 ++ .../transaction_deletion_record_item.py | 15 ++ erpnext/setup/doctype/uom/uom.py | 13 ++ .../uom_conversion_factor.py | 14 ++ erpnext/setup/doctype/vehicle/vehicle.py | 30 +++ .../website_item_group/website_item_group.py | 14 ++ erpnext/stock/doctype/batch/batch.py | 27 +++ erpnext/stock/doctype/bin/bin.py | 25 +++ .../closing_stock_balance.py | 21 ++ .../customs_tariff_number.py | 12 ++ .../doctype/delivery_note/delivery_note.py | 122 ++++++++++++ .../delivery_note_item/delivery_note_item.py | 81 ++++++++ .../delivery_settings/delivery_settings.py | 14 ++ .../doctype/delivery_stop/delivery_stop.py | 29 +++ .../doctype/delivery_trip/delivery_trip.py | 27 +++ .../inventory_dimension.py | 24 +++ erpnext/stock/doctype/item/item.py | 100 ++++++++++ .../item_alternative/item_alternative.py | 15 ++ .../doctype/item_attribute/item_attribute.py | 18 ++ .../item_attribute_value.py | 15 ++ .../doctype/item_barcode/item_barcode.py | 32 +++ .../item_customer_detail.py | 16 ++ .../doctype/item_default/item_default.py | 25 +++ .../item_manufacturer/item_manufacturer.py | 16 ++ .../stock/doctype/item_price/item_price.py | 29 +++ .../item_quality_inspection_parameter.py | 21 ++ .../doctype/item_reorder/item_reorder.py | 18 ++ .../doctype/item_supplier/item_supplier.py | 15 ++ erpnext/stock/doctype/item_tax/item_tax.py | 18 ++ .../doctype/item_variant/item_variant.py | 15 ++ .../item_variant_attribute.py | 20 ++ .../item_variant_settings.py | 15 ++ .../item_website_specification.py | 15 ++ .../landed_cost_item/landed_cost_item.py | 24 +++ .../landed_cost_purchase_receipt.py | 18 ++ .../landed_cost_taxes_and_charges.py | 19 ++ .../landed_cost_voucher.py | 27 +++ .../doctype/manufacturer/manufacturer.py | 16 ++ .../material_request/material_request.py | 49 +++++ .../material_request_item.py | 48 +++++ .../stock/doctype/packed_item/packed_item.py | 36 ++++ .../doctype/packing_slip/packing_slip.py | 23 +++ .../packing_slip_item/packing_slip_item.py | 24 +++ erpnext/stock/doctype/pick_list/pick_list.py | 28 +++ .../doctype/pick_list_item/pick_list_item.py | 33 ++++ .../stock/doctype/price_list/price_list.py | 19 ++ .../price_list_country/price_list_country.py | 14 ++ .../purchase_receipt/purchase_receipt.py | 112 +++++++++++ .../purchase_receipt_item.py | 100 ++++++++++ .../doctype/putaway_rule/putaway_rule.py | 21 ++ .../quality_inspection/quality_inspection.py | 43 ++++ .../quality_inspection_parameter.py | 13 ++ .../quality_inspection_parameter_group.py | 11 ++ .../quality_inspection_reading.py | 34 ++++ .../quality_inspection_template.py | 16 ++ .../quick_stock_balance.py | 18 ++ .../repost_item_valuation.py | 31 +++ .../serial_and_batch_bundle.py | 36 ++++ .../serial_and_batch_entry.py | 23 +++ erpnext/stock/doctype/serial_no/serial_no.py | 33 ++++ erpnext/stock/doctype/shipment/shipment.py | 59 ++++++ .../shipment_delivery_note.py | 15 ++ .../shipment_parcel/shipment_parcel.py | 18 ++ .../shipment_parcel_template.py | 15 ++ .../stock/doctype/stock_entry/stock_entry.py | 76 ++++++++ .../stock_entry_detail/stock_entry_detail.py | 61 ++++++ .../stock_entry_type/stock_entry_type.py | 22 +++ .../stock_ledger_entry/stock_ledger_entry.py | 40 ++++ .../stock_reconciliation.py | 28 +++ .../stock_reconciliation_item.py | 32 +++ .../stock_reposting_settings.py | 18 ++ .../stock_reservation_entry.py | 37 ++++ .../doctype/stock_settings/stock_settings.py | 45 +++++ .../doctype/uom_category/uom_category.py | 11 ++ .../uom_conversion_detail.py | 15 ++ .../doctype/variant_field/variant_field.py | 14 ++ erpnext/stock/doctype/warehouse/warehouse.py | 29 +++ .../doctype/warehouse_type/warehouse_type.py | 11 ++ .../subcontracting_bom/subcontracting_bom.py | 19 ++ .../subcontracting_order.py | 67 +++++++ .../subcontracting_order_item.py | 39 ++++ .../subcontracting_order_service_item.py | 21 ++ .../subcontracting_order_supplied_item.py | 27 +++ .../subcontracting_receipt.py | 70 +++++++ .../subcontracting_receipt_item.py | 55 ++++++ .../subcontracting_receipt_supplied_item.py | 31 +++ erpnext/support/doctype/issue/issue.py | 44 +++++ .../doctype/issue_priority/issue_priority.py | 11 ++ .../support/doctype/issue_type/issue_type.py | 11 ++ .../pause_sla_on_status.py | 14 ++ .../doctype/service_day/service_day.py | 16 ++ .../service_level_agreement.py | 35 ++++ .../service_level_priority.py | 17 ++ .../sla_fulfilled_on_status.py | 14 ++ .../support_search_source.py | 27 +++ .../support_settings/support_settings.py | 29 +++ .../doctype/warranty_claim/warranty_claim.py | 41 ++++ .../telephony/doctype/call_log/call_log.py | 28 +++ .../incoming_call_handling_schedule.py | 19 ++ .../incoming_call_settings.py | 19 ++ .../telephony_call_type.py | 12 ++ .../voice_call_settings.py | 15 ++ .../doctype/portal_user/portal_user.py | 14 ++ .../doctype/rename_tool/rename_tool.py | 12 ++ erpnext/utilities/doctype/sms_log/sms_log.py | 17 ++ erpnext/utilities/doctype/video/video.py | 22 +++ .../doctype/video_settings/video_settings.py | 13 ++ 485 files changed, 12920 insertions(+) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 02e6c205728b..82af85d70247 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -23,6 +23,65 @@ class InvalidAccountMergeError(frappe.ValidationError): class Account(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_currency: DF.Link | None + account_name: DF.Data + account_number: DF.Data | None + account_type: DF.Literal[ + "", + "Accumulated Depreciation", + "Asset Received But Not Billed", + "Bank", + "Cash", + "Chargeable", + "Capital Work in Progress", + "Cost of Goods Sold", + "Current Asset", + "Current Liability", + "Depreciation", + "Direct Expense", + "Direct Income", + "Equity", + "Expense Account", + "Expenses Included In Asset Valuation", + "Expenses Included In Valuation", + "Fixed Asset", + "Income Account", + "Indirect Expense", + "Indirect Income", + "Liability", + "Payable", + "Receivable", + "Round Off", + "Stock", + "Stock Adjustment", + "Stock Received But Not Billed", + "Service Received But Not Billed", + "Tax", + "Temporary", + ] + balance_must_be: DF.Literal["", "Debit", "Credit"] + company: DF.Link + disabled: DF.Check + freeze_account: DF.Literal["No", "Yes"] + include_in_gross: DF.Check + is_group: DF.Check + lft: DF.Int + old_parent: DF.Data | None + parent_account: DF.Link + report_type: DF.Literal["", "Balance Sheet", "Profit and Loss"] + rgt: DF.Int + root_type: DF.Literal["", "Asset", "Liability", "Income", "Expense", "Equity"] + tax_rate: DF.Float + # end: auto-generated types + nsm_parent_field = "parent_account" def on_update(self): diff --git a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py index d06bd833c8bc..65933ab717bb 100644 --- a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py +++ b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py @@ -11,6 +11,29 @@ class AccountClosingBalance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + account_currency: DF.Link | None + closing_date: DF.Date | None + company: DF.Link | None + cost_center: DF.Link | None + credit: DF.Currency + credit_in_account_currency: DF.Currency + debit: DF.Currency + debit_in_account_currency: DF.Currency + finance_book: DF.Link | None + is_period_closing_voucher_entry: DF.Check + period_closing_voucher: DF.Link | None + project: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index 8f76492d4ed1..295cd983b3d7 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -13,6 +13,25 @@ class AccountingDimension(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.accounting_dimension_detail.accounting_dimension_detail import ( + AccountingDimensionDetail, + ) + + dimension_defaults: DF.Table[AccountingDimensionDetail] + disabled: DF.Check + document_type: DF.Link + fieldname: DF.Data | None + label: DF.Data | None + # end: auto-generated types + def before_insert(self): self.set_fieldname_and_label() diff --git a/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py b/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py index 4b0cbb35a0a9..e797ac615d0f 100644 --- a/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py +++ b/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py @@ -7,4 +7,24 @@ class AccountingDimensionDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + automatically_post_balancing_accounting_entry: DF.Check + company: DF.Link | None + default_dimension: DF.DynamicLink | None + mandatory_for_bs: DF.Check + mandatory_for_pl: DF.Check + offsetting_account: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reference_document: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py index de1b82c1d5f9..01f6e60bf3b5 100644 --- a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py +++ b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py @@ -8,6 +8,28 @@ class AccountingDimensionFilter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.allowed_dimension.allowed_dimension import AllowedDimension + from erpnext.accounts.doctype.applicable_on_account.applicable_on_account import ( + ApplicableOnAccount, + ) + + accounting_dimension: DF.Literal + accounts: DF.Table[ApplicableOnAccount] + allow_or_restrict: DF.Literal["Allow", "Restrict"] + apply_restriction_on_values: DF.Check + company: DF.Link + dimensions: DF.Table[AllowedDimension] + disabled: DF.Check + # end: auto-generated types + def before_save(self): # If restriction is not applied on values, then remove all the dimensions and set allow_or_restrict to Restrict if not self.apply_restriction_on_values: diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index d5f37a68067f..b32a231c3223 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py @@ -16,6 +16,23 @@ class ClosedAccountingPeriod(frappe.ValidationError): class AccountingPeriod(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.closed_document.closed_document import ClosedDocument + + closed_documents: DF.Table[ClosedDocument] + company: DF.Link + end_date: DF.Date + period_name: DF.Data + start_date: DF.Date + # end: auto-generated types + def validate(self): self.validate_overlap() diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index ac3d44bb5e70..07d1a65265b2 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -14,6 +14,52 @@ class AccountsSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + acc_frozen_upto: DF.Date | None + add_taxes_from_item_tax_template: DF.Check + allow_multi_currency_invoices_against_single_party_account: DF.Check + allow_stale: DF.Check + auto_reconcile_payments: DF.Check + automatically_fetch_payment_terms: DF.Check + automatically_process_deferred_accounting_entry: DF.Check + book_asset_depreciation_entry_automatically: DF.Check + book_deferred_entries_based_on: DF.Literal["Days", "Months"] + book_deferred_entries_via_journal_entry: DF.Check + book_tax_discount_loss: DF.Check + check_supplier_invoice_uniqueness: DF.Check + credit_controller: DF.Link | None + delete_linked_ledger_entries: DF.Check + determine_address_tax_category_from: DF.Literal["Billing Address", "Shipping Address"] + enable_common_party_accounting: DF.Check + enable_fuzzy_matching: DF.Check + enable_party_matching: DF.Check + frozen_accounts_modifier: DF.Link | None + general_ledger_remarks_length: DF.Int + ignore_account_closing_balance: DF.Check + make_payment_via_journal_entry: DF.Check + merge_similar_account_heads: DF.Check + over_billing_allowance: DF.Currency + post_change_gl_entries: DF.Check + receivable_payable_remarks_length: DF.Int + role_allowed_to_over_bill: DF.Link | None + round_row_wise_tax: DF.Check + show_balance_in_coa: DF.Check + show_inclusive_tax_in_print: DF.Check + show_payment_schedule_in_print: DF.Check + show_taxes_as_table_in_print: DF.Check + stale_days: DF.Int + submit_journal_entries: DF.Check + unlink_advance_payment_on_cancelation_of_order: DF.Check + unlink_payment_on_cancellation_of_invoice: DF.Check + # end: auto-generated types + def validate(self): old_doc = self.get_doc_before_save() clear_cache = False diff --git a/erpnext/accounts/doctype/advance_tax/advance_tax.py b/erpnext/accounts/doctype/advance_tax/advance_tax.py index 2e784efd8f33..59bdac7bc5ad 100644 --- a/erpnext/accounts/doctype/advance_tax/advance_tax.py +++ b/erpnext/accounts/doctype/advance_tax/advance_tax.py @@ -6,4 +6,22 @@ class AdvanceTax(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_head: DF.Link | None + allocated_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reference_detail: DF.Data | None + reference_name: DF.DynamicLink | None + reference_type: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py b/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py index 55c84fb9e50a..47e97ba015a1 100644 --- a/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py +++ b/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py @@ -7,4 +7,33 @@ class AdvanceTaxesandCharges(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_head: DF.Link + add_deduct_tax: DF.Literal["Add", "Deduct"] + allocated_amount: DF.Currency + base_tax_amount: DF.Currency + base_total: DF.Currency + charge_type: DF.Literal[ + "", "Actual", "On Paid Amount", "On Previous Row Amount", "On Previous Row Total" + ] + cost_center: DF.Link | None + currency: DF.Link | None + description: DF.SmallText + included_in_paid_amount: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Float + row_id: DF.Data | None + tax_amount: DF.Currency + total: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py b/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py index a3173a84f6c6..ddc3a161ff07 100644 --- a/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py +++ b/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py @@ -7,4 +7,19 @@ class AllowedDimension(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + accounting_dimension: DF.Link | None + dimension_value: DF.DynamicLink | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py b/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py index a532070d1e49..16654198f934 100644 --- a/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py +++ b/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py @@ -6,4 +6,18 @@ class AllowedToTransactWith(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py b/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py index aae216627c6d..c32f7df4d35a 100644 --- a/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py +++ b/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py @@ -7,4 +7,19 @@ class ApplicableOnAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + applicable_on_account: DF.Link + is_mandatory: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/bank/bank.py b/erpnext/accounts/doctype/bank/bank.py index d44be9af23ec..23bd30c587ac 100644 --- a/erpnext/accounts/doctype/bank/bank.py +++ b/erpnext/accounts/doctype/bank/bank.py @@ -10,6 +10,25 @@ class Bank(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.bank_transaction_mapping.bank_transaction_mapping import ( + BankTransactionMapping, + ) + + bank_name: DF.Data + bank_transaction_mapping: DF.Table[BankTransactionMapping] + plaid_access_token: DF.Data | None + swift_number: DF.Data | None + website: DF.Data | None + # end: auto-generated types + def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self) diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py index 363a2776aa79..4b99b198def7 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.py +++ b/erpnext/accounts/doctype/bank_account/bank_account.py @@ -12,6 +12,33 @@ class BankAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + account_name: DF.Data + account_subtype: DF.Link | None + account_type: DF.Link | None + bank: DF.Link + bank_account_no: DF.Data | None + branch_code: DF.Data | None + company: DF.Link | None + disabled: DF.Check + iban: DF.Data | None + integration_id: DF.Data | None + is_company_account: DF.Check + is_default: DF.Check + last_integration_date: DF.Date | None + mask: DF.Data | None + party: DF.DynamicLink | None + party_type: DF.Link | None + # end: auto-generated types + def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self) diff --git a/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py b/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py index 6355478fbde5..dbd71cc8d24f 100644 --- a/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py +++ b/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py @@ -6,4 +6,15 @@ class BankAccountSubtype(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_subtype: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/bank_account_type/bank_account_type.py b/erpnext/accounts/doctype/bank_account_type/bank_account_type.py index 177b711166d9..79b755115a02 100644 --- a/erpnext/accounts/doctype/bank_account_type/bank_account_type.py +++ b/erpnext/accounts/doctype/bank_account_type/bank_account_type.py @@ -7,4 +7,15 @@ class BankAccountType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_type: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index 8edd376f2204..4b97619f29f1 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -13,6 +13,28 @@ class BankClearance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.bank_clearance_detail.bank_clearance_detail import ( + BankClearanceDetail, + ) + + account: DF.Link + account_currency: DF.Link | None + bank_account: DF.Link | None + from_date: DF.Date + include_pos_transactions: DF.Check + include_reconciled_entries: DF.Check + payment_entries: DF.Table[BankClearanceDetail] + to_date: DF.Date + # end: auto-generated types + @frappe.whitelist() def get_payment_entries(self): if not (self.from_date and self.to_date): diff --git a/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py b/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py index 3d29fd7a4846..5c1f5bf1837a 100644 --- a/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py +++ b/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py @@ -6,4 +6,25 @@ class BankClearanceDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + against_account: DF.Data | None + amount: DF.Data | None + cheque_date: DF.Date | None + cheque_number: DF.Data | None + clearance_date: DF.Date | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + payment_document: DF.Link | None + payment_entry: DF.DynamicLink | None + posting_date: DF.Date | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py index 02eb599acc82..0af2caf1117a 100644 --- a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py +++ b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py @@ -8,6 +8,40 @@ class BankGuarantee(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + amended_from: DF.Link | None + amount: DF.Currency + bank: DF.Link | None + bank_account: DF.Link | None + bank_account_no: DF.Data | None + bank_guarantee_number: DF.Data | None + bg_type: DF.Literal["", "Receiving", "Providing"] + branch_code: DF.Data | None + charges: DF.Currency + customer: DF.Link | None + end_date: DF.Date | None + fixed_deposit_number: DF.Data | None + iban: DF.Data | None + margin_money: DF.Currency + more_information: DF.TextEditor | None + name_of_beneficiary: DF.Data | None + project: DF.Link | None + reference_docname: DF.DynamicLink | None + reference_doctype: DF.Link | None + start_date: DF.Date + supplier: DF.Link | None + swift_number: DF.Data | None + validity: DF.Int + # end: auto-generated types + def validate(self): if not (self.customer or self.supplier): frappe.throw(_("Select the customer or supplier.")) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index f01ae2e8d4d7..1425e734eb3a 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -21,6 +21,26 @@ class BankReconciliationTool(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_currency: DF.Link | None + account_opening_balance: DF.Currency + bank_account: DF.Link | None + bank_statement_closing_balance: DF.Currency + bank_statement_from_date: DF.Date | None + bank_statement_to_date: DF.Date | None + company: DF.Link | None + filter_by_reference_date: DF.Check + from_reference_date: DF.Date | None + to_reference_date: DF.Date | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py index 003a43c5c2c3..1a4747c55b8d 100644 --- a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py +++ b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py @@ -20,6 +20,30 @@ class BankStatementImport(DataImport): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + bank: DF.Link | None + bank_account: DF.Link + company: DF.Link + google_sheets_url: DF.Data | None + import_file: DF.Attach | None + import_type: DF.Literal["", "Insert New Records", "Update Existing Records"] + mute_emails: DF.Check + reference_doctype: DF.Link + show_failed_logs: DF.Check + statement_import_log: DF.Code | None + status: DF.Literal["Pending", "Success", "Partial Success", "Error"] + submit_after_import: DF.Check + template_options: DF.Code | None + template_warnings: DF.Code | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(BankStatementImport, self).__init__(*args, **kwargs) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index 51c823a45929..629ed1cf751a 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -9,6 +9,41 @@ class BankTransaction(StatusUpdater): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.bank_transaction_payments.bank_transaction_payments import ( + BankTransactionPayments, + ) + + allocated_amount: DF.Currency + amended_from: DF.Link | None + bank_account: DF.Link | None + bank_party_account_number: DF.Data | None + bank_party_iban: DF.Data | None + bank_party_name: DF.Data | None + company: DF.Link | None + currency: DF.Link | None + date: DF.Date | None + deposit: DF.Currency + description: DF.SmallText | None + naming_series: DF.Literal["ACC-BTN-.YYYY.-"] + party: DF.DynamicLink | None + party_type: DF.Link | None + payment_entries: DF.Table[BankTransactionPayments] + reference_number: DF.Data | None + status: DF.Literal["", "Pending", "Settled", "Unreconciled", "Reconciled", "Cancelled"] + transaction_id: DF.Data | None + transaction_type: DF.Data | None + unallocated_amount: DF.Currency + withdrawal: DF.Currency + # end: auto-generated types + def before_validate(self): self.update_allocated_amount() diff --git a/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py index e19712ccff09..44aaf3858455 100644 --- a/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py +++ b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py @@ -6,4 +6,19 @@ class BankTransactionMapping(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + bank_transaction_field: DF.Literal + file_field: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py index 0536aa24b37e..e0c84a3ddfb3 100644 --- a/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py +++ b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py @@ -6,4 +6,21 @@ class BankTransactionPayments(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allocated_amount: DF.Currency + clearance_date: DF.Date | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + payment_document: DF.Link + payment_entry: DF.DynamicLink + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/budget/budget.py b/erpnext/accounts/doctype/budget/budget.py index 63e7bc67c9cf..2cf9d97e5959 100644 --- a/erpnext/accounts/doctype/budget/budget.py +++ b/erpnext/accounts/doctype/budget/budget.py @@ -22,6 +22,36 @@ class DuplicateBudgetError(frappe.ValidationError): class Budget(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.budget_account.budget_account import BudgetAccount + + accounts: DF.Table[BudgetAccount] + action_if_accumulated_monthly_budget_exceeded: DF.Literal["", "Stop", "Warn", "Ignore"] + action_if_accumulated_monthly_budget_exceeded_on_mr: DF.Literal["", "Stop", "Warn", "Ignore"] + action_if_accumulated_monthly_budget_exceeded_on_po: DF.Literal["", "Stop", "Warn", "Ignore"] + action_if_annual_budget_exceeded: DF.Literal["", "Stop", "Warn", "Ignore"] + action_if_annual_budget_exceeded_on_mr: DF.Literal["", "Stop", "Warn", "Ignore"] + action_if_annual_budget_exceeded_on_po: DF.Literal["", "Stop", "Warn", "Ignore"] + amended_from: DF.Link | None + applicable_on_booking_actual_expenses: DF.Check + applicable_on_material_request: DF.Check + applicable_on_purchase_order: DF.Check + budget_against: DF.Literal["", "Cost Center", "Project"] + company: DF.Link + cost_center: DF.Link | None + fiscal_year: DF.Link + monthly_distribution: DF.Link | None + naming_series: DF.Data | None + project: DF.Link | None + # end: auto-generated types + def validate(self): if not self.get(frappe.scrub(self.budget_against)): frappe.throw(_("{0} is mandatory").format(self.budget_against)) diff --git a/erpnext/accounts/doctype/budget_account/budget_account.py b/erpnext/accounts/doctype/budget_account/budget_account.py index 65bc95157bbf..db2b9a34d83d 100644 --- a/erpnext/accounts/doctype/budget_account/budget_account.py +++ b/erpnext/accounts/doctype/budget_account/budget_account.py @@ -6,4 +6,19 @@ class BudgetAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link + budget_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/campaign_item/campaign_item.py b/erpnext/accounts/doctype/campaign_item/campaign_item.py index d78fdf528589..929ac3343597 100644 --- a/erpnext/accounts/doctype/campaign_item/campaign_item.py +++ b/erpnext/accounts/doctype/campaign_item/campaign_item.py @@ -6,4 +6,18 @@ class CampaignItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + campaign: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py index 60138077286f..6ab94c5c51ba 100644 --- a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py +++ b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py @@ -9,6 +9,32 @@ class CashierClosing(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.cashier_closing_payments.cashier_closing_payments import ( + CashierClosingPayments, + ) + + amended_from: DF.Link | None + custody: DF.Float + date: DF.Date | None + expense: DF.Float + from_time: DF.Time + naming_series: DF.Literal["POS-CLO-"] + net_amount: DF.Float + outstanding_amount: DF.Float + payments: DF.Table[CashierClosingPayments] + returns: DF.Float + time: DF.Time + user: DF.Link + # end: auto-generated types + def validate(self): self.validate_time() diff --git a/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py b/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py index 7617f9bdba91..84ce232858cb 100644 --- a/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py +++ b/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py @@ -6,4 +6,19 @@ class CashierClosingPayments(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Float + mode_of_payment: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py index 1e64eeeae63a..1c805ccfa98b 100644 --- a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py +++ b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py @@ -24,6 +24,18 @@ class ChartofAccountsImporter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link | None + import_file: DF.Attach | None + # end: auto-generated types + def validate(self): if self.import_file: get_coa( diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py index f8ac66444b4d..205bb290dcc6 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py @@ -8,6 +8,41 @@ class ChequePrintTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + acc_no_dist_from_left_edge: DF.Float + acc_no_dist_from_top_edge: DF.Float + acc_pay_dist_from_left_edge: DF.Float + acc_pay_dist_from_top_edge: DF.Float + amt_in_figures_from_left_edge: DF.Float + amt_in_figures_from_top_edge: DF.Float + amt_in_word_width: DF.Float + amt_in_words_from_left_edge: DF.Float + amt_in_words_from_top_edge: DF.Float + amt_in_words_line_spacing: DF.Float + bank_name: DF.Data + cheque_height: DF.Float + cheque_size: DF.Literal["", "Regular", "A4"] + cheque_width: DF.Float + date_dist_from_left_edge: DF.Float + date_dist_from_top_edge: DF.Float + has_print_format: DF.Check + is_account_payable: DF.Check + message_to_show: DF.Data | None + payer_name_from_left_edge: DF.Float + payer_name_from_top_edge: DF.Float + scanned_cheque: DF.Attach | None + signatory_from_left_edge: DF.Float + signatory_from_top_edge: DF.Float + starting_position_from_top_edge: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/closed_document/closed_document.py b/erpnext/accounts/doctype/closed_document/closed_document.py index 89d3d2e29c86..2f8cd529109e 100644 --- a/erpnext/accounts/doctype/closed_document/closed_document.py +++ b/erpnext/accounts/doctype/closed_document/closed_document.py @@ -6,4 +6,19 @@ class ClosedDocument(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + closed: DF.Check + document_type: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py index e8b34bbf034c..f662eb1fedad 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.py +++ b/erpnext/accounts/doctype/cost_center/cost_center.py @@ -10,6 +10,25 @@ class CostCenter(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link + cost_center_name: DF.Data + cost_center_number: DF.Data | None + disabled: DF.Check + is_group: DF.Check + lft: DF.Int + old_parent: DF.Link | None + parent_cost_center: DF.Link + rgt: DF.Int + # end: auto-generated types + nsm_parent_field = "parent_cost_center" def autoname(self): diff --git a/erpnext/accounts/doctype/cost_center_allocation/cost_center_allocation.py b/erpnext/accounts/doctype/cost_center_allocation/cost_center_allocation.py index 54ffe21a1522..9ed5ddf0786c 100644 --- a/erpnext/accounts/doctype/cost_center_allocation/cost_center_allocation.py +++ b/erpnext/accounts/doctype/cost_center_allocation/cost_center_allocation.py @@ -28,6 +28,25 @@ class InvalidDateError(frappe.ValidationError): class CostCenterAllocation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.cost_center_allocation_percentage.cost_center_allocation_percentage import ( + CostCenterAllocationPercentage, + ) + + allocation_percentages: DF.Table[CostCenterAllocationPercentage] + amended_from: DF.Link | None + company: DF.Link + main_cost_center: DF.Link + valid_from: DF.Date + # end: auto-generated types + def __init__(self, *args, **kwargs): super(CostCenterAllocation, self).__init__(*args, **kwargs) self._skip_from_date_validation = False diff --git a/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.py b/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.py index 7d20efb6d5ec..7257907680c4 100644 --- a/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.py +++ b/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.py @@ -6,4 +6,19 @@ class CostCenterAllocationPercentage(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + cost_center: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + percentage: DF.Percent + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/coupon_code/coupon_code.py b/erpnext/accounts/doctype/coupon_code/coupon_code.py index 6a0cdf91c0a4..540011dd0aca 100644 --- a/erpnext/accounts/doctype/coupon_code/coupon_code.py +++ b/erpnext/accounts/doctype/coupon_code/coupon_code.py @@ -9,6 +9,27 @@ class CouponCode(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + coupon_code: DF.Data | None + coupon_name: DF.Data + coupon_type: DF.Literal["Promotional", "Gift Card"] + customer: DF.Link | None + description: DF.TextEditor | None + maximum_use: DF.Int + pricing_rule: DF.Link + used: DF.Int + valid_from: DF.Date | None + valid_upto: DF.Date | None + # end: auto-generated types + def autoname(self): self.coupon_name = strip(self.coupon_name) self.name = self.coupon_name diff --git a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py index 117d5ff21e84..3393d4170bc0 100644 --- a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py +++ b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py @@ -9,6 +9,30 @@ class CurrencyExchangeSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.currency_exchange_settings_details.currency_exchange_settings_details import ( + CurrencyExchangeSettingsDetails, + ) + from erpnext.accounts.doctype.currency_exchange_settings_result.currency_exchange_settings_result import ( + CurrencyExchangeSettingsResult, + ) + + access_key: DF.Data | None + api_endpoint: DF.Data + disabled: DF.Check + req_params: DF.Table[CurrencyExchangeSettingsDetails] + result_key: DF.Table[CurrencyExchangeSettingsResult] + service_provider: DF.Literal["frankfurter.app", "exchangerate.host", "Custom"] + url: DF.Data | None + # end: auto-generated types + def validate(self): self.set_parameters_and_result() if frappe.flags.in_test or frappe.flags.in_install or frappe.flags.in_setup_wizard: diff --git a/erpnext/accounts/doctype/currency_exchange_settings_details/currency_exchange_settings_details.py b/erpnext/accounts/doctype/currency_exchange_settings_details/currency_exchange_settings_details.py index a6ad7634a53e..bba0d5d6beb2 100644 --- a/erpnext/accounts/doctype/currency_exchange_settings_details/currency_exchange_settings_details.py +++ b/erpnext/accounts/doctype/currency_exchange_settings_details/currency_exchange_settings_details.py @@ -6,4 +6,19 @@ class CurrencyExchangeSettingsDetails(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + key: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + value: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/currency_exchange_settings_result/currency_exchange_settings_result.py b/erpnext/accounts/doctype/currency_exchange_settings_result/currency_exchange_settings_result.py index 177412860aaf..75fb1dfee8d4 100644 --- a/erpnext/accounts/doctype/currency_exchange_settings_result/currency_exchange_settings_result.py +++ b/erpnext/accounts/doctype/currency_exchange_settings_result/currency_exchange_settings_result.py @@ -6,4 +6,18 @@ class CurrencyExchangeSettingsResult(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + key: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/customer_group_item/customer_group_item.py b/erpnext/accounts/doctype/customer_group_item/customer_group_item.py index 100bfd5e665f..db76f5be4ad3 100644 --- a/erpnext/accounts/doctype/customer_group_item/customer_group_item.py +++ b/erpnext/accounts/doctype/customer_group_item/customer_group_item.py @@ -6,4 +6,18 @@ class CustomerGroupItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + customer_group: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/customer_item/customer_item.py b/erpnext/accounts/doctype/customer_item/customer_item.py index da3533fcc685..67473d403c5d 100644 --- a/erpnext/accounts/doctype/customer_item/customer_item.py +++ b/erpnext/accounts/doctype/customer_item/customer_item.py @@ -6,4 +6,18 @@ class CustomerItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + customer: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py b/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py index 9b8932c19e02..25bef70fbf6d 100644 --- a/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py +++ b/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py @@ -7,4 +7,22 @@ class DiscountedInvoice(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + customer: DF.Link | None + debit_to: DF.Link | None + outstanding_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + posting_date: DF.Date | None + sales_invoice: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index 9d0d36b970a7..c61c3329c69f 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -22,6 +22,52 @@ class Dunning(AccountsController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.overdue_payment.overdue_payment import OverduePayment + + address_display: DF.SmallText | None + amended_from: DF.Link | None + base_dunning_amount: DF.Currency + body_text: DF.TextEditor | None + closing_text: DF.TextEditor | None + company: DF.Link + company_address: DF.Link | None + company_address_display: DF.SmallText | None + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + currency: DF.Link | None + customer: DF.Link + customer_address: DF.Link | None + customer_name: DF.Data | None + dunning_amount: DF.Currency + dunning_fee: DF.Currency + dunning_type: DF.Link | None + grand_total: DF.Currency + income_account: DF.Link | None + language: DF.Link | None + letter_head: DF.Link | None + naming_series: DF.Literal["DUNN-.MM.-.YY.-"] + overdue_payments: DF.Table[OverduePayment] + posting_date: DF.Date + posting_time: DF.Time | None + rate_of_interest: DF.Float + spacer: DF.Data | None + status: DF.Literal["Draft", "Resolved", "Unresolved", "Cancelled"] + total_interest: DF.Currency + total_outstanding: DF.Currency + # end: auto-generated types + def validate(self): self.validate_same_currency() self.validate_overdue_payments() diff --git a/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py b/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py index 9f3cf7f3f6c0..a126ff70d629 100644 --- a/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py +++ b/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py @@ -7,4 +7,21 @@ class DunningLetterText(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + body_text: DF.TextEditor | None + closing_text: DF.TextEditor | None + is_default_language: DF.Check + language: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/dunning_type/dunning_type.py b/erpnext/accounts/doctype/dunning_type/dunning_type.py index 226e159a3bba..77f2e004e3d7 100644 --- a/erpnext/accounts/doctype/dunning_type/dunning_type.py +++ b/erpnext/accounts/doctype/dunning_type/dunning_type.py @@ -7,6 +7,26 @@ class DunningType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.dunning_letter_text.dunning_letter_text import DunningLetterText + + company: DF.Link + cost_center: DF.Link | None + dunning_fee: DF.Currency + dunning_letter_text: DF.Table[DunningLetterText] + dunning_type: DF.Data + income_account: DF.Link | None + is_default: DF.Check + rate_of_interest: DF.Float + # end: auto-generated types + def autoname(self): company_abbr = frappe.get_value("Company", self.company, "abbr") self.name = f"{self.dunning_type} - {company_abbr}" diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py index 3b5698b118a7..4f7eeba2d103 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py @@ -17,6 +17,28 @@ class ExchangeRateRevaluation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.exchange_rate_revaluation_account.exchange_rate_revaluation_account import ( + ExchangeRateRevaluationAccount, + ) + + accounts: DF.Table[ExchangeRateRevaluationAccount] + amended_from: DF.Link | None + company: DF.Link + gain_loss_booked: DF.Currency + gain_loss_unbooked: DF.Currency + posting_date: DF.Date + rounding_loss_allowance: DF.Float + total_gain_loss: DF.Currency + # end: auto-generated types + def validate(self): self.validate_rounding_loss_allowance() self.set_total_gain_loss() diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py b/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py index 96a92bb31fd5..4efdfddf18e1 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py @@ -6,4 +6,29 @@ class ExchangeRateRevaluationAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link + account_currency: DF.Link | None + balance_in_account_currency: DF.Currency + balance_in_base_currency: DF.Currency + current_exchange_rate: DF.Float + gain_loss: DF.Currency + new_balance_in_account_currency: DF.Currency + new_balance_in_base_currency: DF.Currency + new_exchange_rate: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + party: DF.DynamicLink | None + party_type: DF.Link | None + zero_balance: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/finance_book/finance_book.py b/erpnext/accounts/doctype/finance_book/finance_book.py index 78b321b2da49..a8f7a407f1c9 100644 --- a/erpnext/accounts/doctype/finance_book/finance_book.py +++ b/erpnext/accounts/doctype/finance_book/finance_book.py @@ -6,4 +6,15 @@ class FinanceBook(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + finance_book_name: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index 0dfe569ec9af..85f3ffd903bc 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -10,6 +10,25 @@ class FiscalYear(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.fiscal_year_company.fiscal_year_company import FiscalYearCompany + + auto_created: DF.Check + companies: DF.Table[FiscalYearCompany] + disabled: DF.Check + is_short_year: DF.Check + year: DF.Data + year_end_date: DF.Date + year_start_date: DF.Date + # end: auto-generated types + def validate(self): self.validate_dates() self.validate_overlap() diff --git a/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py b/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py index d5db78dfb913..9447120d326b 100644 --- a/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py +++ b/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py @@ -6,4 +6,18 @@ class FiscalYearCompany(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 7af40c46cb55..f7dd29ab1c10 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -28,6 +28,47 @@ class GLEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + account_currency: DF.Link | None + against: DF.Text | None + against_voucher: DF.DynamicLink | None + against_voucher_type: DF.Link | None + company: DF.Link | None + cost_center: DF.Link | None + credit: DF.Currency + credit_in_account_currency: DF.Currency + credit_in_transaction_currency: DF.Currency + debit: DF.Currency + debit_in_account_currency: DF.Currency + debit_in_transaction_currency: DF.Currency + due_date: DF.Date | None + finance_book: DF.Link | None + fiscal_year: DF.Link | None + is_advance: DF.Literal["No", "Yes"] + is_cancelled: DF.Check + is_opening: DF.Literal["No", "Yes"] + party: DF.DynamicLink | None + party_type: DF.Link | None + posting_date: DF.Date | None + project: DF.Link | None + remarks: DF.Text | None + to_rename: DF.Check + transaction_currency: DF.Link | None + transaction_date: DF.Date | None + transaction_exchange_rate: DF.Float + voucher_detail_no: DF.Data | None + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + def autoname(self): """ Temporarily name doc for fast insertion diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py index 5bd4585a9a8d..76f4dadf87e3 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py @@ -17,6 +17,34 @@ class InvoiceDiscounting(AccountsController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.discounted_invoice.discounted_invoice import DiscountedInvoice + + accounts_receivable_credit: DF.Link + accounts_receivable_discounted: DF.Link + accounts_receivable_unpaid: DF.Link + amended_from: DF.Link | None + bank_account: DF.Link + bank_charges: DF.Currency + bank_charges_account: DF.Link + company: DF.Link + invoices: DF.Table[DiscountedInvoice] + loan_end_date: DF.Date | None + loan_period: DF.Int + loan_start_date: DF.Date | None + posting_date: DF.Date + short_term_loan: DF.Link + status: DF.Literal["Draft", "Sanctioned", "Disbursed", "Settled", "Cancelled"] + total_amount: DF.Currency + # end: auto-generated types + def validate(self): self.validate_mandatory() self.validate_invoices() diff --git a/erpnext/accounts/doctype/item_tax_template/item_tax_template.py b/erpnext/accounts/doctype/item_tax_template/item_tax_template.py index 7e2fca8d24c8..8d3cdc863779 100644 --- a/erpnext/accounts/doctype/item_tax_template/item_tax_template.py +++ b/erpnext/accounts/doctype/item_tax_template/item_tax_template.py @@ -8,6 +8,24 @@ class ItemTaxTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.item_tax_template_detail.item_tax_template_detail import ( + ItemTaxTemplateDetail, + ) + + company: DF.Link + disabled: DF.Check + taxes: DF.Table[ItemTaxTemplateDetail] + title: DF.Data + # end: auto-generated types + def validate(self): self.validate_tax_accounts() diff --git a/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py b/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py index 221081e84d7c..810235e3691a 100644 --- a/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py +++ b/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py @@ -6,4 +6,19 @@ class ItemTaxTemplateDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + tax_rate: DF.Float + tax_type: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 0ad20c31c152..e4f1645fd0e4 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -35,6 +35,78 @@ class StockAccountInvalidTransaction(frappe.ValidationError): class JournalEntry(AccountsController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.journal_entry_account.journal_entry_account import ( + JournalEntryAccount, + ) + + accounts: DF.Table[JournalEntryAccount] + amended_from: DF.Link | None + apply_tds: DF.Check + auto_repeat: DF.Link | None + bill_date: DF.Date | None + bill_no: DF.Data | None + cheque_date: DF.Date | None + cheque_no: DF.Data | None + clearance_date: DF.Date | None + company: DF.Link + difference: DF.Currency + due_date: DF.Date | None + finance_book: DF.Link | None + from_template: DF.Link | None + inter_company_journal_entry_reference: DF.Link | None + is_opening: DF.Literal["No", "Yes"] + is_system_generated: DF.Check + letter_head: DF.Link | None + mode_of_payment: DF.Link | None + multi_currency: DF.Check + naming_series: DF.Literal["ACC-JV-.YYYY.-"] + paid_loan: DF.Data | None + pay_to_recd_from: DF.Data | None + payment_order: DF.Link | None + posting_date: DF.Date + process_deferred_accounting: DF.Link | None + remark: DF.SmallText | None + reversal_of: DF.Link | None + select_print_heading: DF.Link | None + stock_entry: DF.Link | None + tax_withholding_category: DF.Link | None + title: DF.Data | None + total_amount: DF.Currency + total_amount_currency: DF.Link | None + total_amount_in_words: DF.Data | None + total_credit: DF.Currency + total_debit: DF.Currency + user_remark: DF.SmallText | None + voucher_type: DF.Literal[ + "Journal Entry", + "Inter Company Journal Entry", + "Bank Entry", + "Cash Entry", + "Credit Card Entry", + "Debit Note", + "Credit Note", + "Contra Entry", + "Excise Entry", + "Write Off Entry", + "Opening Entry", + "Depreciation Entry", + "Exchange Rate Revaluation", + "Exchange Gain Or Loss", + "Deferred Revenue", + "Deferred Expense", + ] + write_off_amount: DF.Currency + write_off_based_on: DF.Literal["Accounts Receivable", "Accounts Payable"] + # end: auto-generated types + def __init__(self, *args, **kwargs): super(JournalEntry, self).__init__(*args, **kwargs) diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py index 534b589273c4..00c9dcb374b1 100644 --- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py +++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py @@ -6,4 +6,56 @@ class JournalEntryAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link + account_currency: DF.Link | None + account_type: DF.Data | None + against_account: DF.Text | None + balance: DF.Currency + bank_account: DF.Link | None + cost_center: DF.Link | None + credit: DF.Currency + credit_in_account_currency: DF.Currency + debit: DF.Currency + debit_in_account_currency: DF.Currency + exchange_rate: DF.Float + is_advance: DF.Literal["No", "Yes"] + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + party: DF.DynamicLink | None + party_balance: DF.Currency + party_type: DF.Link | None + project: DF.Link | None + reference_detail_no: DF.Data | None + reference_due_date: DF.Date | None + reference_name: DF.DynamicLink | None + reference_type: DF.Literal[ + "", + "Sales Invoice", + "Purchase Invoice", + "Journal Entry", + "Sales Order", + "Purchase Order", + "Expense Claim", + "Asset", + "Loan", + "Payroll Entry", + "Employee Advance", + "Exchange Rate Revaluation", + "Invoice Discounting", + "Fees", + "Full and Final Statement", + "Payment Entry", + ] + user_remark: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py index b8ef3545d331..f87efc54e189 100644 --- a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py +++ b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py @@ -7,6 +7,41 @@ class JournalEntryTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.journal_entry_template_account.journal_entry_template_account import ( + JournalEntryTemplateAccount, + ) + + accounts: DF.Table[JournalEntryTemplateAccount] + company: DF.Link + is_opening: DF.Literal["No", "Yes"] + multi_currency: DF.Check + naming_series: DF.Literal + template_title: DF.Data + voucher_type: DF.Literal[ + "Journal Entry", + "Inter Company Journal Entry", + "Bank Entry", + "Cash Entry", + "Credit Card Entry", + "Debit Note", + "Credit Note", + "Contra Entry", + "Excise Entry", + "Write Off Entry", + "Opening Entry", + "Depreciation Entry", + "Exchange Rate Revaluation", + ] + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py b/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py index f84fddd54ca1..2426f577a1d0 100644 --- a/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py +++ b/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py @@ -7,4 +7,18 @@ class JournalEntryTemplateAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/ledger_merge/ledger_merge.py b/erpnext/accounts/doctype/ledger_merge/ledger_merge.py index 362d27342a68..49993393fe6e 100644 --- a/erpnext/accounts/doctype/ledger_merge/ledger_merge.py +++ b/erpnext/accounts/doctype/ledger_merge/ledger_merge.py @@ -10,6 +10,27 @@ class LedgerMerge(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.ledger_merge_accounts.ledger_merge_accounts import ( + LedgerMergeAccounts, + ) + + account: DF.Link + account_name: DF.Data + company: DF.Link + is_group: DF.Check + merge_accounts: DF.Table[LedgerMergeAccounts] + root_type: DF.Literal["", "Asset", "Liability", "Income", "Expense", "Equity"] + status: DF.Literal["Pending", "Success", "Partial Success", "Error"] + # end: auto-generated types + def start_merge(self): from frappe.utils.background_jobs import enqueue from frappe.utils.scheduler import is_scheduler_inactive diff --git a/erpnext/accounts/doctype/ledger_merge_accounts/ledger_merge_accounts.py b/erpnext/accounts/doctype/ledger_merge_accounts/ledger_merge_accounts.py index 30dfd657820f..e40e7d6ada99 100644 --- a/erpnext/accounts/doctype/ledger_merge_accounts/ledger_merge_accounts.py +++ b/erpnext/accounts/doctype/ledger_merge_accounts/ledger_merge_accounts.py @@ -6,4 +6,20 @@ class LedgerMergeAccounts(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link + account_name: DF.Data + merged: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py b/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py index dcb43fb2cb30..eb8a06606d5a 100644 --- a/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py +++ b/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py @@ -10,6 +10,27 @@ class LoyaltyPointEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link | None + customer: DF.Link | None + expiry_date: DF.Date | None + invoice: DF.DynamicLink | None + invoice_type: DF.Link | None + loyalty_points: DF.Int + loyalty_program: DF.Link | None + loyalty_program_tier: DF.Data | None + posting_date: DF.Date | None + purchase_amount: DF.Currency + redeem_against: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py b/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py index bc8f5c70a7c4..1463b1057129 100644 --- a/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py +++ b/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py @@ -6,4 +6,20 @@ class LoyaltyPointEntryRedemption(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + redeemed_points: DF.Int + redemption_date: DF.Date | None + sales_invoice: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/loyalty_program/loyalty_program.py b/erpnext/accounts/doctype/loyalty_program/loyalty_program.py index 4f58579a52d6..463b3cdc3a19 100644 --- a/erpnext/accounts/doctype/loyalty_program/loyalty_program.py +++ b/erpnext/accounts/doctype/loyalty_program/loyalty_program.py @@ -9,6 +9,33 @@ class LoyaltyProgram(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.loyalty_program_collection.loyalty_program_collection import ( + LoyaltyProgramCollection, + ) + + auto_opt_in: DF.Check + collection_rules: DF.Table[LoyaltyProgramCollection] + company: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + customer_group: DF.Link | None + customer_territory: DF.Link | None + expense_account: DF.Link | None + expiry_duration: DF.Int + from_date: DF.Date + loyalty_program_name: DF.Data + loyalty_program_type: DF.Literal["Single Tier Program", "Multiple Tier Program"] + to_date: DF.Date | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py b/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py index c462d5f0657e..b6cecb8c3793 100644 --- a/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py +++ b/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py @@ -6,4 +6,20 @@ class LoyaltyProgramCollection(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + collection_factor: DF.Currency + min_spent: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + tier_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py index 7d6ef3c3bf5c..6fc9eba4c3f2 100644 --- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py +++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py @@ -8,6 +8,24 @@ class ModeofPayment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.mode_of_payment_account.mode_of_payment_account import ( + ModeofPaymentAccount, + ) + + accounts: DF.Table[ModeofPaymentAccount] + enabled: DF.Check + mode_of_payment: DF.Data + type: DF.Literal["Cash", "Bank", "General", "Phone"] + # end: auto-generated types + def validate(self): self.validate_accounts() self.validate_repeating_companies() diff --git a/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py b/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py index 3d3bba6b23dd..e20d6fb2e0b7 100644 --- a/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py +++ b/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py @@ -6,4 +6,19 @@ class ModeofPaymentAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link | None + default_account: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py index 1d19708eddfc..72705765f874 100644 --- a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py +++ b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py @@ -9,6 +9,23 @@ class MonthlyDistribution(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.monthly_distribution_percentage.monthly_distribution_percentage import ( + MonthlyDistributionPercentage, + ) + + distribution_id: DF.Data + fiscal_year: DF.Link | None + percentages: DF.Table[MonthlyDistributionPercentage] + # end: auto-generated types + @frappe.whitelist() def get_months(self): month_list = [ diff --git a/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py b/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py index 274e2b643f96..d12f79fd8995 100644 --- a/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py +++ b/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py @@ -6,4 +6,19 @@ class MonthlyDistributionPercentage(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + month: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + percentage_allocation: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py index 680afb1143b0..f5f8f8ab1077 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py @@ -14,6 +14,25 @@ class OpeningInvoiceCreationTool(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.opening_invoice_creation_tool_item.opening_invoice_creation_tool_item import ( + OpeningInvoiceCreationToolItem, + ) + + company: DF.Link + cost_center: DF.Link | None + create_missing_party: DF.Check + invoice_type: DF.Literal["Sales", "Purchase"] + invoices: DF.Table[OpeningInvoiceCreationToolItem] + # end: auto-generated types + def onload(self): """Load the Opening Invoice summary""" summary, max_count = self.get_opening_invoice_summary() diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py index 6c0ca4a19f36..bc48300286f5 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py @@ -6,4 +6,27 @@ class OpeningInvoiceCreationToolItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + cost_center: DF.Link | None + due_date: DF.Date | None + invoice_number: DF.Data | None + item_name: DF.Data | None + outstanding_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + party: DF.DynamicLink + party_type: DF.Link | None + posting_date: DF.Date | None + qty: DF.Data | None + temporary_opening_account: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/overdue_payment/overdue_payment.py b/erpnext/accounts/doctype/overdue_payment/overdue_payment.py index 6a543ad46749..95e4255cb2b4 100644 --- a/erpnext/accounts/doctype/overdue_payment/overdue_payment.py +++ b/erpnext/accounts/doctype/overdue_payment/overdue_payment.py @@ -6,4 +6,31 @@ class OverduePayment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + discounted_amount: DF.Currency + due_date: DF.Date | None + dunning_level: DF.Int + interest: DF.Currency + invoice_portion: DF.Percent + mode_of_payment: DF.Link | None + outstanding: DF.Currency + overdue_days: DF.Data | None + paid_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + payment_amount: DF.Currency + payment_schedule: DF.Data | None + payment_term: DF.Link | None + sales_invoice: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/party_account/party_account.py b/erpnext/accounts/doctype/party_account/party_account.py index cd270b1184c2..4b795958a2f2 100644 --- a/erpnext/accounts/doctype/party_account/party_account.py +++ b/erpnext/accounts/doctype/party_account/party_account.py @@ -6,4 +6,20 @@ class PartyAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + advance_account: DF.Link | None + company: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/party_link/party_link.py b/erpnext/accounts/doctype/party_link/party_link.py index 312cfd2c0a11..d60acce241c0 100644 --- a/erpnext/accounts/doctype/party_link/party_link.py +++ b/erpnext/accounts/doctype/party_link/party_link.py @@ -7,6 +7,20 @@ class PartyLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + primary_party: DF.DynamicLink | None + primary_role: DF.Link + secondary_party: DF.DynamicLink | None + secondary_role: DF.Link | None + # end: auto-generated types + def validate(self): if self.primary_role not in ["Customer", "Supplier"]: frappe.throw( diff --git a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py index b71dbb97d75a..fc67c526b28b 100644 --- a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py +++ b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py @@ -6,4 +6,21 @@ class PaymentEntryDeduction(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link + amount: DF.Currency + cost_center: DF.Link + description: DF.SmallText | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py index fc1cad9ad67b..13707e53efc9 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py @@ -6,4 +6,28 @@ class PaymentEntryReference(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + allocated_amount: DF.Float + bill_no: DF.Data | None + due_date: DF.Date | None + exchange_gain_loss: DF.Currency + exchange_rate: DF.Float + outstanding_amount: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + payment_term: DF.Link | None + reference_doctype: DF.Link + reference_name: DF.DynamicLink + total_amount: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py index 791de2570a2c..f1bf363eca04 100644 --- a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py +++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py @@ -7,6 +7,22 @@ class PaymentGatewayAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + currency: DF.ReadOnly | None + is_default: DF.Check + message: DF.SmallText | None + payment_account: DF.Link + payment_channel: DF.Literal["", "Email", "Phone"] + payment_gateway: DF.Link + # end: auto-generated types + def autoname(self): self.name = self.payment_gateway + " - " + self.currency diff --git a/erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.py b/erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.py index 58691ab8d47f..e8dfda202341 100644 --- a/erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.py +++ b/erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.py @@ -21,6 +21,35 @@ class PaymentLedgerEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + account_currency: DF.Link | None + account_type: DF.Literal["Receivable", "Payable"] + against_voucher_no: DF.DynamicLink | None + against_voucher_type: DF.Link | None + amount: DF.Currency + amount_in_account_currency: DF.Currency + company: DF.Link | None + cost_center: DF.Link | None + delinked: DF.Check + due_date: DF.Date | None + finance_book: DF.Link | None + party: DF.DynamicLink | None + party_type: DF.Link | None + posting_date: DF.Date | None + remarks: DF.Text | None + voucher_detail_no: DF.Data | None + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + def validate_account(self): valid_account = frappe.db.get_list( "Account", diff --git a/erpnext/accounts/doctype/payment_order/payment_order.py b/erpnext/accounts/doctype/payment_order/payment_order.py index ff9615d14fc6..0ed26e457867 100644 --- a/erpnext/accounts/doctype/payment_order/payment_order.py +++ b/erpnext/accounts/doctype/payment_order/payment_order.py @@ -11,6 +11,30 @@ class PaymentOrder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.payment_order_reference.payment_order_reference import ( + PaymentOrderReference, + ) + + account: DF.Data | None + amended_from: DF.Link | None + company: DF.Link + company_bank: DF.Link | None + company_bank_account: DF.Link + naming_series: DF.Literal["PMO-"] + party: DF.Link | None + payment_order_type: DF.Literal["", "Payment Request", "Payment Entry"] + posting_date: DF.Date | None + references: DF.Table[PaymentOrderReference] + # end: auto-generated types + def on_submit(self): self.update_payment_status() diff --git a/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py b/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py index 94704fcd16eb..26c2ce2852e2 100644 --- a/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py +++ b/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py @@ -6,4 +6,26 @@ class PaymentOrderReference(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + amount: DF.Currency + bank_account: DF.Link + mode_of_payment: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + payment_reference: DF.Data | None + payment_request: DF.Link | None + reference_doctype: DF.Link + reference_name: DF.DynamicLink + supplier: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 0c914b351b50..7ccbb445d200 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -23,6 +23,48 @@ class PaymentReconciliation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.payment_reconciliation_allocation.payment_reconciliation_allocation import ( + PaymentReconciliationAllocation, + ) + from erpnext.accounts.doctype.payment_reconciliation_invoice.payment_reconciliation_invoice import ( + PaymentReconciliationInvoice, + ) + from erpnext.accounts.doctype.payment_reconciliation_payment.payment_reconciliation_payment import ( + PaymentReconciliationPayment, + ) + + allocation: DF.Table[PaymentReconciliationAllocation] + bank_cash_account: DF.Link | None + company: DF.Link + cost_center: DF.Link | None + default_advance_account: DF.Link | None + from_invoice_date: DF.Date | None + from_payment_date: DF.Date | None + invoice_limit: DF.Int + invoice_name: DF.Data | None + invoices: DF.Table[PaymentReconciliationInvoice] + maximum_invoice_amount: DF.Currency + maximum_payment_amount: DF.Currency + minimum_invoice_amount: DF.Currency + minimum_payment_amount: DF.Currency + party: DF.DynamicLink + party_type: DF.Link + payment_limit: DF.Int + payment_name: DF.Data | None + payments: DF.Table[PaymentReconciliationPayment] + receivable_payable_account: DF.Link + to_invoice_date: DF.Date | None + to_payment_date: DF.Date | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(PaymentReconciliation, self).__init__(*args, **kwargs) self.common_filter_conditions = [] diff --git a/erpnext/accounts/doctype/payment_reconciliation_allocation/payment_reconciliation_allocation.py b/erpnext/accounts/doctype/payment_reconciliation_allocation/payment_reconciliation_allocation.py index 9db8e62af08b..a4141afb3773 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_allocation/payment_reconciliation_allocation.py +++ b/erpnext/accounts/doctype/payment_reconciliation_allocation/payment_reconciliation_allocation.py @@ -6,4 +6,32 @@ class PaymentReconciliationAllocation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allocated_amount: DF.Currency + amount: DF.Currency + cost_center: DF.Link | None + currency: DF.Link | None + difference_account: DF.Link | None + difference_amount: DF.Currency + exchange_rate: DF.Float + gain_loss_posting_date: DF.Date | None + invoice_number: DF.DynamicLink + invoice_type: DF.Link + is_advance: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reference_name: DF.DynamicLink + reference_row: DF.Data | None + reference_type: DF.Link + unreconciled_amount: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py index 7665b75ff0fd..1e9f6cec8250 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py +++ b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py @@ -6,4 +6,24 @@ class PaymentReconciliationInvoice(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + currency: DF.Link | None + exchange_rate: DF.Float + invoice_date: DF.Date | None + invoice_number: DF.DynamicLink | None + invoice_type: DF.Literal["Sales Invoice", "Purchase Invoice", "Journal Entry"] + outstanding_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py index c0e3fd641ad3..aa956fe59b8c 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py @@ -6,4 +6,28 @@ class PaymentReconciliationPayment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + cost_center: DF.Link | None + currency: DF.Link | None + difference_amount: DF.Currency + exchange_rate: DF.Float + is_advance: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + posting_date: DF.Date | None + reference_name: DF.DynamicLink | None + reference_row: DF.Data | None + reference_type: DF.Link | None + remark: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 5f0b434c701f..91f2ce2fea6c 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -27,6 +27,65 @@ def _get_payment_gateway_controller(*args, **kwargs): class PaymentRequest(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.subscription_plan_detail.subscription_plan_detail import ( + SubscriptionPlanDetail, + ) + + account: DF.ReadOnly | None + amended_from: DF.Link | None + bank: DF.Link | None + bank_account: DF.Link | None + bank_account_no: DF.ReadOnly | None + branch_code: DF.ReadOnly | None + cost_center: DF.Link | None + currency: DF.Link | None + email_to: DF.Data | None + grand_total: DF.Currency + iban: DF.ReadOnly | None + is_a_subscription: DF.Check + make_sales_invoice: DF.Check + message: DF.Text | None + mode_of_payment: DF.Link | None + mute_email: DF.Check + naming_series: DF.Literal["ACC-PRQ-.YYYY.-"] + party: DF.DynamicLink | None + party_type: DF.Link | None + payment_account: DF.ReadOnly | None + payment_channel: DF.Literal["", "Email", "Phone"] + payment_gateway: DF.ReadOnly | None + payment_gateway_account: DF.Link | None + payment_order: DF.Link | None + payment_request_type: DF.Literal["Outward", "Inward"] + payment_url: DF.Data | None + print_format: DF.Literal + project: DF.Link | None + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + status: DF.Literal[ + "", + "Draft", + "Requested", + "Initiated", + "Partially Paid", + "Payment Ordered", + "Paid", + "Failed", + "Cancelled", + ] + subject: DF.Data | None + subscription_plans: DF.Table[SubscriptionPlanDetail] + swift_number: DF.ReadOnly | None + transaction_date: DF.Date | None + # end: auto-generated types + def validate(self): if self.get("__islocal"): self.status = "Draft" diff --git a/erpnext/accounts/doctype/payment_schedule/payment_schedule.py b/erpnext/accounts/doctype/payment_schedule/payment_schedule.py index 33e261f0efd2..8a292fd3aba2 100644 --- a/erpnext/accounts/doctype/payment_schedule/payment_schedule.py +++ b/erpnext/accounts/doctype/payment_schedule/payment_schedule.py @@ -6,4 +6,30 @@ class PaymentSchedule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + base_payment_amount: DF.Currency + description: DF.SmallText | None + discount: DF.Float + discount_date: DF.Date | None + discount_type: DF.Literal["Percentage", "Amount"] + discounted_amount: DF.Currency + due_date: DF.Date + invoice_portion: DF.Percent + mode_of_payment: DF.Link | None + outstanding: DF.Currency + paid_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + payment_amount: DF.Currency + payment_term: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_term/payment_term.py b/erpnext/accounts/doctype/payment_term/payment_term.py index 956c2b13fd99..5f9171ec2281 100644 --- a/erpnext/accounts/doctype/payment_term/payment_term.py +++ b/erpnext/accounts/doctype/payment_term/payment_term.py @@ -6,4 +6,33 @@ class PaymentTerm(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + credit_days: DF.Int + credit_months: DF.Int + description: DF.SmallText | None + discount: DF.Float + discount_type: DF.Literal["Percentage", "Amount"] + discount_validity: DF.Int + discount_validity_based_on: DF.Literal[ + "Day(s) after invoice date", + "Day(s) after the end of the invoice month", + "Month(s) after the end of the invoice month", + ] + due_date_based_on: DF.Literal[ + "Day(s) after invoice date", + "Day(s) after the end of the invoice month", + "Month(s) after the end of the invoice month", + ] + invoice_portion: DF.Float + mode_of_payment: DF.Link | None + payment_term_name: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py index 7b04a68e89af..8f028f916037 100644 --- a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py +++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py @@ -9,6 +9,23 @@ class PaymentTermsTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.payment_terms_template_detail.payment_terms_template_detail import ( + PaymentTermsTemplateDetail, + ) + + allocate_payment_based_on_payment_terms: DF.Check + template_name: DF.Data | None + terms: DF.Table[PaymentTermsTemplateDetail] + # end: auto-generated types + def validate(self): self.validate_invoice_portion() self.validate_terms() diff --git a/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py b/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py index 710988bdf0ea..0edcd42f388a 100644 --- a/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py +++ b/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py @@ -6,4 +6,36 @@ class PaymentTermsTemplateDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + credit_days: DF.Int + credit_months: DF.Int + description: DF.SmallText | None + discount: DF.Float + discount_type: DF.Literal["Percentage", "Amount"] + discount_validity: DF.Int + discount_validity_based_on: DF.Literal[ + "Day(s) after invoice date", + "Day(s) after the end of the invoice month", + "Month(s) after the end of the invoice month", + ] + due_date_based_on: DF.Literal[ + "Day(s) after invoice date", + "Day(s) after the end of the invoice month", + "Month(s) after the end of the invoice month", + ] + invoice_portion: DF.Float + mode_of_payment: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + payment_term: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 674db6c2e430..2a84d971f442 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -15,6 +15,26 @@ class PeriodClosingVoucher(AccountsController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + closing_account_head: DF.Link + company: DF.Link + error_message: DF.Text | None + fiscal_year: DF.Link + gle_processing_status: DF.Literal["In Progress", "Completed", "Failed"] + posting_date: DF.Date + remarks: DF.SmallText + transaction_date: DF.Date | None + year_start_date: DF.Date | None + # end: auto-generated types + def validate(self): self.validate_account_head() self.validate_posting_date() diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py index 115b415eedad..0f3a5bb916f4 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py @@ -14,6 +14,43 @@ class POSClosingEntry(StatusUpdater): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pos_closing_entry_detail.pos_closing_entry_detail import ( + POSClosingEntryDetail, + ) + from erpnext.accounts.doctype.pos_closing_entry_taxes.pos_closing_entry_taxes import ( + POSClosingEntryTaxes, + ) + from erpnext.accounts.doctype.pos_invoice_reference.pos_invoice_reference import ( + POSInvoiceReference, + ) + + amended_from: DF.Link | None + company: DF.Link + error_message: DF.SmallText | None + grand_total: DF.Currency + net_total: DF.Currency + payment_reconciliation: DF.Table[POSClosingEntryDetail] + period_end_date: DF.Datetime + period_start_date: DF.Datetime + pos_opening_entry: DF.Link + pos_profile: DF.Link + pos_transactions: DF.Table[POSInvoiceReference] + posting_date: DF.Date + posting_time: DF.Time + status: DF.Literal["Draft", "Submitted", "Queued", "Failed", "Cancelled"] + taxes: DF.Table[POSClosingEntryTaxes] + total_quantity: DF.Float + user: DF.Link + # end: auto-generated types + def validate(self): self.posting_date = self.posting_date or frappe.utils.nowdate() self.posting_time = self.posting_time or frappe.utils.nowtime() diff --git a/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py b/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py index 2e34e44c92d9..97e5670b05a2 100644 --- a/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py +++ b/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py @@ -6,4 +6,22 @@ class POSClosingEntryDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + closing_amount: DF.Currency + difference: DF.Currency + expected_amount: DF.Currency + mode_of_payment: DF.Link + opening_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py b/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py index cfedeb3a9ab4..ce354a7552c9 100644 --- a/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py +++ b/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py @@ -6,4 +6,20 @@ class POSClosingEntryTaxes(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_head: DF.Link | None + amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Percent + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py b/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py index 5e532ae560b4..a1a184ee9ef6 100644 --- a/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py +++ b/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py @@ -6,4 +6,18 @@ class POSCustomerGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + customer_group: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_field/pos_field.py b/erpnext/accounts/doctype/pos_field/pos_field.py index 4ef8827421f5..68441c623a3e 100644 --- a/erpnext/accounts/doctype/pos_field/pos_field.py +++ b/erpnext/accounts/doctype/pos_field/pos_field.py @@ -7,4 +7,24 @@ class POSField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + default_value: DF.Data | None + fieldname: DF.Literal + fieldtype: DF.Data | None + label: DF.Data | None + options: DF.Text | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + read_only: DF.Check + reqd: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 9091a77f9944..bfb51da58b32 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -20,6 +20,169 @@ class POSInvoice(SalesInvoice): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.payment_schedule.payment_schedule import PaymentSchedule + from erpnext.accounts.doctype.pos_invoice_item.pos_invoice_item import POSInvoiceItem + 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_payment.sales_invoice_payment import ( + SalesInvoicePayment, + ) + from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import ( + SalesInvoiceTimesheet, + ) + from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import ( + SalesTaxesandCharges, + ) + from erpnext.selling.doctype.sales_team.sales_team import SalesTeam + from erpnext.stock.doctype.packed_item.packed_item import PackedItem + + account_for_change_amount: DF.Link | None + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + advances: DF.Table[SalesInvoiceAdvance] + against_income_account: DF.SmallText | None + allocate_advances_automatically: DF.Check + amended_from: DF.Link | None + amount_eligible_for_commission: DF.Currency + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + auto_repeat: DF.Link | None + base_change_amount: DF.Currency + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_paid_amount: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + base_write_off_amount: DF.Currency + campaign: DF.Link | None + cash_bank_account: DF.Link | None + change_amount: DF.Currency + commission_rate: DF.Float + company: DF.Link + company_address: DF.Link | None + company_address_display: DF.SmallText | None + consolidated_invoice: DF.Link | None + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.Data | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + coupon_code: DF.Link | None + currency: DF.Link + customer: DF.Link | None + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + debit_to: DF.Link + discount_amount: DF.Currency + due_date: DF.Date | None + from_date: DF.Date | None + grand_total: DF.Currency + group_same_items: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + inter_company_invoice_reference: DF.Link | None + is_discounted: DF.Check + is_opening: DF.Literal["No", "Yes"] + is_pos: DF.Check + is_return: DF.Check + items: DF.Table[POSInvoiceItem] + language: DF.Data | None + letter_head: DF.Link | None + loyalty_amount: DF.Currency + loyalty_points: DF.Int + loyalty_program: DF.Link | None + loyalty_redemption_account: DF.Link | None + loyalty_redemption_cost_center: DF.Link | None + naming_series: DF.Literal["ACC-PSINV-.YYYY.-"] + net_total: DF.Currency + other_charges_calculation: DF.LongText | None + outstanding_amount: DF.Currency + packed_items: DF.Table[PackedItem] + paid_amount: DF.Currency + party_account_currency: DF.Link | None + payment_schedule: DF.Table[PaymentSchedule] + payment_terms_template: DF.Link | None + payments: DF.Table[SalesInvoicePayment] + plc_conversion_rate: DF.Float + po_date: DF.Date | None + po_no: DF.Data | None + pos_profile: DF.Link | None + posting_date: DF.Date + posting_time: DF.Time | None + price_list_currency: DF.Link + pricing_rules: DF.Table[PricingRuleDetail] + project: DF.Link | None + redeem_loyalty_points: DF.Check + remarks: DF.SmallText | None + return_against: DF.Link | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + sales_partner: DF.Link | None + sales_team: DF.Table[SalesTeam] + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + selling_price_list: DF.Link + set_posting_time: DF.Check + set_warehouse: DF.Link | None + shipping_address: DF.SmallText | None + shipping_address_name: DF.Link | None + shipping_rule: DF.Link | None + source: DF.Link | None + status: DF.Literal[ + "", + "Draft", + "Return", + "Credit Note Issued", + "Consolidated", + "Submitted", + "Paid", + "Unpaid", + "Unpaid and Discounted", + "Overdue and Discounted", + "Overdue", + "Cancelled", + ] + tax_category: DF.Link | None + tax_id: DF.Data | None + taxes: DF.Table[SalesTaxesandCharges] + taxes_and_charges: DF.Link | None + tc_name: DF.Link | None + terms: DF.TextEditor | None + territory: DF.Link | None + timesheets: DF.Table[SalesInvoiceTimesheet] + title: DF.Data | None + to_date: DF.Date | None + total: DF.Currency + total_advance: DF.Currency + total_billing_amount: DF.Currency + total_commission: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + update_billed_amount_in_delivery_note: DF.Check + update_billed_amount_in_sales_order: DF.Check + update_stock: DF.Check + write_off_account: DF.Link | None + write_off_amount: DF.Currency + write_off_cost_center: DF.Link | None + write_off_outstanding_amount_automatically: DF.Check + # end: auto-generated types + def __init__(self, *args, **kwargs): super(POSInvoice, self).__init__(*args, **kwargs) diff --git a/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py b/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py index 7e3ae82a8bef..e2a62f1336e5 100644 --- a/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py +++ b/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py @@ -7,4 +7,84 @@ class POSInvoiceItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_batch_qty: DF.Float + actual_qty: DF.Float + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + asset: DF.Link | None + barcode: DF.Data | None + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + batch_no: DF.Link | None + brand: DF.Data | None + conversion_factor: DF.Float + cost_center: DF.Link + customer_item_code: DF.Data | None + deferred_revenue_account: DF.Link | None + delivered_by_supplier: DF.Check + delivered_qty: DF.Float + delivery_note: DF.Link | None + description: DF.TextEditor + discount_amount: DF.Currency + discount_percentage: DF.Percent + dn_detail: DF.Data | None + enable_deferred_revenue: DF.Check + expense_account: DF.Link | None + finance_book: DF.Link | None + grant_commission: DF.Check + has_item_scanned: DF.Check + image: DF.Attach | None + income_account: DF.Link + is_fixed_asset: DF.Check + is_free_item: DF.Check + item_code: DF.Link | None + item_group: DF.Link | None + item_name: DF.Data + item_tax_rate: DF.SmallText | None + item_tax_template: DF.Link | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + net_amount: DF.Currency + net_rate: DF.Currency + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + pos_invoice_item: DF.Data | None + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + project: DF.Link | None + qty: DF.Float + quality_inspection: DF.Link | None + rate: DF.Currency + rate_with_margin: DF.Currency + sales_order: DF.Link | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + service_end_date: DF.Date | None + service_start_date: DF.Date | None + service_stop_date: DF.Date | None + so_detail: DF.Data | None + stock_qty: DF.Float + stock_uom: DF.Link | None + target_warehouse: DF.Link | None + total_weight: DF.Float + uom: DF.Link + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index c161dac33fb0..cd858cab1845 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -16,6 +16,30 @@ class POSInvoiceMergeLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pos_invoice_reference.pos_invoice_reference import ( + POSInvoiceReference, + ) + + amended_from: DF.Link | None + consolidated_credit_note: DF.Link | None + consolidated_invoice: DF.Link | None + customer: DF.Link + customer_group: DF.Link | None + merge_invoices_based_on: DF.Literal["Customer", "Customer Group"] + pos_closing_entry: DF.Link | None + pos_invoices: DF.Table[POSInvoiceReference] + posting_date: DF.Date + posting_time: DF.Time + # end: auto-generated types + def validate(self): self.validate_customer() self.validate_pos_invoice_status() diff --git a/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py b/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py index c1c36f8da87c..6e7710a3af8a 100644 --- a/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py +++ b/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py @@ -7,4 +7,23 @@ class POSInvoiceReference(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + customer: DF.Link + grand_total: DF.Currency + is_return: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + pos_invoice: DF.Link + posting_date: DF.Date + return_against: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_item_group/pos_item_group.py b/erpnext/accounts/doctype/pos_item_group/pos_item_group.py index 75fa08048d4d..650b0be425c7 100644 --- a/erpnext/accounts/doctype/pos_item_group/pos_item_group.py +++ b/erpnext/accounts/doctype/pos_item_group/pos_item_group.py @@ -6,4 +6,18 @@ class POSItemGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_group: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py index 3cd14264bb82..10b07c2c8005 100644 --- a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py +++ b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py @@ -10,6 +10,31 @@ class POSOpeningEntry(StatusUpdater): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pos_opening_entry_detail.pos_opening_entry_detail import ( + POSOpeningEntryDetail, + ) + + amended_from: DF.Link | None + balance_details: DF.Table[POSOpeningEntryDetail] + company: DF.Link + period_end_date: DF.Date | None + period_start_date: DF.Datetime + pos_closing_entry: DF.Data | None + pos_profile: DF.Link + posting_date: DF.Date + set_posting_date: DF.Check + status: DF.Literal["Draft", "Open", "Closed", "Cancelled"] + user: DF.Link + # end: auto-generated types + def validate(self): self.validate_pos_profile_and_cashier() self.validate_payment_method_account() diff --git a/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py b/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py index 9108b9080b4b..e66769c4aa70 100644 --- a/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py +++ b/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py @@ -7,4 +7,19 @@ class POSOpeningEntryDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + mode_of_payment: DF.Link + opening_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py b/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py index 589047d1d55a..42d0409189bb 100644 --- a/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py +++ b/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py @@ -7,4 +7,20 @@ class POSPaymentMethod(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_in_returns: DF.Check + default: DF.Check + mode_of_payment: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index 58be2d3e5c0d..30f3e0cc9e9c 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -9,6 +9,57 @@ class POSProfile(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pos_customer_group.pos_customer_group import POSCustomerGroup + from erpnext.accounts.doctype.pos_item_group.pos_item_group import POSItemGroup + from erpnext.accounts.doctype.pos_payment_method.pos_payment_method import POSPaymentMethod + from erpnext.accounts.doctype.pos_profile_user.pos_profile_user import POSProfileUser + + account_for_change_amount: DF.Link | None + allow_discount_change: DF.Check + allow_rate_change: DF.Check + applicable_for_users: DF.Table[POSProfileUser] + apply_discount_on: DF.Literal["Grand Total", "Net Total"] + auto_add_item_to_cart: DF.Check + campaign: DF.Link | None + company: DF.Link + company_address: DF.Link | None + cost_center: DF.Link | None + country: DF.ReadOnly | None + currency: DF.Link + customer: DF.Link | None + customer_groups: DF.Table[POSCustomerGroup] + disable_rounded_total: DF.Check + disabled: DF.Check + expense_account: DF.Link | None + hide_images: DF.Check + hide_unavailable_items: DF.Check + ignore_pricing_rule: DF.Check + income_account: DF.Link | None + item_groups: DF.Table[POSItemGroup] + letter_head: DF.Link | None + payments: DF.Table[POSPaymentMethod] + print_format: DF.Link | None + select_print_heading: DF.Link | None + selling_price_list: DF.Link | None + tax_category: DF.Link | None + taxes_and_charges: DF.Link | None + tc_name: DF.Link | None + update_stock: DF.Check + validate_stock_on_save: DF.Check + warehouse: DF.Link + write_off_account: DF.Link + write_off_cost_center: DF.Link + write_off_limit: DF.Currency + # end: auto-generated types + def validate(self): self.validate_default_profile() self.validate_all_link_fields() diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py index c92d56322500..d4de2632c300 100644 --- a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py @@ -6,4 +6,19 @@ class POSProfileUser(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + default: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + user: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py b/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py index fd55dc85a7f2..181f9ef54fb0 100644 --- a/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py +++ b/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py @@ -7,4 +7,19 @@ class POSSearchFields(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + field: DF.Literal + fieldname: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.py b/erpnext/accounts/doctype/pos_settings/pos_settings.py index 2adecc0859d0..1e298a68f4b4 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.py +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.py @@ -6,5 +6,20 @@ class POSSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pos_field.pos_field import POSField + from erpnext.accounts.doctype.pos_search_fields.pos_search_fields import POSSearchFields + + invoice_fields: DF.Table[POSField] + pos_search_fields: DF.Table[POSSearchFields] + # end: auto-generated types + def validate(self): pass diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 0b7ea2470ce9..b41cf53665e6 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -18,6 +18,115 @@ class PricingRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pricing_rule_brand.pricing_rule_brand import PricingRuleBrand + from erpnext.accounts.doctype.pricing_rule_item_code.pricing_rule_item_code import ( + PricingRuleItemCode, + ) + from erpnext.accounts.doctype.pricing_rule_item_group.pricing_rule_item_group import ( + PricingRuleItemGroup, + ) + + applicable_for: DF.Literal[ + "", + "Customer", + "Customer Group", + "Territory", + "Sales Partner", + "Campaign", + "Supplier", + "Supplier Group", + ] + apply_discount_on: DF.Literal["Grand Total", "Net Total"] + apply_discount_on_rate: DF.Check + apply_multiple_pricing_rules: DF.Check + apply_on: DF.Literal["", "Item Code", "Item Group", "Brand", "Transaction"] + apply_recursion_over: DF.Float + apply_rule_on_other: DF.Literal["", "Item Code", "Item Group", "Brand"] + brands: DF.Table[PricingRuleBrand] + buying: DF.Check + campaign: DF.Link | None + company: DF.Link | None + condition: DF.Code | None + coupon_code_based: DF.Check + currency: DF.Link + customer: DF.Link | None + customer_group: DF.Link | None + disable: DF.Check + discount_amount: DF.Currency + discount_percentage: DF.Float + for_price_list: DF.Link | None + free_item: DF.Link | None + free_item_rate: DF.Currency + free_item_uom: DF.Link | None + free_qty: DF.Float + is_cumulative: DF.Check + is_recursive: DF.Check + item_groups: DF.Table[PricingRuleItemGroup] + items: DF.Table[PricingRuleItemCode] + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + max_amt: DF.Currency + max_qty: DF.Float + min_amt: DF.Currency + min_qty: DF.Float + mixed_conditions: DF.Check + naming_series: DF.Literal["PRLE-.####"] + other_brand: DF.Link | None + other_item_code: DF.Link | None + other_item_group: DF.Link | None + price_or_product_discount: DF.Literal["Price", "Product"] + priority: DF.Literal[ + "", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + ] + promotional_scheme: DF.Link | None + promotional_scheme_id: DF.Data | None + rate: DF.Currency + rate_or_discount: DF.Literal["", "Rate", "Discount Percentage", "Discount Amount"] + recurse_for: DF.Float + round_free_qty: DF.Check + rule_description: DF.SmallText | None + sales_partner: DF.Link | None + same_item: DF.Check + selling: DF.Check + supplier: DF.Link | None + supplier_group: DF.Link | None + territory: DF.Link | None + threshold_percentage: DF.Percent + title: DF.Data + valid_from: DF.Date | None + valid_upto: DF.Date | None + validate_applied_rule: DF.Check + warehouse: DF.Link | None + # end: auto-generated types + def validate(self): self.validate_mandatory() self.validate_duplicate_apply_on() diff --git a/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py b/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py index fdd5be0f6c38..ffd74c231973 100644 --- a/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py +++ b/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py @@ -6,4 +6,19 @@ class PricingRuleBrand(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + brand: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py b/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py index f48b56950894..18be93d5702b 100644 --- a/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py +++ b/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py @@ -6,4 +6,23 @@ class PricingRuleDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + child_docname: DF.Data | None + item_code: DF.Data | None + margin_type: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + pricing_rule: DF.Link | None + rate_or_discount: DF.Data | None + rule_applied: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py b/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py index f8a2c0e648c6..ae9570aea484 100644 --- a/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py +++ b/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py @@ -6,4 +6,19 @@ class PricingRuleItemCode(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_code: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py b/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py index 940350af902b..fed0c293ddc0 100644 --- a/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py +++ b/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py @@ -6,4 +6,19 @@ class PricingRuleItemGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_group: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py b/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py index 1f88849b26c3..6a13c1f73432 100644 --- a/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py +++ b/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py @@ -15,6 +15,23 @@ class ProcessDeferredAccounting(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + amended_from: DF.Link | None + company: DF.Link + end_date: DF.Date + posting_date: DF.Date + start_date: DF.Date + type: DF.Literal["", "Income", "Expense"] + # end: auto-generated types + def validate(self): if self.end_date < self.start_date: frappe.throw(_("End date cannot be before start date")) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py index eb8c16ee11a2..67a7f90042b9 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py @@ -9,6 +9,31 @@ class ProcessPaymentReconciliation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + bank_cash_account: DF.Link | None + company: DF.Link + cost_center: DF.Link | None + error_log: DF.LongText | None + from_invoice_date: DF.Date | None + from_payment_date: DF.Date | None + party: DF.DynamicLink + party_type: DF.Link + receivable_payable_account: DF.Link + status: DF.Literal[ + "", "Queued", "Running", "Paused", "Completed", "Partially Reconciled", "Failed", "Cancelled" + ] + to_invoice_date: DF.Date | None + to_payment_date: DF.Date | None + # end: auto-generated types + def validate(self): self.validate_receivable_payable_account() self.validate_bank_cash_account() diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.py b/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.py index 85d70a48327d..153fffcf77eb 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.py @@ -6,4 +6,28 @@ class ProcessPaymentReconciliationLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.process_payment_reconciliation_log_allocations.process_payment_reconciliation_log_allocations import ( + ProcessPaymentReconciliationLogAllocations, + ) + + allocated: DF.Check + allocations: DF.Table[ProcessPaymentReconciliationLogAllocations] + error_log: DF.LongText | None + process_pr: DF.Link + reconciled: DF.Check + reconciled_entries: DF.Int + status: DF.Literal[ + "Running", "Paused", "Reconciled", "Partially Reconciled", "Failed", "Cancelled" + ] + total_allocations: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py index c3e43297d080..da02e1a41e66 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py @@ -6,4 +6,31 @@ class ProcessPaymentReconciliationLogAllocations(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allocated_amount: DF.Currency + amount: DF.Currency + currency: DF.Link | None + difference_account: DF.Link | None + difference_amount: DF.Currency + exchange_rate: DF.Float + invoice_number: DF.DynamicLink + invoice_type: DF.Link + is_advance: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reconciled: DF.Check + reference_name: DF.DynamicLink + reference_row: DF.Data | None + reference_type: DF.Link + unreconciled_amount: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index 6c959ba2f05e..9ad25483e34f 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -23,6 +23,60 @@ class ProcessStatementOfAccounts(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.process_statement_of_accounts_customer.process_statement_of_accounts_customer import ( + ProcessStatementOfAccountsCustomer, + ) + from erpnext.accounts.doctype.psoa_cost_center.psoa_cost_center import PSOACostCenter + from erpnext.accounts.doctype.psoa_project.psoa_project import PSOAProject + + account: DF.Link | None + ageing_based_on: DF.Literal["Due Date", "Posting Date"] + based_on_payment_terms: DF.Check + body: DF.TextEditor | None + cc_to: DF.Link | None + collection_name: DF.DynamicLink | None + company: DF.Link + cost_center: DF.TableMultiSelect[PSOACostCenter] + currency: DF.Link | None + customer_collection: DF.Literal[ + "", "Customer Group", "Territory", "Sales Partner", "Sales Person" + ] + customers: DF.Table[ProcessStatementOfAccountsCustomer] + enable_auto_email: DF.Check + filter_duration: DF.Int + finance_book: DF.Link | None + frequency: DF.Literal["Weekly", "Monthly", "Quarterly"] + from_date: DF.Date | None + group_by: DF.Literal["", "Group by Voucher", "Group by Voucher (Consolidated)"] + include_ageing: DF.Check + include_break: DF.Check + letter_head: DF.Link | None + orientation: DF.Literal["Landscape", "Portrait"] + payment_terms_template: DF.Link | None + pdf_name: DF.Data | None + posting_date: DF.Date | None + primary_mandatory: DF.Check + project: DF.TableMultiSelect[PSOAProject] + report: DF.Literal["General Ledger", "Accounts Receivable"] + sales_partner: DF.Link | None + sales_person: DF.Link | None + sender: DF.Link | None + show_net_values_in_party_account: DF.Check + start_date: DF.Date | None + subject: DF.Data | None + terms_and_conditions: DF.Link | None + territory: DF.Link | None + to_date: DF.Date | None + # end: auto-generated types + def validate(self): if not self.subject: self.subject = "Statement Of Accounts for {{ customer.customer_name }}" diff --git a/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py b/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py index 94fcb78e3106..cac28777041b 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py @@ -7,4 +7,21 @@ class ProcessStatementOfAccountsCustomer(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + billing_email: DF.Data | None + customer: DF.Link + customer_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + primary_email: DF.ReadOnly | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/process_subscription/process_subscription.py b/erpnext/accounts/doctype/process_subscription/process_subscription.py index 0aa9970cb80e..b271e7c62290 100644 --- a/erpnext/accounts/doctype/process_subscription/process_subscription.py +++ b/erpnext/accounts/doctype/process_subscription/process_subscription.py @@ -12,6 +12,19 @@ class ProcessSubscription(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + posting_date: DF.Date + subscription: DF.Link | None + # end: auto-generated types + def on_submit(self): process_all(subscription=self.subscription, posting_date=self.posting_date) diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py index 4d28d1066045..0bb8d3a45786 100644 --- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py @@ -69,6 +69,73 @@ class TransactionExists(frappe.ValidationError): class PromotionalScheme(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.campaign_item.campaign_item import CampaignItem + from erpnext.accounts.doctype.customer_group_item.customer_group_item import CustomerGroupItem + from erpnext.accounts.doctype.customer_item.customer_item import CustomerItem + from erpnext.accounts.doctype.pricing_rule_brand.pricing_rule_brand import PricingRuleBrand + from erpnext.accounts.doctype.pricing_rule_item_code.pricing_rule_item_code import ( + PricingRuleItemCode, + ) + from erpnext.accounts.doctype.pricing_rule_item_group.pricing_rule_item_group import ( + PricingRuleItemGroup, + ) + from erpnext.accounts.doctype.promotional_scheme_price_discount.promotional_scheme_price_discount import ( + PromotionalSchemePriceDiscount, + ) + from erpnext.accounts.doctype.promotional_scheme_product_discount.promotional_scheme_product_discount import ( + PromotionalSchemeProductDiscount, + ) + from erpnext.accounts.doctype.sales_partner_item.sales_partner_item import SalesPartnerItem + from erpnext.accounts.doctype.supplier_group_item.supplier_group_item import SupplierGroupItem + from erpnext.accounts.doctype.supplier_item.supplier_item import SupplierItem + from erpnext.accounts.doctype.territory_item.territory_item import TerritoryItem + + applicable_for: DF.Literal[ + "", + "Customer", + "Customer Group", + "Territory", + "Sales Partner", + "Campaign", + "Supplier", + "Supplier Group", + ] + apply_on: DF.Literal["", "Item Code", "Item Group", "Brand", "Transaction"] + apply_rule_on_other: DF.Literal["", "Item Code", "Item Group", "Brand"] + brands: DF.Table[PricingRuleBrand] + buying: DF.Check + campaign: DF.TableMultiSelect[CampaignItem] + company: DF.Link + currency: DF.Link | None + customer: DF.TableMultiSelect[CustomerItem] + customer_group: DF.TableMultiSelect[CustomerGroupItem] + disable: DF.Check + is_cumulative: DF.Check + item_groups: DF.Table[PricingRuleItemGroup] + items: DF.Table[PricingRuleItemCode] + mixed_conditions: DF.Check + other_brand: DF.Link | None + other_item_code: DF.Link | None + other_item_group: DF.Link | None + price_discount_slabs: DF.Table[PromotionalSchemePriceDiscount] + product_discount_slabs: DF.Table[PromotionalSchemeProductDiscount] + sales_partner: DF.TableMultiSelect[SalesPartnerItem] + selling: DF.Check + supplier: DF.TableMultiSelect[SupplierItem] + supplier_group: DF.TableMultiSelect[SupplierGroupItem] + territory: DF.TableMultiSelect[TerritoryItem] + valid_from: DF.Date | None + valid_upto: DF.Date | None + # end: auto-generated types + def validate(self): if not self.selling and not self.buying: frappe.throw(_("Either 'Selling' or 'Buying' must be selected"), title=_("Mandatory")) diff --git a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py index a0e220004ee2..545c17dda890 100644 --- a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py +++ b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py @@ -6,4 +6,55 @@ class PromotionalSchemePriceDiscount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + apply_discount_on_rate: DF.Check + apply_multiple_pricing_rules: DF.Check + disable: DF.Check + discount_amount: DF.Currency + discount_percentage: DF.Float + max_amount: DF.Currency + max_qty: DF.Float + min_amount: DF.Currency + min_qty: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + priority: DF.Literal[ + "", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + ] + rate: DF.Currency + rate_or_discount: DF.Literal["", "Rate", "Discount Percentage", "Discount Amount"] + rule_description: DF.SmallText + threshold_percentage: DF.Percent + validate_applied_rule: DF.Check + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py index c9f6f863467f..7dd5fea373ef 100644 --- a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py +++ b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py @@ -6,4 +6,55 @@ class PromotionalSchemeProductDiscount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + apply_multiple_pricing_rules: DF.Check + disable: DF.Check + free_item: DF.Link | None + free_item_rate: DF.Currency + free_item_uom: DF.Link | None + free_qty: DF.Float + is_recursive: DF.Check + max_amount: DF.Currency + max_qty: DF.Float + min_amount: DF.Currency + min_qty: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + priority: DF.Literal[ + "", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + ] + rule_description: DF.SmallText + same_item: DF.Check + threshold_percentage: DF.Percent + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py b/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py index 877998a187c9..683cd78df04a 100644 --- a/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py +++ b/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py @@ -7,4 +7,18 @@ class PSOACostCenter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + cost_center_name: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/psoa_project/psoa_project.py b/erpnext/accounts/doctype/psoa_project/psoa_project.py index de22bb73047d..c2d80767bc2a 100644 --- a/erpnext/accounts/doctype/psoa_project/psoa_project.py +++ b/erpnext/accounts/doctype/psoa_project/psoa_project.py @@ -7,4 +7,18 @@ class PSOAProject(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project_name: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c6ae9377a0d7..f9c9fb5ac510 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -54,6 +54,174 @@ class WarehouseMissingError(frappe.ValidationError): class PurchaseInvoice(BuyingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.advance_tax.advance_tax import AdvanceTax + 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.purchase_invoice_advance.purchase_invoice_advance import ( + PurchaseInvoiceAdvance, + ) + from erpnext.accounts.doctype.purchase_invoice_item.purchase_invoice_item import ( + PurchaseInvoiceItem, + ) + from erpnext.accounts.doctype.purchase_taxes_and_charges.purchase_taxes_and_charges import ( + PurchaseTaxesandCharges, + ) + from erpnext.accounts.doctype.tax_withheld_vouchers.tax_withheld_vouchers import ( + TaxWithheldVouchers, + ) + from erpnext.buying.doctype.purchase_receipt_item_supplied.purchase_receipt_item_supplied import ( + PurchaseReceiptItemSupplied, + ) + + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + advance_tax: DF.Table[AdvanceTax] + advances: DF.Table[PurchaseInvoiceAdvance] + against_expense_account: DF.SmallText | None + allocate_advances_automatically: DF.Check + amended_from: DF.Link | None + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + apply_tds: DF.Check + auto_repeat: DF.Link | None + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_paid_amount: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_tax_withholding_net_total: DF.Currency + base_taxes_and_charges_added: DF.Currency + base_taxes_and_charges_deducted: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + base_write_off_amount: DF.Currency + bill_date: DF.Date | None + bill_no: DF.Data | None + billing_address: DF.Link | None + billing_address_display: DF.SmallText | None + buying_price_list: DF.Link | None + cash_bank_account: DF.Link | None + clearance_date: DF.Date | None + company: DF.Link | None + contact_display: DF.SmallText | None + contact_email: DF.SmallText | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + credit_to: DF.Link + currency: DF.Link | None + disable_rounded_total: DF.Check + discount_amount: DF.Currency + due_date: DF.Date | None + from_date: DF.Date | None + grand_total: DF.Currency + group_same_items: DF.Check + hold_comment: DF.SmallText | None + ignore_default_payment_terms_template: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + incoterm: DF.Link | None + inter_company_invoice_reference: DF.Link | None + is_internal_supplier: DF.Check + is_old_subcontracting_flow: DF.Check + is_opening: DF.Literal["No", "Yes"] + is_paid: DF.Check + is_return: DF.Check + is_subcontracted: DF.Check + items: DF.Table[PurchaseInvoiceItem] + language: DF.Data | None + letter_head: DF.Link | None + mode_of_payment: DF.Link | None + named_place: DF.Data | None + naming_series: DF.Literal["ACC-PINV-.YYYY.-", "ACC-PINV-RET-.YYYY.-"] + net_total: DF.Currency + on_hold: DF.Check + only_include_allocated_payments: DF.Check + other_charges_calculation: DF.LongText | None + outstanding_amount: DF.Currency + paid_amount: DF.Currency + party_account_currency: DF.Link | None + payment_schedule: DF.Table[PaymentSchedule] + payment_terms_template: DF.Link | None + per_received: DF.Percent + plc_conversion_rate: DF.Float + posting_date: DF.Date + posting_time: DF.Time | None + price_list_currency: DF.Link | None + pricing_rules: DF.Table[PricingRuleDetail] + project: DF.Link | None + rejected_warehouse: DF.Link | None + release_date: DF.Date | None + remarks: DF.SmallText | None + repost_required: DF.Check + represents_company: DF.Link | None + return_against: DF.Link | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + set_from_warehouse: DF.Link | None + set_posting_time: DF.Check + set_warehouse: DF.Link | None + shipping_address: DF.Link | None + shipping_address_display: DF.SmallText | None + shipping_rule: DF.Link | None + status: DF.Literal[ + "", + "Draft", + "Return", + "Debit Note Issued", + "Submitted", + "Paid", + "Partly Paid", + "Unpaid", + "Overdue", + "Cancelled", + "Internal Transfer", + ] + subscription: DF.Link | None + supplied_items: DF.Table[PurchaseReceiptItemSupplied] + supplier: DF.Link + supplier_address: DF.Link | None + supplier_name: DF.Data | None + supplier_warehouse: DF.Link | None + tax_category: DF.Link | None + tax_id: DF.ReadOnly | None + tax_withheld_vouchers: DF.Table[TaxWithheldVouchers] + tax_withholding_category: DF.Link | None + tax_withholding_net_total: DF.Currency + taxes: DF.Table[PurchaseTaxesandCharges] + taxes_and_charges: DF.Link | None + taxes_and_charges_added: DF.Currency + taxes_and_charges_deducted: DF.Currency + tc_name: DF.Link | None + terms: DF.TextEditor | None + title: DF.Data | None + to_date: DF.Date | None + total: DF.Currency + total_advance: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + unrealized_profit_loss_account: DF.Link | None + update_stock: DF.Check + use_company_roundoff_cost_center: DF.Check + use_transaction_date_exchange_rate: DF.Check + write_off_account: DF.Link | None + write_off_amount: DF.Currency + write_off_cost_center: DF.Link | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(PurchaseInvoice, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py index 44e1f6d5685d..bbd3009224a0 100644 --- a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py +++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py @@ -6,4 +6,25 @@ class PurchaseInvoiceAdvance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + advance_amount: DF.Currency + allocated_amount: DF.Currency + exchange_gain_loss: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + ref_exchange_rate: DF.Float + reference_name: DF.DynamicLink | None + reference_row: DF.Data | None + reference_type: DF.Link | None + remarks: DF.Text | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py index 0e3c723178b1..e48d22379a6b 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py @@ -6,4 +6,93 @@ class PurchaseInvoiceItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + apply_tds: DF.Check + asset_category: DF.Link | None + asset_location: DF.Link | None + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + batch_no: DF.Link | None + bom: DF.Link | None + brand: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + deferred_expense_account: DF.Link | None + description: DF.TextEditor | None + discount_amount: DF.Currency + discount_percentage: DF.Percent + enable_deferred_expense: DF.Check + expense_account: DF.Link | None + from_warehouse: DF.Link | None + image: DF.Attach | None + include_exploded_items: DF.Check + is_fixed_asset: DF.Check + is_free_item: DF.Check + item_code: DF.Link | None + item_group: DF.Link | None + item_name: DF.Data + item_tax_amount: DF.Currency + item_tax_rate: DF.Code | None + item_tax_template: DF.Link | None + landed_cost_voucher_amount: DF.Currency + manufacturer: DF.Link | None + manufacturer_part_no: DF.Data | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + net_amount: DF.Currency + net_rate: DF.Currency + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + po_detail: DF.Data | None + pr_detail: DF.Data | None + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + product_bundle: DF.Link | None + project: DF.Link | None + purchase_invoice_item: DF.Data | None + purchase_order: DF.Link | None + purchase_receipt: DF.Link | None + qty: DF.Float + quality_inspection: DF.Link | None + rate: DF.Currency + rate_with_margin: DF.Currency + received_qty: DF.Float + rejected_qty: DF.Float + rejected_serial_and_batch_bundle: DF.Link | None + rejected_serial_no: DF.Text | None + rejected_warehouse: DF.Link | None + rm_supp_cost: DF.Currency + sales_invoice_item: DF.Data | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.Text | None + service_end_date: DF.Date | None + service_start_date: DF.Date | None + service_stop_date: DF.Date | None + stock_qty: DF.Float + stock_uom: DF.Link | None + stock_uom_rate: DF.Currency + total_weight: DF.Float + uom: DF.Link + valuation_rate: DF.Currency + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + wip_composite_asset: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py index 262e7ebb5b6b..d6c029224470 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py @@ -6,4 +6,42 @@ class PurchaseTaxesandCharges(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_currency: DF.Link | None + account_head: DF.Link + add_deduct_tax: DF.Literal["Add", "Deduct"] + base_tax_amount: DF.Currency + base_tax_amount_after_discount_amount: DF.Currency + base_total: DF.Currency + category: DF.Literal["Valuation and Total", "Valuation", "Total"] + charge_type: DF.Literal[ + "", + "Actual", + "On Net Total", + "On Previous Row Amount", + "On Previous Row Total", + "On Item Quantity", + ] + cost_center: DF.Link | None + description: DF.SmallText + included_in_paid_amount: DF.Check + included_in_print_rate: DF.Check + item_wise_tax_detail: DF.Code | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Float + row_id: DF.Data | None + tax_amount: DF.Currency + tax_amount_after_discount_amount: DF.Currency + total: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py index 70d29bfda25f..16c30c52bdf6 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py @@ -11,6 +11,26 @@ class PurchaseTaxesandChargesTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.purchase_taxes_and_charges.purchase_taxes_and_charges import ( + PurchaseTaxesandCharges, + ) + + company: DF.Link + disabled: DF.Check + is_default: DF.Check + tax_category: DF.Link | None + taxes: DF.Table[PurchaseTaxesandCharges] + title: DF.Data + # end: auto-generated types + def validate(self): valdiate_taxes_and_charges_template(self) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 1d72a46c12f4..8c23c67c20bc 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -8,6 +8,24 @@ class RepostAccountingLedger(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.repost_accounting_ledger_items.repost_accounting_ledger_items import ( + RepostAccountingLedgerItems, + ) + + amended_from: DF.Link | None + company: DF.Link | None + delete_cancelled_entries: DF.Check + vouchers: DF.Table[RepostAccountingLedgerItems] + # end: auto-generated types + def __init__(self, *args, **kwargs): super(RepostAccountingLedger, self).__init__(*args, **kwargs) self._allowed_types = get_allowed_types_from_settings() diff --git a/erpnext/accounts/doctype/repost_accounting_ledger_items/repost_accounting_ledger_items.py b/erpnext/accounts/doctype/repost_accounting_ledger_items/repost_accounting_ledger_items.py index 9221f447355c..6e02e3a6b98d 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger_items/repost_accounting_ledger_items.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger_items/repost_accounting_ledger_items.py @@ -6,4 +6,19 @@ class RepostAccountingLedgerItems(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/repost_accounting_ledger_settings/repost_accounting_ledger_settings.py b/erpnext/accounts/doctype/repost_accounting_ledger_settings/repost_accounting_ledger_settings.py index 2b8230df86f8..14a070dc464a 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger_settings/repost_accounting_ledger_settings.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger_settings/repost_accounting_ledger_settings.py @@ -6,4 +6,17 @@ class RepostAccountingLedgerSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.repost_allowed_types.repost_allowed_types import RepostAllowedTypes + + allowed_types: DF.Table[RepostAllowedTypes] + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/repost_allowed_types/repost_allowed_types.py b/erpnext/accounts/doctype/repost_allowed_types/repost_allowed_types.py index 0e4883b0c93d..8226a910171a 100644 --- a/erpnext/accounts/doctype/repost_allowed_types/repost_allowed_types.py +++ b/erpnext/accounts/doctype/repost_allowed_types/repost_allowed_types.py @@ -6,4 +6,19 @@ class RepostAllowedTypes(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allowed: DF.Check + document_type: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/repost_payment_ledger/repost_payment_ledger.py b/erpnext/accounts/doctype/repost_payment_ledger/repost_payment_ledger.py index 209cad4f9059..38bc1a6fb823 100644 --- a/erpnext/accounts/doctype/repost_payment_ledger/repost_payment_ledger.py +++ b/erpnext/accounts/doctype/repost_payment_ledger/repost_payment_ledger.py @@ -52,6 +52,28 @@ def start_payment_ledger_repost(docname=None): class RepostPaymentLedger(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.repost_payment_ledger_items.repost_payment_ledger_items import ( + RepostPaymentLedgerItems, + ) + + add_manually: DF.Check + amended_from: DF.Link | None + company: DF.Link + posting_date: DF.Date + repost_error_log: DF.LongText | None + repost_status: DF.Literal["", "Queued", "Failed", "Completed"] + repost_vouchers: DF.Table[RepostPaymentLedgerItems] + voucher_type: DF.Link | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(RepostPaymentLedger, self).__init__(*args, **kwargs) self.vouchers = [] diff --git a/erpnext/accounts/doctype/repost_payment_ledger_items/repost_payment_ledger_items.py b/erpnext/accounts/doctype/repost_payment_ledger_items/repost_payment_ledger_items.py index fb19e84f2682..5f935183e74d 100644 --- a/erpnext/accounts/doctype/repost_payment_ledger_items/repost_payment_ledger_items.py +++ b/erpnext/accounts/doctype/repost_payment_ledger_items/repost_payment_ledger_items.py @@ -6,4 +6,19 @@ class RepostPaymentLedgerItems(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 85cb3679c710..0ebf33564fdf 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -45,6 +45,189 @@ class SalesInvoice(SellingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + 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.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_payment.sales_invoice_payment import ( + SalesInvoicePayment, + ) + from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import ( + SalesInvoiceTimesheet, + ) + from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import ( + SalesTaxesandCharges, + ) + from erpnext.selling.doctype.sales_team.sales_team import SalesTeam + from erpnext.stock.doctype.packed_item.packed_item import PackedItem + + account_for_change_amount: DF.Link | None + additional_discount_account: DF.Link | None + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + advances: DF.Table[SalesInvoiceAdvance] + against_income_account: DF.SmallText | None + allocate_advances_automatically: DF.Check + amended_from: DF.Link | None + amount_eligible_for_commission: DF.Currency + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + auto_repeat: DF.Link | None + base_change_amount: DF.Currency + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.SmallText | None + base_net_total: DF.Currency + base_paid_amount: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + base_write_off_amount: DF.Currency + campaign: DF.Link | None + cash_bank_account: DF.Link | None + change_amount: DF.Currency + commission_rate: DF.Float + company: DF.Link + company_address: DF.Link | None + company_address_display: DF.SmallText | None + company_tax_id: DF.Data | None + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + currency: DF.Link + customer: DF.Link | None + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.SmallText | None + debit_to: DF.Link + disable_rounded_total: DF.Check + discount_amount: DF.Currency + dispatch_address: DF.SmallText | None + dispatch_address_name: DF.Link | None + due_date: DF.Date | None + from_date: DF.Date | None + grand_total: DF.Currency + group_same_items: DF.Check + ignore_default_payment_terms_template: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.SmallText | None + incoterm: DF.Link | None + inter_company_invoice_reference: DF.Link | None + is_cash_or_non_trade_discount: DF.Check + is_consolidated: DF.Check + is_debit_note: DF.Check + is_discounted: DF.Check + is_internal_customer: DF.Check + is_opening: DF.Literal["No", "Yes"] + is_pos: DF.Check + is_return: DF.Check + items: DF.Table[SalesInvoiceItem] + language: DF.Data | None + letter_head: DF.Link | None + loyalty_amount: DF.Currency + loyalty_points: DF.Int + loyalty_program: DF.Link | None + loyalty_redemption_account: DF.Link | None + loyalty_redemption_cost_center: DF.Link | None + named_place: DF.Data | None + naming_series: DF.Literal["ACC-SINV-.YYYY.-", "ACC-SINV-RET-.YYYY.-"] + net_total: DF.Currency + only_include_allocated_payments: DF.Check + other_charges_calculation: DF.LongText | None + outstanding_amount: DF.Currency + packed_items: DF.Table[PackedItem] + paid_amount: DF.Currency + party_account_currency: DF.Link | None + payment_schedule: DF.Table[PaymentSchedule] + payment_terms_template: DF.Link | None + payments: DF.Table[SalesInvoicePayment] + plc_conversion_rate: DF.Float + po_date: DF.Date | None + po_no: DF.Data | None + pos_profile: DF.Link | None + posting_date: DF.Date + posting_time: DF.Time | None + price_list_currency: DF.Link + pricing_rules: DF.Table[PricingRuleDetail] + project: DF.Link | None + redeem_loyalty_points: DF.Check + remarks: DF.SmallText | None + repost_required: DF.Check + represents_company: DF.Link | None + return_against: DF.Link | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + sales_partner: DF.Link | None + sales_team: DF.Table[SalesTeam] + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + selling_price_list: DF.Link + set_posting_time: DF.Check + set_target_warehouse: DF.Link | None + set_warehouse: DF.Link | None + shipping_address: DF.SmallText | None + shipping_address_name: DF.Link | None + shipping_rule: DF.Link | None + source: 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", + ] + subscription: DF.Link | None + tax_category: DF.Link | None + tax_id: DF.Data | None + taxes: DF.Table[SalesTaxesandCharges] + taxes_and_charges: DF.Link | None + tc_name: DF.Link | None + terms: DF.TextEditor | None + territory: DF.Link | None + timesheets: DF.Table[SalesInvoiceTimesheet] + title: DF.Data | None + to_date: DF.Date | None + total: DF.Currency + total_advance: DF.Currency + total_billing_amount: DF.Currency + total_billing_hours: DF.Float + total_commission: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + unrealized_profit_loss_account: DF.Link | None + update_billed_amount_in_delivery_note: DF.Check + update_billed_amount_in_sales_order: DF.Check + update_stock: DF.Check + use_company_roundoff_cost_center: DF.Check + write_off_account: DF.Link | None + write_off_amount: DF.Currency + write_off_cost_center: DF.Link | None + write_off_outstanding_amount_automatically: DF.Check + # end: auto-generated types + def __init__(self, *args, **kwargs): super(SalesInvoice, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py index 6d4bd4633c35..5eeedb25f29a 100644 --- a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py +++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py @@ -6,4 +6,25 @@ class SalesInvoiceAdvance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + advance_amount: DF.Currency + allocated_amount: DF.Currency + exchange_gain_loss: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + ref_exchange_rate: DF.Float + reference_name: DF.DynamicLink | None + reference_row: DF.Data | None + reference_type: DF.Link | None + remarks: DF.Text | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index ebeaf8b5ef82..80f67748f40b 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -6,4 +6,89 @@ class SalesInvoiceItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_batch_qty: DF.Float + actual_qty: DF.Float + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + asset: DF.Link | None + barcode: DF.Data | None + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + batch_no: DF.Link | None + brand: DF.Data | None + conversion_factor: DF.Float + cost_center: DF.Link + customer_item_code: DF.Data | None + deferred_revenue_account: DF.Link | None + delivered_by_supplier: DF.Check + delivered_qty: DF.Float + delivery_note: DF.Link | None + description: DF.TextEditor | None + discount_account: DF.Link | None + discount_amount: DF.Currency + discount_percentage: DF.Percent + dn_detail: DF.Data | None + enable_deferred_revenue: DF.Check + expense_account: DF.Link | None + finance_book: DF.Link | None + grant_commission: DF.Check + has_item_scanned: DF.Check + image: DF.Attach | None + income_account: DF.Link + incoming_rate: DF.Currency + is_fixed_asset: DF.Check + is_free_item: DF.Check + item_code: DF.Link | None + item_group: DF.Link | None + item_name: DF.Data + item_tax_rate: DF.SmallText | None + item_tax_template: DF.Link | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + net_amount: DF.Currency + net_rate: DF.Currency + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + project: DF.Link | None + purchase_order: DF.Link | None + purchase_order_item: DF.Data | None + qty: DF.Float + quality_inspection: DF.Link | None + rate: DF.Currency + rate_with_margin: DF.Currency + sales_invoice_item: DF.Data | None + sales_order: DF.Link | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + service_end_date: DF.Date | None + service_start_date: DF.Date | None + service_stop_date: DF.Date | None + so_detail: DF.Data | None + stock_qty: DF.Float + stock_uom: DF.Link | None + stock_uom_rate: DF.Currency + target_warehouse: DF.Link | None + total_weight: DF.Float + uom: DF.Link + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py index d9b1dbe346ab..57d014240631 100644 --- a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py +++ b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py @@ -6,4 +6,24 @@ class SalesInvoicePayment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + amount: DF.Currency + base_amount: DF.Currency + clearance_date: DF.Date | None + default: DF.Check + mode_of_payment: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + type: DF.ReadOnly | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py index e50b1c28614a..108241df316b 100644 --- a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py +++ b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py @@ -6,4 +6,26 @@ class SalesInvoiceTimesheet(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + activity_type: DF.Link | None + billing_amount: DF.Currency + billing_hours: DF.Float + description: DF.SmallText | None + from_time: DF.Datetime | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project_name: DF.Data | None + time_sheet: DF.Link | None + timesheet_detail: DF.Data | None + to_time: DF.Datetime | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/sales_partner_item/sales_partner_item.py b/erpnext/accounts/doctype/sales_partner_item/sales_partner_item.py index 97489d155fc8..c6715dca3431 100644 --- a/erpnext/accounts/doctype/sales_partner_item/sales_partner_item.py +++ b/erpnext/accounts/doctype/sales_partner_item/sales_partner_item.py @@ -6,4 +6,18 @@ class SalesPartnerItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + sales_partner: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py index d412c1b73091..7936178fda80 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py @@ -6,4 +6,41 @@ class SalesTaxesandCharges(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_currency: DF.Link | None + account_head: DF.Link + base_tax_amount: DF.Currency + base_tax_amount_after_discount_amount: DF.Currency + base_total: DF.Currency + charge_type: DF.Literal[ + "", + "Actual", + "On Net Total", + "On Previous Row Amount", + "On Previous Row Total", + "On Item Quantity", + ] + cost_center: DF.Link | None + description: DF.SmallText + dont_recompute_tax: DF.Check + included_in_paid_amount: DF.Check + included_in_print_rate: DF.Check + item_wise_tax_detail: DF.Code | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Float + row_id: DF.Data | None + tax_amount: DF.Currency + tax_amount_after_discount_amount: DF.Currency + total: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py index a3a5d627b7a1..ce3eda9bcfcc 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py @@ -16,6 +16,26 @@ class SalesTaxesandChargesTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import ( + SalesTaxesandCharges, + ) + + company: DF.Link + disabled: DF.Check + is_default: DF.Check + tax_category: DF.Link | None + taxes: DF.Table[SalesTaxesandCharges] + title: DF.Data + # end: auto-generated types + def validate(self): valdiate_taxes_and_charges_template(self) diff --git a/erpnext/accounts/doctype/share_balance/share_balance.py b/erpnext/accounts/doctype/share_balance/share_balance.py index 4c9ec439eed6..7a77ce9b871e 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.py +++ b/erpnext/accounts/doctype/share_balance/share_balance.py @@ -6,4 +6,25 @@ class ShareBalance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Int + current_state: DF.Literal["", "Issued", "Purchased"] + from_no: DF.Int + is_company: DF.Check + no_of_shares: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Int + share_type: DF.Link + to_no: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/share_transfer/share_transfer.py b/erpnext/accounts/doctype/share_transfer/share_transfer.py index 4f49843c1eb2..6a3ff7c394e7 100644 --- a/erpnext/accounts/doctype/share_transfer/share_transfer.py +++ b/erpnext/accounts/doctype/share_transfer/share_transfer.py @@ -15,6 +15,33 @@ class ShareDontExists(ValidationError): class ShareTransfer(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + amount: DF.Currency + asset_account: DF.Link | None + company: DF.Link + date: DF.Date + equity_or_liability_account: DF.Link + from_folio_no: DF.Data | None + from_no: DF.Int + from_shareholder: DF.Link | None + no_of_shares: DF.Int + rate: DF.Currency + remarks: DF.LongText | None + share_type: DF.Link + to_folio_no: DF.Data | None + to_no: DF.Int + to_shareholder: DF.Link | None + transfer_type: DF.Literal["", "Issue", "Purchase", "Transfer"] + # end: auto-generated types + def on_submit(self): if self.transfer_type == "Issue": shareholder = self.get_company_shareholder() diff --git a/erpnext/accounts/doctype/share_type/share_type.py b/erpnext/accounts/doctype/share_type/share_type.py index 80365aa2f211..df8cbaf76b38 100644 --- a/erpnext/accounts/doctype/share_type/share_type.py +++ b/erpnext/accounts/doctype/share_type/share_type.py @@ -6,4 +6,16 @@ class ShareType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.LongText | None + title: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/shareholder/shareholder.py b/erpnext/accounts/doctype/shareholder/shareholder.py index b0e2493f7a6a..6542f93b60af 100644 --- a/erpnext/accounts/doctype/shareholder/shareholder.py +++ b/erpnext/accounts/doctype/shareholder/shareholder.py @@ -10,6 +10,25 @@ class Shareholder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.share_balance.share_balance import ShareBalance + + company: DF.Link + contact_list: DF.Code | None + folio_no: DF.Data | None + is_company: DF.Check + naming_series: DF.Literal["ACC-SH-.YYYY.-"] + share_balance: DF.Table[ShareBalance] + title: DF.Data + # end: auto-generated types + def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self) diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule.py b/erpnext/accounts/doctype/shipping_rule/shipping_rule.py index 1d79503a05ef..52a60ac7aa87 100644 --- a/erpnext/accounts/doctype/shipping_rule/shipping_rule.py +++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule.py @@ -25,6 +25,33 @@ class ManyBlankToValuesError(frappe.ValidationError): class ShippingRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.shipping_rule_condition.shipping_rule_condition import ( + ShippingRuleCondition, + ) + from erpnext.accounts.doctype.shipping_rule_country.shipping_rule_country import ( + ShippingRuleCountry, + ) + + account: DF.Link + calculate_based_on: DF.Literal["Fixed", "Net Total", "Net Weight"] + company: DF.Link + conditions: DF.Table[ShippingRuleCondition] + cost_center: DF.Link + countries: DF.Table[ShippingRuleCountry] + disabled: DF.Check + label: DF.Data + shipping_amount: DF.Currency + shipping_rule_type: DF.Literal["Selling", "Buying"] + # end: auto-generated types + def validate(self): self.validate_from_to_values() self.sort_shipping_rule_conditions() diff --git a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py index 07f98deb23eb..4370477cc16b 100644 --- a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py +++ b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py @@ -8,4 +8,20 @@ class ShippingRuleCondition(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from_value: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + shipping_amount: DF.Currency + to_value: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py index 90123c1616e6..ff06e8f795f9 100644 --- a/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py +++ b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py @@ -6,4 +6,18 @@ class ShippingRuleCountry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + country: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/south_africa_vat_account/south_africa_vat_account.py b/erpnext/accounts/doctype/south_africa_vat_account/south_africa_vat_account.py index d9a3bcc0df4f..516038a7f7ac 100644 --- a/erpnext/accounts/doctype/south_africa_vat_account/south_africa_vat_account.py +++ b/erpnext/accounts/doctype/south_africa_vat_account/south_africa_vat_account.py @@ -6,4 +6,18 @@ class SouthAfricaVATAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index a3d8c234180d..6cc2d1e9ee97 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -40,6 +40,51 @@ class InvoiceNotCancelled(frappe.ValidationError): class Subscription(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.subscription_plan_detail.subscription_plan_detail import ( + SubscriptionPlanDetail, + ) + + additional_discount_amount: DF.Currency + additional_discount_percentage: DF.Percent + apply_additional_discount: DF.Literal["", "Grand Total", "Net Total"] + cancel_at_period_end: DF.Check + cancelation_date: DF.Date | None + company: DF.Link | None + cost_center: DF.Link | None + current_invoice_end: DF.Date | None + current_invoice_start: DF.Date | None + days_until_due: DF.Int + end_date: DF.Date | None + follow_calendar_months: DF.Check + generate_invoice_at: DF.Literal[ + "End of the current subscription period", + "Beginning of the current subscription period", + "Days before the current subscription period", + ] + generate_new_invoices_past_due_date: DF.Check + number_of_days: DF.Int + party: DF.DynamicLink + party_type: DF.Link + plans: DF.Table[SubscriptionPlanDetail] + purchase_tax_template: DF.Link | None + sales_tax_template: DF.Link | None + start_date: DF.Date | None + status: DF.Literal[ + "", "Trialling", "Active", "Past Due Date", "Cancelled", "Unpaid", "Completed" + ] + submit_invoice: DF.Check + trial_period_end: DF.Date | None + trial_period_start: DF.Date | None + # end: auto-generated types + def before_insert(self): # update start just before the subscription doc is created self.update_subscription_period(self.start_date) diff --git a/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py b/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py index 41f7f9f6f3e1..ecef5e78ce4f 100644 --- a/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py +++ b/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py @@ -6,4 +6,19 @@ class SubscriptionInvoice(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_type: DF.Link | None + invoice: DF.DynamicLink | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py index f6e5c56cceb9..118d25478082 100644 --- a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py +++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py @@ -12,6 +12,27 @@ class SubscriptionPlan(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + billing_interval: DF.Literal["Day", "Week", "Month", "Year"] + billing_interval_count: DF.Int + cost: DF.Currency + cost_center: DF.Link | None + currency: DF.Link | None + item: DF.Link + payment_gateway: DF.Link | None + plan_name: DF.Data + price_determination: DF.Literal["", "Fixed Rate", "Based On Price List", "Monthly Rate"] + price_list: DF.Link | None + product_price_id: DF.Data | None + # end: auto-generated types + def validate(self): self.validate_interval_count() diff --git a/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py b/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py index d22a73f25d7d..91f3319d38b3 100644 --- a/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py +++ b/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py @@ -6,4 +6,19 @@ class SubscriptionPlanDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + plan: DF.Link + qty: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/subscription_settings/subscription_settings.py b/erpnext/accounts/doctype/subscription_settings/subscription_settings.py index 12580db1ede1..abc698e17daa 100644 --- a/erpnext/accounts/doctype/subscription_settings/subscription_settings.py +++ b/erpnext/accounts/doctype/subscription_settings/subscription_settings.py @@ -6,4 +6,17 @@ class SubscriptionSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + cancel_after_grace: DF.Check + grace_period: DF.Int + prorate: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/supplier_group_item/supplier_group_item.py b/erpnext/accounts/doctype/supplier_group_item/supplier_group_item.py index 61c16fe0ff19..bcad816fb507 100644 --- a/erpnext/accounts/doctype/supplier_group_item/supplier_group_item.py +++ b/erpnext/accounts/doctype/supplier_group_item/supplier_group_item.py @@ -6,4 +6,18 @@ class SupplierGroupItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + supplier_group: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/supplier_item/supplier_item.py b/erpnext/accounts/doctype/supplier_item/supplier_item.py index 2105b1d33275..c90a53aefe99 100644 --- a/erpnext/accounts/doctype/supplier_item/supplier_item.py +++ b/erpnext/accounts/doctype/supplier_item/supplier_item.py @@ -6,4 +6,18 @@ class SupplierItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + supplier: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/tax_category/tax_category.py b/erpnext/accounts/doctype/tax_category/tax_category.py index 18cf72ad59f6..bfb1f16723d7 100644 --- a/erpnext/accounts/doctype/tax_category/tax_category.py +++ b/erpnext/accounts/doctype/tax_category/tax_category.py @@ -6,4 +6,16 @@ class TaxCategory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + disabled: DF.Check + title: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index ac0dd5123ace..9ff530bfaf3e 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -27,6 +27,41 @@ class ConflictingTaxRule(frappe.ValidationError): class TaxRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + billing_city: DF.Data | None + billing_country: DF.Link | None + billing_county: DF.Data | None + billing_state: DF.Data | None + billing_zipcode: DF.Data | None + company: DF.Link | None + customer: DF.Link | None + customer_group: DF.Link | None + from_date: DF.Date | None + item: DF.Link | None + item_group: DF.Link | None + priority: DF.Int + purchase_tax_template: DF.Link | None + sales_tax_template: DF.Link | None + shipping_city: DF.Data | None + shipping_country: DF.Link | None + shipping_county: DF.Data | None + shipping_state: DF.Data | None + shipping_zipcode: DF.Data | None + supplier: DF.Link | None + supplier_group: DF.Link | None + tax_category: DF.Link | None + tax_type: DF.Literal["Sales", "Purchase"] + to_date: DF.Date | None + use_for_shopping_cart: DF.Check + # end: auto-generated types + def __setup__(self): self.flags.ignore_these_exceptions_in_test = [ConflictingTaxRule] diff --git a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py index ea54c5403a8b..bc2003e2beaf 100644 --- a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py +++ b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py @@ -6,4 +6,20 @@ class TaxWithheldVouchers(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + taxable_amount: DF.Currency + voucher_name: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py b/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py index c8d9d45ec755..f22ecba7e601 100644 --- a/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py +++ b/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py @@ -6,4 +6,19 @@ class TaxWithholdingAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link + company: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index de2f9e7e0dc2..c39a9db98008 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -11,6 +11,27 @@ class TaxWithholdingCategory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.tax_withholding_account.tax_withholding_account import ( + TaxWithholdingAccount, + ) + from erpnext.accounts.doctype.tax_withholding_rate.tax_withholding_rate import TaxWithholdingRate + + accounts: DF.Table[TaxWithholdingAccount] + category_name: DF.Data | None + consider_party_ledger_amount: DF.Check + rates: DF.Table[TaxWithholdingRate] + round_off_tax_amount: DF.Check + tax_on_excess_amount: DF.Check + # end: auto-generated types + def validate(self): self.validate_dates() self.validate_accounts() diff --git a/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py b/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py index 16cbccc8bea4..35d4e63ecca8 100644 --- a/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py +++ b/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py @@ -6,4 +6,22 @@ class TaxWithholdingRate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + cumulative_threshold: DF.Float + from_date: DF.Date + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + single_threshold: DF.Float + tax_withholding_rate: DF.Float + to_date: DF.Date + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/territory_item/territory_item.py b/erpnext/accounts/doctype/territory_item/territory_item.py index bcc02be2dd33..cadcbcf16e34 100644 --- a/erpnext/accounts/doctype/territory_item/territory_item.py +++ b/erpnext/accounts/doctype/territory_item/territory_item.py @@ -6,4 +6,18 @@ class TerritoryItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + territory: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py index 77906a783323..e258a73d4dc2 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py @@ -16,6 +16,25 @@ class UnreconcilePayment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.unreconcile_payment_entries.unreconcile_payment_entries import ( + UnreconcilePaymentEntries, + ) + + allocations: DF.Table[UnreconcilePaymentEntries] + amended_from: DF.Link | None + company: DF.Link | None + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + def validate(self): self.supported_types = ["Payment Entry", "Journal Entry"] if not self.voucher_type in self.supported_types: diff --git a/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.py b/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.py index c41545c2685b..7c097b5eb02e 100644 --- a/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.py +++ b/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.py @@ -6,4 +6,25 @@ class UnreconcilePaymentEntries(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Data | None + account_currency: DF.Link | None + allocated_amount: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + party: DF.Data | None + party_type: DF.Data | None + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + unlinked: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index d1f03f20462d..5fb2d3617886 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -40,6 +40,81 @@ class Asset(AccountsController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.asset_finance_book.asset_finance_book import AssetFinanceBook + + amended_from: DF.Link | None + asset_category: DF.Link | None + asset_name: DF.Data + asset_owner: DF.Literal["", "Company", "Supplier", "Customer"] + asset_owner_company: DF.Link | None + asset_quantity: DF.Int + available_for_use_date: DF.Date + booked_fixed_asset: DF.Check + calculate_depreciation: DF.Check + capitalized_in: DF.Link | None + company: DF.Link + comprehensive_insurance: DF.Data | None + cost_center: DF.Link | None + custodian: DF.Link | None + customer: DF.Link | None + default_finance_book: DF.Link | None + department: DF.Link | None + depr_entry_posting_status: DF.Literal["", "Successful", "Failed"] + depreciation_method: DF.Literal["", "Straight Line", "Double Declining Balance", "Manual"] + disposal_date: DF.Date | None + finance_books: DF.Table[AssetFinanceBook] + frequency_of_depreciation: DF.Int + gross_purchase_amount: DF.Currency + image: DF.AttachImage | None + insurance_end_date: DF.Date | None + insurance_start_date: DF.Date | None + insured_value: DF.Data | None + insurer: DF.Data | None + is_composite_asset: DF.Check + is_existing_asset: DF.Check + is_fully_depreciated: DF.Check + item_code: DF.Link + item_name: DF.ReadOnly | None + journal_entry_for_scrap: DF.Link | None + location: DF.Link + maintenance_required: DF.Check + naming_series: DF.Literal["ACC-ASS-.YYYY.-"] + next_depreciation_date: DF.Date | None + number_of_depreciations_booked: DF.Int + opening_accumulated_depreciation: DF.Currency + policy_number: DF.Data | None + purchase_date: DF.Date + purchase_invoice: DF.Link | None + purchase_receipt: DF.Link | None + purchase_receipt_amount: DF.Currency + split_from: DF.Link | None + status: DF.Literal[ + "Draft", + "Submitted", + "Partially Depreciated", + "Fully Depreciated", + "Sold", + "Scrapped", + "In Maintenance", + "Out of Order", + "Issue", + "Receipt", + "Capitalized", + "Decapitalized", + ] + supplier: DF.Link | None + total_number_of_depreciations: DF.Int + value_after_depreciation: DF.Currency + # end: auto-generated types + def validate(self): self.validate_asset_values() self.validate_asset_and_reference() diff --git a/erpnext/assets/doctype/asset_activity/asset_activity.py b/erpnext/assets/doctype/asset_activity/asset_activity.py index 28e1b3e32a55..a64cb1aba3de 100644 --- a/erpnext/assets/doctype/asset_activity/asset_activity.py +++ b/erpnext/assets/doctype/asset_activity/asset_activity.py @@ -6,6 +6,20 @@ class AssetActivity(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + asset: DF.Link + date: DF.Datetime + subject: DF.SmallText + user: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py index 728764be7247..66997ca59cc0 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py @@ -49,6 +49,61 @@ class AssetCapitalization(StockController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.asset_capitalization_asset_item.asset_capitalization_asset_item import ( + AssetCapitalizationAssetItem, + ) + from erpnext.assets.doctype.asset_capitalization_service_item.asset_capitalization_service_item import ( + AssetCapitalizationServiceItem, + ) + from erpnext.assets.doctype.asset_capitalization_stock_item.asset_capitalization_stock_item import ( + AssetCapitalizationStockItem, + ) + + amended_from: DF.Link | None + asset_items: DF.Table[AssetCapitalizationAssetItem] + asset_items_total: DF.Currency + capitalization_method: DF.Literal[ + "", "Create a new composite asset", "Choose a WIP composite asset" + ] + company: DF.Link + cost_center: DF.Link | None + entry_type: DF.Literal["Capitalization", "Decapitalization"] + finance_book: DF.Link | None + naming_series: DF.Literal["ACC-ASC-.YYYY.-"] + posting_date: DF.Date + posting_time: DF.Time + service_items: DF.Table[AssetCapitalizationServiceItem] + service_items_total: DF.Currency + set_posting_time: DF.Check + stock_items: DF.Table[AssetCapitalizationStockItem] + stock_items_total: DF.Currency + target_asset: DF.Link | None + target_asset_location: DF.Link | None + target_asset_name: DF.Data | None + target_batch_no: DF.Link | None + target_fixed_asset_account: DF.Link | None + target_has_batch_no: DF.Check + target_has_serial_no: DF.Check + target_incoming_rate: DF.Currency + target_is_fixed_asset: DF.Check + target_item_code: DF.Link | None + target_item_name: DF.Data | None + target_qty: DF.Float + target_serial_no: DF.SmallText | None + target_stock_uom: DF.Link | None + target_warehouse: DF.Link | None + title: DF.Data | None + total_value: DF.Currency + # end: auto-generated types + def validate(self): self.validate_posting_time() self.set_missing_values(for_validate=True) diff --git a/erpnext/assets/doctype/asset_capitalization_asset_item/asset_capitalization_asset_item.py b/erpnext/assets/doctype/asset_capitalization_asset_item/asset_capitalization_asset_item.py index ba356d6b9f01..003973f94d4a 100644 --- a/erpnext/assets/doctype/asset_capitalization_asset_item/asset_capitalization_asset_item.py +++ b/erpnext/assets/doctype/asset_capitalization_asset_item/asset_capitalization_asset_item.py @@ -6,4 +6,26 @@ class AssetCapitalizationAssetItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + asset: DF.Link + asset_name: DF.Data | None + asset_value: DF.Currency + cost_center: DF.Link | None + current_asset_value: DF.Currency + finance_book: DF.Link | None + fixed_asset_account: DF.Link | None + item_code: DF.Link + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_capitalization_service_item/asset_capitalization_service_item.py b/erpnext/assets/doctype/asset_capitalization_service_item/asset_capitalization_service_item.py index 28d018ee39a5..93457f87853a 100644 --- a/erpnext/assets/doctype/asset_capitalization_service_item/asset_capitalization_service_item.py +++ b/erpnext/assets/doctype/asset_capitalization_service_item/asset_capitalization_service_item.py @@ -6,4 +6,25 @@ class AssetCapitalizationServiceItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + cost_center: DF.Link | None + expense_account: DF.Link + item_code: DF.Link | None + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + rate: DF.Currency + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py b/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py index 5d6f98d5cf0f..122cbb600d64 100644 --- a/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py +++ b/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py @@ -6,4 +6,29 @@ class AssetCapitalizationStockItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + amount: DF.Currency + batch_no: DF.Link | None + cost_center: DF.Link | None + item_code: DF.Link + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + stock_qty: DF.Float + stock_uom: DF.Link + valuation_rate: DF.Currency + warehouse: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_category/asset_category.py b/erpnext/assets/doctype/asset_category/asset_category.py index 8d351412ca81..034ec555dcd8 100644 --- a/erpnext/assets/doctype/asset_category/asset_category.py +++ b/erpnext/assets/doctype/asset_category/asset_category.py @@ -9,6 +9,25 @@ class AssetCategory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.asset_category_account.asset_category_account import ( + AssetCategoryAccount, + ) + from erpnext.assets.doctype.asset_finance_book.asset_finance_book import AssetFinanceBook + + accounts: DF.Table[AssetCategoryAccount] + asset_category_name: DF.Data + enable_cwip_accounting: DF.Check + finance_books: DF.Table[AssetFinanceBook] + # end: auto-generated types + def validate(self): self.validate_finance_books() self.validate_account_types() diff --git a/erpnext/assets/doctype/asset_category_account/asset_category_account.py b/erpnext/assets/doctype/asset_category_account/asset_category_account.py index e06d2335678a..2798f1cd6b58 100644 --- a/erpnext/assets/doctype/asset_category_account/asset_category_account.py +++ b/erpnext/assets/doctype/asset_category_account/asset_category_account.py @@ -6,4 +6,22 @@ class AssetCategoryAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + accumulated_depreciation_account: DF.Link | None + capital_work_in_progress_account: DF.Link | None + company_name: DF.Link + depreciation_expense_account: DF.Link | None + fixed_asset_account: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index 6e390ce6f81d..0021140282e9 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -21,6 +21,40 @@ class AssetDepreciationSchedule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.depreciation_schedule.depreciation_schedule import ( + DepreciationSchedule, + ) + + amended_from: DF.Link | None + asset: DF.Link + daily_prorata_based: DF.Check + depreciation_method: DF.Literal[ + "", "Straight Line", "Double Declining Balance", "Written Down Value", "Manual" + ] + depreciation_schedule: DF.Table[DepreciationSchedule] + expected_value_after_useful_life: DF.Currency + finance_book: DF.Link | None + finance_book_id: DF.Int + frequency_of_depreciation: DF.Int + gross_purchase_amount: DF.Currency + naming_series: DF.Literal["ACC-ADS-.YYYY.-"] + notes: DF.SmallText | None + number_of_depreciations_booked: DF.Int + opening_accumulated_depreciation: DF.Currency + rate_of_depreciation: DF.Percent + shift_based: DF.Check + status: DF.Literal["Draft", "Active", "Cancelled"] + total_number_of_depreciations: DF.Int + # end: auto-generated types + def before_save(self): if not self.finance_book_id: self.prepare_draft_asset_depr_schedule_data_from_asset_name_and_fb_name( diff --git a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py index 292ca138fd9e..f812a0816dd4 100644 --- a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py +++ b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py @@ -6,4 +6,30 @@ class AssetFinanceBook(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + daily_prorata_based: DF.Check + depreciation_method: DF.Literal[ + "", "Straight Line", "Double Declining Balance", "Written Down Value", "Manual" + ] + depreciation_start_date: DF.Date | None + expected_value_after_useful_life: DF.Currency + finance_book: DF.Link | None + frequency_of_depreciation: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate_of_depreciation: DF.Percent + salvage_value_percentage: DF.Percent + shift_based: DF.Check + total_number_of_depreciations: DF.Int + value_after_depreciation: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py index 125d4bff190e..063fe994aa07 100644 --- a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py +++ b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py @@ -10,6 +10,29 @@ class AssetMaintenance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.asset_maintenance_task.asset_maintenance_task import ( + AssetMaintenanceTask, + ) + + asset_category: DF.ReadOnly | None + asset_maintenance_tasks: DF.Table[AssetMaintenanceTask] + asset_name: DF.Link + company: DF.Link + item_code: DF.ReadOnly | None + item_name: DF.ReadOnly | None + maintenance_manager: DF.Data | None + maintenance_manager_name: DF.ReadOnly | None + maintenance_team: DF.Link + # end: auto-generated types + def validate(self): for task in self.get("asset_maintenance_tasks"): if task.end_date and (getdate(task.start_date) >= getdate(task.end_date)): diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py index ff791b275496..009bcc3e69ab 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py +++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py @@ -11,6 +11,34 @@ class AssetMaintenanceLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actions_performed: DF.TextEditor | None + amended_from: DF.Link | None + asset_maintenance: DF.Link | None + asset_name: DF.ReadOnly | None + assign_to_name: DF.ReadOnly | None + certificate_attachement: DF.Attach | None + completion_date: DF.Date | None + description: DF.ReadOnly | None + due_date: DF.Date | None + has_certificate: DF.Check + item_code: DF.ReadOnly | None + item_name: DF.ReadOnly | None + maintenance_status: DF.Literal["Planned", "Completed", "Cancelled", "Overdue"] + maintenance_type: DF.ReadOnly | None + naming_series: DF.Literal["ACC-AML-.YYYY.-"] + periodicity: DF.Data | None + task: DF.Link | None + task_name: DF.Data | None + # end: auto-generated types + def validate(self): if getdate(self.due_date) < getdate(nowdate()) and self.maintenance_status not in [ "Completed", diff --git a/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py b/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py index 1078208b2fc5..f3a21b59caf0 100644 --- a/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py +++ b/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py @@ -6,4 +6,31 @@ class AssetMaintenanceTask(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + assign_to: DF.Link | None + assign_to_name: DF.ReadOnly | None + certificate_required: DF.Check + description: DF.TextEditor | None + end_date: DF.Date | None + last_completion_date: DF.Date | None + maintenance_status: DF.Literal["Planned", "Overdue", "Cancelled"] + maintenance_task: DF.Data + maintenance_type: DF.Literal["Preventive Maintenance", "Calibration"] + next_due_date: DF.Date | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + periodicity: DF.Literal[ + "", "Daily", "Weekly", "Monthly", "Quarterly", "Half-yearly", "Yearly", "2 Yearly", "3 Yearly" + ] + start_date: DF.Date + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py b/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py index 938c99b4f6bb..b2219f0ae0c0 100644 --- a/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py +++ b/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py @@ -6,4 +6,23 @@ class AssetMaintenanceTeam(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.maintenance_team_member.maintenance_team_member import ( + MaintenanceTeamMember, + ) + + company: DF.Link + maintenance_manager: DF.Link | None + maintenance_manager_name: DF.ReadOnly | None + maintenance_team_members: DF.Table[MaintenanceTeamMember] + maintenance_team_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_movement/asset_movement.py b/erpnext/assets/doctype/asset_movement/asset_movement.py index 620aad80ed9a..0d8efcb8dd8e 100644 --- a/erpnext/assets/doctype/asset_movement/asset_movement.py +++ b/erpnext/assets/doctype/asset_movement/asset_movement.py @@ -11,6 +11,25 @@ class AssetMovement(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.asset_movement_item.asset_movement_item import AssetMovementItem + + amended_from: DF.Link | None + assets: DF.Table[AssetMovementItem] + company: DF.Link + purpose: DF.Literal["", "Issue", "Receipt", "Transfer"] + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + transaction_date: DF.Datetime + # end: auto-generated types + def validate(self): self.validate_asset() self.validate_location() diff --git a/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py b/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py index e25226d580dd..1a5302b9d8d7 100644 --- a/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py +++ b/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py @@ -7,4 +7,24 @@ class AssetMovementItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + asset: DF.Link + asset_name: DF.Data | None + company: DF.Link | None + from_employee: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + source_location: DF.Link | None + target_location: DF.Link | None + to_employee: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_repair/asset_repair.py b/erpnext/assets/doctype/asset_repair/asset_repair.py index 9c2b8bc96327..c0fb3c2923d3 100644 --- a/erpnext/assets/doctype/asset_repair/asset_repair.py +++ b/erpnext/assets/doctype/asset_repair/asset_repair.py @@ -17,6 +17,42 @@ class AssetRepair(AccountsController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.asset_repair_consumed_item.asset_repair_consumed_item import ( + AssetRepairConsumedItem, + ) + + actions_performed: DF.LongText | None + amended_from: DF.Link | None + asset: DF.Link + asset_name: DF.ReadOnly | None + capitalize_repair_cost: DF.Check + company: DF.Link | None + completion_date: DF.Datetime | None + cost_center: DF.Link | None + description: DF.LongText | None + downtime: DF.Data | None + failure_date: DF.Datetime + increase_in_asset_life: DF.Int + naming_series: DF.Literal["ACC-ASR-.YYYY.-"] + project: DF.Link | None + purchase_invoice: DF.Link | None + repair_cost: DF.Currency + repair_status: DF.Literal["Pending", "Completed", "Cancelled"] + stock_consumption: DF.Check + stock_entry: DF.Link | None + stock_items: DF.Table[AssetRepairConsumedItem] + total_repair_cost: DF.Currency + warehouse: DF.Link | None + # end: auto-generated types + def validate(self): self.asset_doc = frappe.get_doc("Asset", self.asset) self.update_status() diff --git a/erpnext/assets/doctype/asset_repair_consumed_item/asset_repair_consumed_item.py b/erpnext/assets/doctype/asset_repair_consumed_item/asset_repair_consumed_item.py index 2a8d64ef490c..ab43cfe62aa3 100644 --- a/erpnext/assets/doctype/asset_repair_consumed_item/asset_repair_consumed_item.py +++ b/erpnext/assets/doctype/asset_repair_consumed_item/asset_repair_consumed_item.py @@ -6,4 +6,23 @@ class AssetRepairConsumedItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + consumed_quantity: DF.Data | None + item_code: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + total_value: DF.Currency + valuation_rate: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/asset_shift_allocation/asset_shift_allocation.py b/erpnext/assets/doctype/asset_shift_allocation/asset_shift_allocation.py index d419ef4c8416..13915c78811a 100644 --- a/erpnext/assets/doctype/asset_shift_allocation/asset_shift_allocation.py +++ b/erpnext/assets/doctype/asset_shift_allocation/asset_shift_allocation.py @@ -22,6 +22,25 @@ class AssetShiftAllocation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.assets.doctype.depreciation_schedule.depreciation_schedule import ( + DepreciationSchedule, + ) + + amended_from: DF.Link | None + asset: DF.Link + depreciation_schedule: DF.Table[DepreciationSchedule] + finance_book: DF.Link | None + naming_series: DF.Literal["ACC-ASA-.YYYY.-"] + # end: auto-generated types + def after_insert(self): self.fetch_and_set_depr_schedule() diff --git a/erpnext/assets/doctype/asset_shift_factor/asset_shift_factor.py b/erpnext/assets/doctype/asset_shift_factor/asset_shift_factor.py index 4c275ce092cc..365a817ce14e 100644 --- a/erpnext/assets/doctype/asset_shift_factor/asset_shift_factor.py +++ b/erpnext/assets/doctype/asset_shift_factor/asset_shift_factor.py @@ -7,6 +7,19 @@ class AssetShiftFactor(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + default: DF.Check + shift_factor: DF.Float + shift_name: DF.Data + # end: auto-generated types + def validate(self): self.validate_default() diff --git a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py index 9be7243602e9..769571c774cd 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py +++ b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py @@ -19,6 +19,27 @@ class AssetValueAdjustment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + asset: DF.Link + asset_category: DF.ReadOnly | None + company: DF.Link | None + cost_center: DF.Link | None + current_asset_value: DF.Currency + date: DF.Date + difference_amount: DF.Currency + finance_book: DF.Link | None + journal_entry: DF.Link | None + new_asset_value: DF.Currency + # end: auto-generated types + def validate(self): self.validate_date() self.set_current_asset_value() diff --git a/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py b/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py index b597c587522a..41aade65916c 100644 --- a/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py +++ b/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py @@ -6,4 +6,22 @@ class DepreciationSchedule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + accumulated_depreciation_amount: DF.Currency + depreciation_amount: DF.Currency + journal_entry: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + schedule_date: DF.Date + shift: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/linked_location/linked_location.py b/erpnext/assets/doctype/linked_location/linked_location.py index e1257f3db168..35e6d8b41d6e 100644 --- a/erpnext/assets/doctype/linked_location/linked_location.py +++ b/erpnext/assets/doctype/linked_location/linked_location.py @@ -6,4 +6,18 @@ class LinkedLocation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + location: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/assets/doctype/location/location.py b/erpnext/assets/doctype/location/location.py index 5bff3dd8c99c..01228f42fd03 100644 --- a/erpnext/assets/doctype/location/location.py +++ b/erpnext/assets/doctype/location/location.py @@ -13,6 +13,27 @@ class Location(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + area: DF.Float + area_uom: DF.Link | None + is_container: DF.Check + is_group: DF.Check + latitude: DF.Float + lft: DF.Int + location_name: DF.Data + longitude: DF.Float + old_parent: DF.Data | None + parent_location: DF.Link | None + rgt: DF.Int + # end: auto-generated types + nsm_parent_field = "parent_location" def validate(self): diff --git a/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py b/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py index c3ede94bc680..80a6a563b8c5 100644 --- a/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py +++ b/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py @@ -6,4 +6,20 @@ class MaintenanceTeamMember(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + full_name: DF.Data | None + maintenance_role: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + team_member: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/bulk_transaction/doctype/bulk_transaction_log/bulk_transaction_log.py b/erpnext/bulk_transaction/doctype/bulk_transaction_log/bulk_transaction_log.py index 712caf1f91f8..2733d07a476e 100644 --- a/erpnext/bulk_transaction/doctype/bulk_transaction_log/bulk_transaction_log.py +++ b/erpnext/bulk_transaction/doctype/bulk_transaction_log/bulk_transaction_log.py @@ -10,6 +10,20 @@ class BulkTransactionLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + date: DF.Date | None + failed: DF.Int + log_entries: DF.Int + succeeded: DF.Int + # end: auto-generated types + def db_insert(self, *args, **kwargs): pass diff --git a/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/bulk_transaction_log_detail.py b/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/bulk_transaction_log_detail.py index 67795b9d4901..9b8e1700eb18 100644 --- a/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/bulk_transaction_log_detail.py +++ b/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/bulk_transaction_log_detail.py @@ -6,4 +6,22 @@ class BulkTransactionLogDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + date: DF.Date | None + error_description: DF.LongText | None + from_doctype: DF.Link | None + retried: DF.Int + time: DF.Time | None + to_doctype: DF.Link | None + transaction_name: DF.DynamicLink | None + transaction_status: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/buying_settings/buying_settings.py b/erpnext/buying/doctype/buying_settings/buying_settings.py index 4680a889d3a0..ec9b88888b7e 100644 --- a/erpnext/buying/doctype/buying_settings/buying_settings.py +++ b/erpnext/buying/doctype/buying_settings/buying_settings.py @@ -9,6 +9,38 @@ class BuyingSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_multiple_items: DF.Check + auto_create_purchase_receipt: DF.Check + auto_create_subcontracting_order: DF.Check + backflush_raw_materials_of_subcontract_based_on: DF.Literal[ + "BOM", "Material Transferred for Subcontract" + ] + bill_for_rejected_quantity_in_purchase_invoice: DF.Check + blanket_order_allowance: DF.Float + buying_price_list: DF.Link | None + disable_last_purchase_rate: DF.Check + maintain_same_rate: DF.Check + maintain_same_rate_action: DF.Literal["Stop", "Warn"] + over_transfer_allowance: DF.Float + po_required: DF.Literal["No", "Yes"] + pr_required: DF.Literal["No", "Yes"] + project_update_frequency: DF.Literal["Each Transaction", "Manual"] + role_to_override_stop_action: DF.Link | None + set_landed_cost_based_on_purchase_invoice_rate: DF.Check + show_pay_button: DF.Check + supp_master_name: DF.Literal["Supplier Name", "Naming Series", "Auto Name"] + supplier_group: DF.Link | None + use_transaction_date_exchange_rate: DF.Check + # end: auto-generated types + def validate(self): for key in ["supplier_group", "supp_master_name", "maintain_same_rate", "buying_price_list"]: frappe.db.set_default(key, self.get(key, "")) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 4b121a806d4d..5f19657a05e2 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -36,6 +36,137 @@ class PurchaseOrder(BuyingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + 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.purchase_taxes_and_charges.purchase_taxes_and_charges import ( + PurchaseTaxesandCharges, + ) + from erpnext.buying.doctype.purchase_order_item.purchase_order_item import PurchaseOrderItem + from erpnext.buying.doctype.purchase_order_item_supplied.purchase_order_item_supplied import ( + PurchaseOrderItemSupplied, + ) + + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + advance_paid: DF.Currency + amended_from: DF.Link | None + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + apply_tds: DF.Check + auto_repeat: DF.Link | None + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_tax_withholding_net_total: DF.Currency + base_taxes_and_charges_added: DF.Currency + base_taxes_and_charges_deducted: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + billing_address: DF.Link | None + billing_address_display: DF.SmallText | None + buying_price_list: DF.Link | None + company: DF.Link + contact_display: DF.SmallText | None + contact_email: DF.SmallText | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + currency: DF.Link + customer: DF.Link | None + customer_contact_display: DF.SmallText | None + customer_contact_email: DF.Code | None + customer_contact_mobile: DF.SmallText | None + customer_contact_person: DF.Link | None + customer_name: DF.Data | None + disable_rounded_total: DF.Check + discount_amount: DF.Currency + from_date: DF.Date | None + grand_total: DF.Currency + group_same_items: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + incoterm: DF.Link | None + inter_company_order_reference: DF.Link | None + is_internal_supplier: DF.Check + is_old_subcontracting_flow: DF.Check + is_subcontracted: DF.Check + items: DF.Table[PurchaseOrderItem] + language: DF.Data | None + letter_head: DF.Link | None + named_place: DF.Data | None + naming_series: DF.Literal["PUR-ORD-.YYYY.-"] + net_total: DF.Currency + order_confirmation_date: DF.Date | None + order_confirmation_no: DF.Data | None + other_charges_calculation: DF.LongText | None + party_account_currency: DF.Link | None + payment_schedule: DF.Table[PaymentSchedule] + payment_terms_template: DF.Link | None + per_billed: DF.Percent + per_received: DF.Percent + plc_conversion_rate: DF.Float + price_list_currency: DF.Link | None + pricing_rules: DF.Table[PricingRuleDetail] + project: DF.Link | None + ref_sq: DF.Link | None + represents_company: DF.Link | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + scan_barcode: DF.Data | None + schedule_date: DF.Date | None + select_print_heading: DF.Link | None + set_from_warehouse: DF.Link | None + set_reserve_warehouse: DF.Link | None + set_warehouse: DF.Link | None + shipping_address: DF.Link | None + shipping_address_display: DF.SmallText | None + shipping_rule: DF.Link | None + status: DF.Literal[ + "", + "Draft", + "On Hold", + "To Receive and Bill", + "To Bill", + "To Receive", + "Completed", + "Cancelled", + "Closed", + "Delivered", + ] + supplied_items: DF.Table[PurchaseOrderItemSupplied] + supplier: DF.Link + supplier_address: DF.Link | None + supplier_name: DF.Data | None + supplier_warehouse: DF.Link | None + tax_category: DF.Link | None + tax_withholding_category: DF.Link | None + tax_withholding_net_total: DF.Currency + taxes: DF.Table[PurchaseTaxesandCharges] + taxes_and_charges: DF.Link | None + taxes_and_charges_added: DF.Currency + taxes_and_charges_deducted: DF.Currency + tc_name: DF.Link | None + terms: DF.TextEditor | None + title: DF.Data + to_date: DF.Date | None + total: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + transaction_date: DF.Date + # end: auto-generated types + def __init__(self, *args, **kwargs): super(PurchaseOrder, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py index a8bafda00294..e9cc2b4eecfe 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py @@ -7,6 +7,93 @@ class PurchaseOrderItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + against_blanket_order: DF.Check + amount: DF.Currency + apply_tds: DF.Check + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + billed_amt: DF.Currency + blanket_order: DF.Link | None + blanket_order_rate: DF.Currency + bom: DF.Link | None + brand: DF.Link | None + company_total_stock: DF.Float + conversion_factor: DF.Float + cost_center: DF.Link | None + delivered_by_supplier: DF.Check + description: DF.TextEditor | None + discount_amount: DF.Currency + discount_percentage: DF.Percent + expected_delivery_date: DF.Date | None + expense_account: DF.Link | None + fg_item: DF.Link | None + fg_item_qty: DF.Float + from_warehouse: DF.Link | None + image: DF.Attach | None + include_exploded_items: DF.Check + is_fixed_asset: DF.Check + is_free_item: DF.Check + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data + item_tax_rate: DF.Code | None + item_tax_template: DF.Link | None + last_purchase_rate: DF.Currency + manufacturer: DF.Link | None + manufacturer_part_no: DF.Data | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + material_request: DF.Link | None + material_request_item: DF.Data | None + net_amount: DF.Currency + net_rate: DF.Currency + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + product_bundle: DF.Link | None + production_plan: DF.Link | None + production_plan_item: DF.Data | None + production_plan_sub_assembly_item: DF.Data | None + project: DF.Link | None + qty: DF.Float + rate: DF.Currency + rate_with_margin: DF.Currency + received_qty: DF.Float + returned_qty: DF.Float + sales_order: DF.Link | None + sales_order_item: DF.Data | None + sales_order_packed_item: DF.Data | None + schedule_date: DF.Date + stock_qty: DF.Float + stock_uom: DF.Link + stock_uom_rate: DF.Currency + supplier_part_no: DF.Data | None + supplier_quotation: DF.Link | None + supplier_quotation_item: DF.Link | None + total_weight: DF.Float + uom: DF.Link + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + wip_composite_asset: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py index c69b5ed7a4c4..6844347dd1dd 100644 --- a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py +++ b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py @@ -6,4 +6,31 @@ class PurchaseOrderItemSupplied(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + bom_detail_no: DF.Data | None + consumed_qty: DF.Float + conversion_factor: DF.Float + main_item_code: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Currency + reference_name: DF.Data | None + required_qty: DF.Float + reserve_warehouse: DF.Link | None + returned_qty: DF.Float + rm_item_code: DF.Link | None + stock_uom: DF.Link | None + supplied_qty: DF.Float + total_supplied_qty: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py index 7b67921232a5..6ed097100f61 100644 --- a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py +++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py @@ -6,4 +6,33 @@ class PurchaseReceiptItemSupplied(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + batch_no: DF.Link | None + bom_detail_no: DF.Data | None + consumed_qty: DF.Float + conversion_factor: DF.Float + current_stock: DF.Float + description: DF.TextEditor | None + item_name: DF.Data | None + main_item_code: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + purchase_order: DF.Link | None + rate: DF.Currency + reference_name: DF.Data | None + required_qty: DF.Float + rm_item_code: DF.Link | None + serial_no: DF.Text | None + stock_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index 6b39982bb816..eea8cd5cc893 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -23,6 +23,45 @@ class RequestforQuotation(BuyingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.buying.doctype.request_for_quotation_item.request_for_quotation_item import ( + RequestforQuotationItem, + ) + from erpnext.buying.doctype.request_for_quotation_supplier.request_for_quotation_supplier import ( + RequestforQuotationSupplier, + ) + + amended_from: DF.Link | None + billing_address: DF.Link | None + billing_address_display: DF.SmallText | None + company: DF.Link + email_template: DF.Link | None + incoterm: DF.Link | None + items: DF.Table[RequestforQuotationItem] + letter_head: DF.Link | None + message_for_supplier: DF.TextEditor + named_place: DF.Data | None + naming_series: DF.Literal["PUR-RFQ-.YYYY.-"] + opportunity: DF.Link | None + schedule_date: DF.Date | None + select_print_heading: DF.Link | None + send_attached_files: DF.Check + send_document_print: DF.Check + status: DF.Literal["", "Draft", "Submitted", "Cancelled"] + suppliers: DF.Table[RequestforQuotationSupplier] + tc_name: DF.Link | None + terms: DF.TextEditor | None + transaction_date: DF.Date + vendor: DF.Link | None + # end: auto-generated types + def validate(self): self.validate_duplicate_supplier() self.validate_supplier_list() diff --git a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py index 096aedee32a7..2ea77307214f 100644 --- a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py +++ b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py @@ -6,4 +6,35 @@ class RequestforQuotationItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + brand: DF.Link | None + conversion_factor: DF.Float + description: DF.TextEditor | None + image: DF.Attach | None + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Data | None + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project_name: DF.Link | None + qty: DF.Float + schedule_date: DF.Date + stock_qty: DF.Float + stock_uom: DF.Link + supplier_part_no: DF.Data | None + uom: DF.Link + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py index dbaad478a3c9..47aa5eee93f4 100644 --- a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py +++ b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py @@ -6,4 +6,24 @@ class RequestforQuotationSupplier(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + contact: DF.Link | None + email_id: DF.Data | None + email_sent: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + quote_status: DF.Literal["Pending", "Received"] + send_email: DF.Check + supplier: DF.Link + supplier_name: DF.ReadOnly | None + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py index b052f564a439..c8ed5aa4a82f 100644 --- a/erpnext/buying/doctype/supplier/supplier.py +++ b/erpnext/buying/doctype/supplier/supplier.py @@ -21,6 +21,60 @@ class Supplier(TransactionBase): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + 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.utilities.doctype.portal_user.portal_user import PortalUser + + accounts: DF.Table[PartyAccount] + allow_purchase_invoice_creation_without_purchase_order: DF.Check + allow_purchase_invoice_creation_without_purchase_receipt: DF.Check + companies: DF.Table[AllowedToTransactWith] + country: DF.Link | None + default_bank_account: DF.Link | None + default_currency: DF.Link | None + default_price_list: DF.Link | None + disabled: DF.Check + email_id: DF.ReadOnly | None + hold_type: DF.Literal["", "All", "Invoices", "Payments"] + image: DF.AttachImage | None + is_frozen: DF.Check + is_internal_supplier: DF.Check + is_transporter: DF.Check + language: DF.Link | None + mobile_no: DF.ReadOnly | None + naming_series: DF.Literal["SUP-.YYYY.-"] + on_hold: DF.Check + payment_terms: DF.Link | None + portal_users: DF.Table[PortalUser] + prevent_pos: DF.Check + prevent_rfqs: DF.Check + primary_address: DF.Text | None + release_date: DF.Date | None + represents_company: DF.Link | None + supplier_details: DF.Text | None + supplier_group: DF.Link | None + supplier_name: DF.Data + supplier_primary_address: DF.Link | None + supplier_primary_contact: DF.Link | None + supplier_type: DF.Literal["Company", "Individual", "Proprietorship", "Partnership"] + tax_category: DF.Link | None + tax_id: DF.Data | None + tax_withholding_category: DF.Link | None + warn_pos: DF.Check + warn_rfqs: DF.Check + website: DF.Data | None + # end: auto-generated types + def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self) diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py index 2dd748bc19c6..bb0c2691dc3a 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py @@ -14,6 +14,95 @@ class SupplierQuotation(BuyingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail + from erpnext.accounts.doctype.purchase_taxes_and_charges.purchase_taxes_and_charges import ( + PurchaseTaxesandCharges, + ) + from erpnext.buying.doctype.supplier_quotation_item.supplier_quotation_item import ( + SupplierQuotationItem, + ) + + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + amended_from: DF.Link | None + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + auto_repeat: DF.Link | None + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_taxes_and_charges_added: DF.Currency + base_taxes_and_charges_deducted: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + billing_address: DF.Link | None + billing_address_display: DF.SmallText | None + buying_price_list: DF.Link | None + company: DF.Link + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + currency: DF.Link + disable_rounded_total: DF.Check + discount_amount: DF.Currency + grand_total: DF.Currency + group_same_items: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + incoterm: DF.Link | None + is_subcontracted: DF.Check + items: DF.Table[SupplierQuotationItem] + language: DF.Data | None + letter_head: DF.Link | None + named_place: DF.Data | None + naming_series: DF.Literal["PUR-SQTN-.YYYY.-"] + net_total: DF.Currency + opportunity: DF.Link | None + other_charges_calculation: DF.LongText | None + plc_conversion_rate: DF.Float + price_list_currency: DF.Link | None + pricing_rules: DF.Table[PricingRuleDetail] + project: DF.Link | None + quotation_number: DF.Data | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + select_print_heading: DF.Link | None + shipping_address: DF.Link | None + shipping_address_display: DF.SmallText | None + shipping_rule: DF.Link | None + status: DF.Literal["", "Draft", "Submitted", "Stopped", "Cancelled", "Expired"] + supplier: DF.Link + supplier_address: DF.Link | None + supplier_name: DF.Data | None + tax_category: DF.Link | None + taxes: DF.Table[PurchaseTaxesandCharges] + taxes_and_charges: DF.Link | None + taxes_and_charges_added: DF.Currency + taxes_and_charges_deducted: DF.Currency + tc_name: DF.Link | None + terms: DF.TextEditor | None + title: DF.Data | None + total: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + transaction_date: DF.Date + valid_till: DF.Date | None + # end: auto-generated types + def validate(self): super(SupplierQuotation, self).validate() diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py index 672de1ac2849..d2f4a59930b8 100644 --- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py +++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py @@ -6,4 +6,62 @@ class SupplierQuotationItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + brand: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + description: DF.TextEditor | None + discount_amount: DF.Currency + discount_percentage: DF.Percent + expected_delivery_date: DF.Date | None + image: DF.Attach | None + is_free_item: DF.Check + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data | None + item_tax_rate: DF.Code | None + item_tax_template: DF.Link | None + lead_time_days: DF.Int + manufacturer: DF.Link | None + manufacturer_part_no: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Data | None + net_amount: DF.Currency + net_rate: DF.Currency + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + prevdoc_doctype: DF.Data | None + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + project: DF.Link | None + qty: DF.Float + rate: DF.Currency + request_for_quotation: DF.Link | None + request_for_quotation_item: DF.Data | None + sales_order: DF.Link | None + stock_qty: DF.Float + stock_uom: DF.Link + supplier_part_no: DF.Data | None + total_weight: DF.Float + uom: DF.Link + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py index 6e22acf01a56..9f71259c531b 100644 --- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py +++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py @@ -16,6 +16,38 @@ class SupplierScorecard(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.buying.doctype.supplier_scorecard_scoring_criteria.supplier_scorecard_scoring_criteria import ( + SupplierScorecardScoringCriteria, + ) + from erpnext.buying.doctype.supplier_scorecard_scoring_standing.supplier_scorecard_scoring_standing import ( + SupplierScorecardScoringStanding, + ) + + criteria: DF.Table[SupplierScorecardScoringCriteria] + employee: DF.Link | None + indicator_color: DF.Data | None + notify_employee: DF.Check + notify_supplier: DF.Check + period: DF.Literal["Per Week", "Per Month", "Per Year"] + prevent_pos: DF.Check + prevent_rfqs: DF.Check + standings: DF.Table[SupplierScorecardScoringStanding] + status: DF.Data | None + supplier: DF.Link | None + supplier_score: DF.Data | None + warn_pos: DF.Check + warn_rfqs: DF.Check + weighting_function: DF.SmallText + # end: auto-generated types + def validate(self): self.validate_standings() self.validate_criteria_weights() diff --git a/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py b/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py index ab7d4879c43e..f19ab94a99eb 100644 --- a/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py +++ b/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py @@ -14,6 +14,20 @@ class InvalidFormulaVariable(frappe.ValidationError): class SupplierScorecardCriteria(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + criteria_name: DF.Data + formula: DF.SmallText + max_score: DF.Float + weight: DF.Percent + # end: auto-generated types + def validate(self): self.validate_variables() self.validate_formula() diff --git a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py index 1967df2a26b3..e6ef166a5bd2 100644 --- a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py +++ b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py @@ -14,6 +14,32 @@ class SupplierScorecardPeriod(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.buying.doctype.supplier_scorecard_scoring_criteria.supplier_scorecard_scoring_criteria import ( + SupplierScorecardScoringCriteria, + ) + from erpnext.buying.doctype.supplier_scorecard_scoring_variable.supplier_scorecard_scoring_variable import ( + SupplierScorecardScoringVariable, + ) + + amended_from: DF.Link | None + criteria: DF.Table[SupplierScorecardScoringCriteria] + end_date: DF.Date + naming_series: DF.Literal["PU-SSP-.YYYY.-"] + scorecard: DF.Link + start_date: DF.Date + supplier: DF.Link + total_score: DF.Percent + variables: DF.Table[SupplierScorecardScoringVariable] + # end: auto-generated types + def validate(self): self.validate_criteria_weights() self.calculate_variables() diff --git a/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py b/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py index 3a6de59f34b6..4c7774272346 100644 --- a/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py +++ b/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py @@ -6,4 +6,22 @@ class SupplierScorecardScoringCriteria(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + criteria_name: DF.Link + formula: DF.SmallText | None + max_score: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + score: DF.Percent + weight: DF.Percent + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py b/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py index 8d66e6414b7a..35e4177b9801 100644 --- a/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py +++ b/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py @@ -6,4 +6,28 @@ class SupplierScorecardScoringStanding(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + employee_link: DF.Link | None + max_grade: DF.Percent + min_grade: DF.Percent + notify_employee: DF.Check + notify_supplier: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + prevent_pos: DF.Check + prevent_rfqs: DF.Check + standing_color: DF.Literal["Blue", "Purple", "Green", "Yellow", "Orange", "Red"] + standing_name: DF.Link | None + warn_pos: DF.Check + warn_rfqs: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py b/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py index f13eb5b420cc..41b474899ebb 100644 --- a/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py +++ b/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py @@ -6,4 +6,22 @@ class SupplierScorecardScoringVariable(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + param_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + path: DF.Data | None + value: DF.Float + variable_label: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py b/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py index 929e8a363fd3..690838a28acf 100644 --- a/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py +++ b/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py @@ -7,6 +7,27 @@ class SupplierScorecardStanding(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + employee_link: DF.Link | None + max_grade: DF.Percent + min_grade: DF.Percent + notify_employee: DF.Check + notify_supplier: DF.Check + prevent_pos: DF.Check + prevent_rfqs: DF.Check + standing_color: DF.Literal["Blue", "Purple", "Green", "Yellow", "Orange", "Red"] + standing_name: DF.Data | None + warn_pos: DF.Check + warn_rfqs: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py b/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py index 4080d1fde092..3b985bfc48db 100644 --- a/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py +++ b/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py @@ -16,6 +16,21 @@ class VariablePathNotFound(frappe.ValidationError): class SupplierScorecardVariable(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + is_custom: DF.Check + param_name: DF.Data + path: DF.Data + variable_label: DF.Data + # end: auto-generated types + def validate(self): self.validate_path_exists() diff --git a/erpnext/communication/doctype/communication_medium/communication_medium.py b/erpnext/communication/doctype/communication_medium/communication_medium.py index 6dfdb73b858f..a5b30834f1e1 100644 --- a/erpnext/communication/doctype/communication_medium/communication_medium.py +++ b/erpnext/communication/doctype/communication_medium/communication_medium.py @@ -7,4 +7,24 @@ class CommunicationMedium(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.communication.doctype.communication_medium_timeslot.communication_medium_timeslot import ( + CommunicationMediumTimeslot, + ) + + catch_all: DF.Link | None + communication_channel: DF.Literal + communication_medium_type: DF.Literal["Voice", "Email", "Chat"] + disabled: DF.Check + provider: DF.Link | None + timeslots: DF.Table[CommunicationMediumTimeslot] + # end: auto-generated types + pass diff --git a/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py b/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py index b65eba75ed0f..4cd65fae6718 100644 --- a/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py +++ b/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py @@ -7,4 +7,23 @@ class CommunicationMediumTimeslot(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + day_of_week: DF.Literal[ + "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" + ] + employee_group: DF.Link + from_time: DF.Time + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + to_time: DF.Time + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/appointment/appointment.py b/erpnext/crm/doctype/appointment/appointment.py index bd49bdc925c4..7be6fdcc13cb 100644 --- a/erpnext/crm/doctype/appointment/appointment.py +++ b/erpnext/crm/doctype/appointment/appointment.py @@ -14,6 +14,26 @@ class Appointment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + appointment_with: DF.Link | None + calendar_event: DF.Link | None + customer_details: DF.LongText | None + customer_email: DF.Data + customer_name: DF.Data + customer_phone_number: DF.Data | None + customer_skype: DF.Data | None + party: DF.DynamicLink | None + scheduled_time: DF.Datetime + status: DF.Literal["Open", "Unverified", "Closed"] + # end: auto-generated types + def find_lead_by_email(self): lead_list = frappe.get_list( "Lead", filters={"email_id": self.customer_email}, ignore_permissions=True diff --git a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py index e43f4601e9cb..77e8727ea546 100644 --- a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py +++ b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py @@ -10,6 +10,32 @@ class AppointmentBookingSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.automation.doctype.assignment_rule_user.assignment_rule_user import ( + AssignmentRuleUser, + ) + from frappe.types import DF + + from erpnext.crm.doctype.appointment_booking_slots.appointment_booking_slots import ( + AppointmentBookingSlots, + ) + + advance_booking_days: DF.Int + agent_list: DF.TableMultiSelect[AssignmentRuleUser] + appointment_duration: DF.Int + availability_of_slots: DF.Table[AppointmentBookingSlots] + email_reminders: DF.Check + enable_scheduling: DF.Check + holiday_list: DF.Link + number_of_agents: DF.Int + success_redirect_url: DF.Data | None + # end: auto-generated types + agent_list = [] # Hack min_date = "01/01/1970 " format_string = "%d/%m/%Y %H:%M:%S" diff --git a/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py b/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py index 756c8495e0a7..ee936ddf3fee 100644 --- a/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py +++ b/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py @@ -7,4 +7,22 @@ class AppointmentBookingSlots(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + day_of_week: DF.Literal[ + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + ] + from_time: DF.Time + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + to_time: DF.Time + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py b/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py index 4294e6da2d23..67b6fdece863 100644 --- a/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py +++ b/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py @@ -7,4 +7,22 @@ class AvailabilityOfSlots(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + day_of_week: DF.Literal[ + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + ] + from_time: DF.Time + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + to_time: DF.Time + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/campaign/campaign.py b/erpnext/crm/doctype/campaign/campaign.py index 5d06075bdfb3..5e14b0e758bc 100644 --- a/erpnext/crm/doctype/campaign/campaign.py +++ b/erpnext/crm/doctype/campaign/campaign.py @@ -7,6 +7,24 @@ class Campaign(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.crm.doctype.campaign_email_schedule.campaign_email_schedule import ( + CampaignEmailSchedule, + ) + + campaign_name: DF.Data + campaign_schedules: DF.Table[CampaignEmailSchedule] + description: DF.Text | None + naming_series: DF.Literal["SAL-CAM-.YYYY.-"] + # end: auto-generated types + def autoname(self): if frappe.defaults.get_global_default("campaign_naming_by") != "Naming Series": self.name = self.campaign_name diff --git a/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py index de9b5a1192c8..fdafab235a93 100644 --- a/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py +++ b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py @@ -7,4 +7,19 @@ class CampaignEmailSchedule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email_template: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + send_after_days: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/competitor/competitor.py b/erpnext/crm/doctype/competitor/competitor.py index a292e4610483..fdd8cbaa4347 100644 --- a/erpnext/crm/doctype/competitor/competitor.py +++ b/erpnext/crm/doctype/competitor/competitor.py @@ -6,4 +6,16 @@ class Competitor(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + competitor_name: DF.Data + website: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/competitor_detail/competitor_detail.py b/erpnext/crm/doctype/competitor_detail/competitor_detail.py index 0ef75605b767..6c7984fdc158 100644 --- a/erpnext/crm/doctype/competitor_detail/competitor_detail.py +++ b/erpnext/crm/doctype/competitor_detail/competitor_detail.py @@ -6,4 +6,18 @@ class CompetitorDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + competitor: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/contract/contract.py b/erpnext/crm/doctype/contract/contract.py index 1c2470b6e4e8..6f9dcde05d69 100644 --- a/erpnext/crm/doctype/contract/contract.py +++ b/erpnext/crm/doctype/contract/contract.py @@ -9,6 +9,42 @@ class Contract(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.crm.doctype.contract_fulfilment_checklist.contract_fulfilment_checklist import ( + ContractFulfilmentChecklist, + ) + + amended_from: DF.Link | None + contract_template: DF.Link | None + contract_terms: DF.TextEditor + document_name: DF.DynamicLink | None + document_type: DF.Literal[ + "", "Quotation", "Project", "Sales Order", "Purchase Order", "Sales Invoice", "Purchase Invoice" + ] + end_date: DF.Date | None + fulfilment_deadline: DF.Date | None + fulfilment_status: DF.Literal["N/A", "Unfulfilled", "Partially Fulfilled", "Fulfilled", "Lapsed"] + fulfilment_terms: DF.Table[ContractFulfilmentChecklist] + ip_address: DF.Data | None + is_signed: DF.Check + party_name: DF.DynamicLink + party_type: DF.Literal["Customer", "Supplier", "Employee"] + party_user: DF.Link | None + requires_fulfilment: DF.Check + signed_by_company: DF.Link | None + signed_on: DF.Datetime | None + signee: DF.Data | None + start_date: DF.Date | None + status: DF.Literal["Unsigned", "Active", "Inactive"] + # end: auto-generated types + def autoname(self): name = self.party_name diff --git a/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py b/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py index 4e4e9986d6b3..43984c305202 100644 --- a/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py +++ b/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py @@ -6,4 +6,21 @@ class ContractFulfilmentChecklist(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + fulfilled: DF.Check + notes: DF.Text | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + requirement: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/contract_template/contract_template.py b/erpnext/crm/doctype/contract_template/contract_template.py index a5b0ee08f046..700197500fb7 100644 --- a/erpnext/crm/doctype/contract_template/contract_template.py +++ b/erpnext/crm/doctype/contract_template/contract_template.py @@ -10,6 +10,24 @@ class ContractTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.crm.doctype.contract_template_fulfilment_terms.contract_template_fulfilment_terms import ( + ContractTemplateFulfilmentTerms, + ) + + contract_terms: DF.TextEditor | None + fulfilment_terms: DF.Table[ContractTemplateFulfilmentTerms] + requires_fulfilment: DF.Check + title: DF.Data | None + # end: auto-generated types + def validate(self): if self.contract_terms: validate_template(self.contract_terms) diff --git a/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py b/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py index 18600d9918a9..597940b04390 100644 --- a/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py +++ b/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py @@ -6,4 +6,18 @@ class ContractTemplateFulfilmentTerms(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + requirement: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/crm_note/crm_note.py b/erpnext/crm/doctype/crm_note/crm_note.py index 6c7eeb4c7ec7..531978c58494 100644 --- a/erpnext/crm/doctype/crm_note/crm_note.py +++ b/erpnext/crm/doctype/crm_note/crm_note.py @@ -6,4 +6,21 @@ class CRMNote(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + added_by: DF.Link | None + added_on: DF.Datetime | None + name: DF.Int | None + note: DF.TextEditor | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/crm_settings/crm_settings.py b/erpnext/crm/doctype/crm_settings/crm_settings.py index 98cf7d845e07..499a6d723d37 100644 --- a/erpnext/crm/doctype/crm_settings/crm_settings.py +++ b/erpnext/crm/doctype/crm_settings/crm_settings.py @@ -6,5 +6,21 @@ class CRMSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_lead_duplication_based_on_emails: DF.Check + auto_creation_of_contact: DF.Check + campaign_naming_by: DF.Literal["Campaign Name", "Naming Series"] + carry_forward_communication_and_comments: DF.Check + close_opportunity_after_days: DF.Int + default_valid_till: DF.Data | None + # end: auto-generated types + def validate(self): frappe.db.set_default("campaign_naming_by", self.get("campaign_naming_by", "")) diff --git a/erpnext/crm/doctype/email_campaign/email_campaign.py b/erpnext/crm/doctype/email_campaign/email_campaign.py index 9ec54ffc1ef1..17cf0e461d0a 100644 --- a/erpnext/crm/doctype/email_campaign/email_campaign.py +++ b/erpnext/crm/doctype/email_campaign/email_campaign.py @@ -10,6 +10,23 @@ class EmailCampaign(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + campaign_name: DF.Link + email_campaign_for: DF.Literal["", "Lead", "Contact", "Email Group"] + end_date: DF.Date | None + recipient: DF.DynamicLink + sender: DF.Link | None + start_date: DF.Date + status: DF.Literal["", "Scheduled", "In Progress", "Completed", "Unsubscribed"] + # end: auto-generated types + def validate(self): self.set_date() # checking if email is set for lead. Not checking for contact as email is a mandatory field for contact. diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index 13dc291cf97d..727d87b07a11 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -17,6 +17,72 @@ class Lead(SellingController, CRMNote): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.crm.doctype.crm_note.crm_note import CRMNote + + annual_revenue: DF.Currency + blog_subscriber: DF.Check + campaign_name: DF.Link | None + city: DF.Data | None + company: DF.Link | None + company_name: DF.Data | None + country: DF.Link | None + customer: DF.Link | None + disabled: DF.Check + email_id: DF.Data | None + fax: DF.Data | None + first_name: DF.Data | None + gender: DF.Link | None + image: DF.AttachImage | None + industry: DF.Link | None + job_title: DF.Data | None + language: DF.Link | None + last_name: DF.Data | None + lead_name: DF.Data | None + lead_owner: DF.Link | None + market_segment: DF.Link | None + middle_name: DF.Data | None + mobile_no: DF.Data | None + naming_series: DF.Literal["CRM-LEAD-.YYYY.-"] + no_of_employees: DF.Literal["1-10", "11-50", "51-200", "201-500", "501-1000", "1000+"] + notes: DF.Table[CRMNote] + phone: DF.Data | None + phone_ext: DF.Data | None + qualification_status: DF.Literal["Unqualified", "In Process", "Qualified"] + qualified_by: DF.Link | None + qualified_on: DF.Date | None + request_type: DF.Literal[ + "", "Product Enquiry", "Request for Information", "Suggestions", "Other" + ] + salutation: DF.Link | None + source: DF.Link | None + state: DF.Data | None + status: DF.Literal[ + "Lead", + "Open", + "Replied", + "Opportunity", + "Quotation", + "Lost Quotation", + "Interested", + "Converted", + "Do Not Contact", + ] + territory: DF.Link | None + title: DF.Data | None + type: DF.Literal["", "Client", "Channel Partner", "Consultant"] + unsubscribed: DF.Check + website: DF.Data | None + whatsapp_no: DF.Data | None + # end: auto-generated types + def onload(self): customer = frappe.db.get_value("Customer", {"lead_name": self.name}) self.get("__onload").is_customer = customer diff --git a/erpnext/crm/doctype/lead_source/lead_source.py b/erpnext/crm/doctype/lead_source/lead_source.py index d9e002865132..b426a329fa76 100644 --- a/erpnext/crm/doctype/lead_source/lead_source.py +++ b/erpnext/crm/doctype/lead_source/lead_source.py @@ -7,4 +7,16 @@ class LeadSource(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + details: DF.TextEditor | None + source_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py b/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py index 51e4d5c506cc..e7115096afaa 100644 --- a/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py +++ b/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py @@ -6,4 +6,18 @@ class LostReasonDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + lost_reason: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/market_segment/market_segment.py b/erpnext/crm/doctype/market_segment/market_segment.py index 766be8570407..1631802b0072 100644 --- a/erpnext/crm/doctype/market_segment/market_segment.py +++ b/erpnext/crm/doctype/market_segment/market_segment.py @@ -6,4 +6,15 @@ class MarketSegment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + market_segment: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 2a8d65f48666..72e26de70e6c 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -25,6 +25,72 @@ class Opportunity(TransactionBase, CRMNote): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.crm.doctype.competitor_detail.competitor_detail import CompetitorDetail + from erpnext.crm.doctype.crm_note.crm_note import CRMNote + from erpnext.crm.doctype.opportunity_item.opportunity_item import OpportunityItem + from erpnext.crm.doctype.opportunity_lost_reason_detail.opportunity_lost_reason_detail import ( + OpportunityLostReasonDetail, + ) + + address_display: DF.SmallText | None + amended_from: DF.Link | None + annual_revenue: DF.Currency + base_opportunity_amount: DF.Currency + base_total: DF.Currency + campaign: DF.Link | None + city: DF.Data | None + company: DF.Link + competitors: DF.TableMultiSelect[CompetitorDetail] + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.Data | None + contact_person: DF.Link | None + conversion_rate: DF.Float + country: DF.Link | None + currency: DF.Link | None + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + expected_closing: DF.Date | None + first_response_time: DF.Duration | None + industry: DF.Link | None + items: DF.Table[OpportunityItem] + job_title: DF.Data | None + language: DF.Link | None + lost_reasons: DF.TableMultiSelect[OpportunityLostReasonDetail] + market_segment: DF.Link | None + naming_series: DF.Literal["CRM-OPP-.YYYY.-"] + no_of_employees: DF.Literal["1-10", "11-50", "51-200", "201-500", "501-1000", "1000+"] + notes: DF.Table[CRMNote] + opportunity_amount: DF.Currency + opportunity_from: DF.Link + opportunity_owner: DF.Link | None + opportunity_type: DF.Link | None + order_lost_reason: DF.SmallText | None + party_name: DF.DynamicLink + phone: DF.Data | None + phone_ext: DF.Data | None + probability: DF.Percent + sales_stage: DF.Link | None + source: DF.Link | None + state: DF.Data | None + status: DF.Literal["Open", "Quotation", "Converted", "Lost", "Replied", "Closed"] + territory: DF.Link | None + title: DF.Data | None + total: DF.Currency + transaction_date: DF.Date + website: DF.Data | None + whatsapp: DF.Data | None + # end: auto-generated types + def onload(self): ref_doc = frappe.get_doc(self.opportunity_from, self.party_name) load_address_and_contact(ref_doc) diff --git a/erpnext/crm/doctype/opportunity_item/opportunity_item.py b/erpnext/crm/doctype/opportunity_item/opportunity_item.py index 4d285870ce56..b3b963eebf17 100644 --- a/erpnext/crm/doctype/opportunity_item/opportunity_item.py +++ b/erpnext/crm/doctype/opportunity_item/opportunity_item.py @@ -6,4 +6,29 @@ class OpportunityItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + base_amount: DF.Currency + base_rate: DF.Currency + brand: DF.Link | None + description: DF.TextEditor | None + image: DF.Attach | None + item_code: DF.Link | None + item_group: DF.Link | None + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + rate: DF.Currency + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py b/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py index 84a9a52b5b84..71f57aefccf2 100644 --- a/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py +++ b/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py @@ -6,4 +6,15 @@ class OpportunityLostReason(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + lost_reason: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py b/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py index d5721850d0c3..7c434d35133f 100644 --- a/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py +++ b/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py @@ -7,4 +7,18 @@ class OpportunityLostReasonDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + lost_reason: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/opportunity_type/opportunity_type.py b/erpnext/crm/doctype/opportunity_type/opportunity_type.py index 1bb31ec859ae..f944b5c16ac2 100644 --- a/erpnext/crm/doctype/opportunity_type/opportunity_type.py +++ b/erpnext/crm/doctype/opportunity_type/opportunity_type.py @@ -6,4 +6,15 @@ class OpportunityType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/prospect/prospect.py b/erpnext/crm/doctype/prospect/prospect.py index 8b66a83f2aeb..7ecbe637f048 100644 --- a/erpnext/crm/doctype/prospect/prospect.py +++ b/erpnext/crm/doctype/prospect/prospect.py @@ -12,6 +12,34 @@ class Prospect(CRMNote): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.crm.doctype.crm_note.crm_note import CRMNote + from erpnext.crm.doctype.prospect_lead.prospect_lead import ProspectLead + from erpnext.crm.doctype.prospect_opportunity.prospect_opportunity import ProspectOpportunity + + annual_revenue: DF.Currency + company: DF.Link + company_name: DF.Data | None + customer_group: DF.Link | None + fax: DF.Data | None + industry: DF.Link | None + leads: DF.Table[ProspectLead] + market_segment: DF.Link | None + no_of_employees: DF.Literal["1-10", "11-50", "51-200", "201-500", "501-1000", "1000+"] + notes: DF.Table[CRMNote] + opportunities: DF.Table[ProspectOpportunity] + prospect_owner: DF.Link | None + territory: DF.Link | None + website: DF.Data | None + # end: auto-generated types + def onload(self): load_address_and_contact(self) diff --git a/erpnext/crm/doctype/prospect_lead/prospect_lead.py b/erpnext/crm/doctype/prospect_lead/prospect_lead.py index 40edbe0524e8..f80c51e8421a 100644 --- a/erpnext/crm/doctype/prospect_lead/prospect_lead.py +++ b/erpnext/crm/doctype/prospect_lead/prospect_lead.py @@ -6,4 +6,23 @@ class ProspectLead(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email: DF.Data | None + lead: DF.Link + lead_name: DF.Data | None + lead_owner: DF.Data | None + mobile_no: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + status: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/prospect_opportunity/prospect_opportunity.py b/erpnext/crm/doctype/prospect_opportunity/prospect_opportunity.py index 8f5d19aaf221..a5f25a9aac4a 100644 --- a/erpnext/crm/doctype/prospect_opportunity/prospect_opportunity.py +++ b/erpnext/crm/doctype/prospect_opportunity/prospect_opportunity.py @@ -6,4 +6,26 @@ class ProspectOpportunity(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + contact_person: DF.Link | None + currency: DF.Link | None + deal_owner: DF.Data | None + expected_closing: DF.Date | None + name: DF.Int | None + opportunity: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + probability: DF.Percent + stage: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/crm/doctype/sales_stage/sales_stage.py b/erpnext/crm/doctype/sales_stage/sales_stage.py index d2099edd0523..aeb4ddbe59c7 100644 --- a/erpnext/crm/doctype/sales_stage/sales_stage.py +++ b/erpnext/crm/doctype/sales_stage/sales_stage.py @@ -6,4 +6,15 @@ class SalesStage(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + stage_name: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py index eb99345991cb..ec7d71e99754 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py @@ -15,6 +15,22 @@ class PlaidSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + automatic_sync: DF.Check + enable_european_access: DF.Check + enabled: DF.Check + plaid_client_id: DF.Data | None + plaid_env: DF.Literal["sandbox", "development", "production"] + plaid_secret: DF.Password | None + # end: auto-generated types + @staticmethod @frappe.whitelist() def get_link_token(): diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py index da5699776fdf..ec7a6e98f960 100644 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py +++ b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py @@ -34,6 +34,36 @@ def callback(*args, **kwargs): class QuickBooksMigrator(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + access_token: DF.SmallText | None + api_endpoint: DF.Data + authorization_endpoint: DF.Data + authorization_url: DF.Data + client_id: DF.Data + client_secret: DF.Data + code: DF.Data | None + company: DF.Link | None + default_cost_center: DF.Link | None + default_shipping_account: DF.Link | None + default_warehouse: DF.Link | None + quickbooks_company_id: DF.Data | None + redirect_url: DF.Data + refresh_token: DF.SmallText | None + scope: DF.Data + status: DF.Literal[ + "Connecting to QuickBooks", "Connected to QuickBooks", "In Progress", "Complete", "Failed" + ] + token_endpoint: DF.Data + undeposited_funds_account: DF.Link | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(QuickBooksMigrator, self).__init__(*args, **kwargs) self.oauth = OAuth2Session( diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py index e6840f505bed..8ebca549a01b 100644 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py +++ b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py @@ -40,6 +40,39 @@ def new_doc(document): class TallyMigration(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + addresses: DF.Attach | None + chart_of_accounts: DF.Attach | None + day_book_data: DF.Attach | None + default_cost_center: DF.Link | None + default_round_off_account: DF.Link | None + default_uom: DF.Link | None + default_warehouse: DF.Link | None + erpnext_company: DF.Data | None + failed_import_log: DF.Code | None + fixed_errors_log: DF.Code | None + is_day_book_data_imported: DF.Check + is_day_book_data_processed: DF.Check + is_master_data_imported: DF.Check + is_master_data_processed: DF.Check + items: DF.Attach | None + master_data: DF.Attach | None + parties: DF.Attach | None + status: DF.Data | None + tally_company: DF.Data | None + tally_creditors_account: DF.Data + tally_debtors_account: DF.Data + uoms: DF.Attach | None + vouchers: DF.Attach | None + # end: auto-generated types + def validate(self): failed_import_log = json.loads(self.failed_import_log) sorted_failed_import_log = sorted(failed_import_log, key=lambda row: row["doc"]["creation"]) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 60ec49587ca9..17ad155031ee 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -643,3 +643,5 @@ default_log_clearing_doctypes = { "Repost Item Valuation": 60, } + +export_python_type_annotations = True diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py index e5bb9e8c2e62..6100756a6a20 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py +++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py @@ -11,6 +11,40 @@ class MaintenanceSchedule(TransactionBase): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.maintenance.doctype.maintenance_schedule_detail.maintenance_schedule_detail import ( + MaintenanceScheduleDetail, + ) + from erpnext.maintenance.doctype.maintenance_schedule_item.maintenance_schedule_item import ( + MaintenanceScheduleItem, + ) + + address_display: DF.SmallText | None + amended_from: DF.Link | None + company: DF.Link + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.Data | None + contact_person: DF.Link | None + customer: DF.Link | None + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + items: DF.Table[MaintenanceScheduleItem] + naming_series: DF.Literal["MAT-MSH-.YYYY.-"] + schedules: DF.Table[MaintenanceScheduleDetail] + status: DF.Literal["", "Draft", "Submitted", "Cancelled"] + territory: DF.Link | None + transaction_date: DF.Date + # end: auto-generated types + @frappe.whitelist() def generate_schedule(self): if self.docstatus != 0: diff --git a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py index cb20066da04c..0bc3eeea1421 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py +++ b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py @@ -6,4 +6,25 @@ class MaintenanceScheduleDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_date: DF.Date | None + completion_status: DF.Literal["Pending", "Partially Completed", "Fully Completed"] + item_code: DF.Link | None + item_name: DF.Data | None + item_reference: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + sales_person: DF.Link | None + scheduled_date: DF.Date + serial_no: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py index b6ce0a50f17e..448b081b9b34 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py +++ b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py @@ -6,4 +6,28 @@ class MaintenanceScheduleItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor | None + end_date: DF.Date + item_code: DF.Link + item_name: DF.Data | None + no_of_visits: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + periodicity: DF.Literal["", "Weekly", "Monthly", "Quarterly", "Half Yearly", "Yearly", "Random"] + sales_order: DF.Link | None + sales_person: DF.Link | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + start_date: DF.Date + # end: auto-generated types + pass diff --git a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py index b900b216e6c1..e7df4847ddb4 100644 --- a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py +++ b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py @@ -10,6 +10,42 @@ class MaintenanceVisit(TransactionBase): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.maintenance.doctype.maintenance_visit_purpose.maintenance_visit_purpose import ( + MaintenanceVisitPurpose, + ) + + address_display: DF.SmallText | None + amended_from: DF.Link | None + company: DF.Link + completion_status: DF.Literal["", "Partially Completed", "Fully Completed"] + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.Data | None + contact_person: DF.Link | None + customer: DF.Link + customer_address: DF.Link | None + customer_feedback: DF.SmallText | None + customer_group: DF.Link | None + customer_name: DF.Data | None + maintenance_schedule: DF.Link | None + maintenance_schedule_detail: DF.Link | None + maintenance_type: DF.Literal["", "Scheduled", "Unscheduled", "Breakdown"] + mntc_date: DF.Date + mntc_time: DF.Time | None + naming_series: DF.Literal["MAT-MVS-.YYYY.-"] + purposes: DF.Table[MaintenanceVisitPurpose] + status: DF.Literal["", "Draft", "Cancelled", "Submitted"] + territory: DF.Link | None + # end: auto-generated types + def validate_serial_no(self): for d in self.get("purposes"): if d.serial_no and not frappe.db.exists("Serial No", d.serial_no): diff --git a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py index 50d9a4e08afd..3686941c640b 100644 --- a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py +++ b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py @@ -6,4 +6,25 @@ class MaintenanceVisitPurpose(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor + item_code: DF.Link | None + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + prevdoc_docname: DF.DynamicLink | None + prevdoc_doctype: DF.Link | None + serial_no: DF.Link | None + service_person: DF.Link + work_done: DF.SmallText + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py index 0135a4f9712a..b5ab63efd01d 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py @@ -13,6 +13,31 @@ class BlanketOrder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.blanket_order_item.blanket_order_item import BlanketOrderItem + + amended_from: DF.Link | None + blanket_order_type: DF.Literal["", "Selling", "Purchasing"] + company: DF.Link + customer: DF.Link | None + customer_name: DF.Data | None + from_date: DF.Date + items: DF.Table[BlanketOrderItem] + naming_series: DF.Literal["MFG-BLR-.YYYY.-"] + supplier: DF.Link | None + supplier_name: DF.Data | None + tc_name: DF.Link | None + terms: DF.TextEditor | None + to_date: DF.Date + # end: auto-generated types + def validate(self): self.validate_dates() self.validate_duplicate_items() diff --git a/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py b/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py index ebce209fbc2b..068c2e91182e 100644 --- a/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py +++ b/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py @@ -6,4 +6,23 @@ class BlanketOrderItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_code: DF.Link + item_name: DF.Data | None + ordered_qty: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + rate: DF.Currency + terms_and_conditions: DF.Text | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 023166849dbf..4679abe8a718 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -103,6 +103,71 @@ def __repr__(self, level: int = 0) -> str: class BOM(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.bom_explosion_item.bom_explosion_item import BOMExplosionItem + from erpnext.manufacturing.doctype.bom_item.bom_item import BOMItem + from erpnext.manufacturing.doctype.bom_operation.bom_operation import BOMOperation + from erpnext.manufacturing.doctype.bom_scrap_item.bom_scrap_item import BOMScrapItem + + allow_alternative_item: DF.Check + amended_from: DF.Link | None + base_operating_cost: DF.Currency + base_raw_material_cost: DF.Currency + base_scrap_material_cost: DF.Currency + base_total_cost: DF.Currency + bom_creator: DF.Link | None + bom_creator_item: DF.Data | None + buying_price_list: DF.Link | None + company: DF.Link + conversion_rate: DF.Float + currency: DF.Link + description: DF.SmallText | None + exploded_items: DF.Table[BOMExplosionItem] + fg_based_operating_cost: DF.Check + has_variants: DF.Check + image: DF.AttachImage | None + inspection_required: DF.Check + is_active: DF.Check + is_default: DF.Check + item: DF.Link + item_name: DF.Data | None + items: DF.Table[BOMItem] + operating_cost: DF.Currency + operating_cost_per_bom_quantity: DF.Currency + operations: DF.Table[BOMOperation] + plc_conversion_rate: DF.Float + price_list_currency: DF.Link | None + process_loss_percentage: DF.Percent + process_loss_qty: DF.Float + project: DF.Link | None + quality_inspection_template: DF.Link | None + quantity: DF.Float + raw_material_cost: DF.Currency + rm_cost_as_per: DF.Literal["Valuation Rate", "Last Purchase Rate", "Price List", "Manual"] + route: DF.SmallText | None + routing: DF.Link | None + scrap_items: DF.Table[BOMScrapItem] + scrap_material_cost: DF.Currency + set_rate_of_sub_assembly_item_based_on_bom: DF.Check + show_in_website: DF.Check + show_items: DF.Check + show_operations: DF.Check + thumbnail: DF.Data | None + total_cost: DF.Currency + transfer_material_against: DF.Literal["", "Work Order", "Job Card"] + uom: DF.Link | None + web_long_description: DF.TextEditor | None + website_image: DF.AttachImage | None + with_operations: DF.Check + # end: auto-generated types + website = frappe._dict( # page_title_field = "item_name", condition_field="show_in_website", diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py index 49041a09295f..bd010d9f9a60 100644 --- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py +++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py @@ -32,6 +32,39 @@ class BOMCreator(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.bom_creator_item.bom_creator_item import BOMCreatorItem + + amended_from: DF.Link | None + buying_price_list: DF.Link | None + company: DF.Link + conversion_rate: DF.Float + currency: DF.Link + default_warehouse: DF.Link | None + error_log: DF.Text | None + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data | None + items: DF.Table[BOMCreatorItem] + plc_conversion_rate: DF.Float + price_list_currency: DF.Link | None + project: DF.Link | None + qty: DF.Float + raw_material_cost: DF.Currency + remarks: DF.TextEditor | None + rm_cost_as_per: DF.Literal["Valuation Rate", "Last Purchase Rate", "Price List", "Manual"] + set_rate_based_on_warehouse: DF.Check + status: DF.Literal["Draft", "Submitted", "In Progress", "Completed", "Failed", "Cancelled"] + uom: DF.Link | None + # end: auto-generated types + def before_save(self): self.set_status() self.set_is_expandable() diff --git a/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py b/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py index 350c9180b909..e172f36224d8 100644 --- a/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py +++ b/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py @@ -6,4 +6,39 @@ class BOMCreatorItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + base_amount: DF.Currency + base_rate: DF.Currency + bom_created: DF.Check + conversion_factor: DF.Float + description: DF.SmallText | None + do_not_explode: DF.Check + fg_item: DF.Link + fg_reference_id: DF.Data | None + instruction: DF.SmallText | None + is_expandable: DF.Check + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data | None + parent: DF.Data + parent_row_no: DF.Data | None + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + rate: DF.Currency + source_warehouse: DF.Link | None + sourced_by_supplier: DF.Check + stock_qty: DF.Float + stock_uom: DF.Link | None + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py index cbcba345bca3..98e254ffe96d 100644 --- a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py +++ b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py @@ -6,4 +6,30 @@ class BOMExplosionItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + description: DF.TextEditor | None + image: DF.Attach | None + include_item_in_manufacturing: DF.Check + item_code: DF.Link | None + item_name: DF.Data | None + operation: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty_consumed_per_unit: DF.Float + rate: DF.Currency + source_warehouse: DF.Link | None + sourced_by_supplier: DF.Check + stock_qty: DF.Float + stock_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_item/bom_item.py b/erpnext/manufacturing/doctype/bom_item/bom_item.py index 28a4b2014442..466253bf0bfa 100644 --- a/erpnext/manufacturing/doctype/bom_item/bom_item.py +++ b/erpnext/manufacturing/doctype/bom_item/bom_item.py @@ -6,4 +6,40 @@ class BOMItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_alternative_item: DF.Check + amount: DF.Currency + base_amount: DF.Currency + base_rate: DF.Currency + bom_no: DF.Link | None + conversion_factor: DF.Float + description: DF.TextEditor | None + do_not_explode: DF.Check + has_variants: DF.Check + image: DF.Attach | None + include_item_in_manufacturing: DF.Check + item_code: DF.Link + item_name: DF.Data | None + operation: DF.Link | None + original_item: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + qty_consumed_per_unit: DF.Float + rate: DF.Currency + source_warehouse: DF.Link | None + sourced_by_supplier: DF.Check + stock_qty: DF.Float + stock_uom: DF.Link | None + uom: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.py b/erpnext/manufacturing/doctype/bom_operation/bom_operation.py index 0ddc280ac0e5..66ac02891b99 100644 --- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.py +++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.py @@ -6,4 +6,33 @@ class BOMOperation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + base_cost_per_unit: DF.Float + base_hour_rate: DF.Currency + base_operating_cost: DF.Currency + batch_size: DF.Int + cost_per_unit: DF.Float + description: DF.TextEditor | None + fixed_time: DF.Check + hour_rate: DF.Currency + image: DF.Attach | None + operating_cost: DF.Currency + operation: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + sequence_id: DF.Int + set_cost_based_on_bom_qty: DF.Check + time_in_mins: DF.Float + workstation: DF.Link | None + workstation_type: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py b/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py index f400303b95e0..043bbc63b50a 100644 --- a/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py +++ b/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py @@ -6,4 +6,25 @@ class BOMScrapItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + base_amount: DF.Currency + base_rate: DF.Currency + item_code: DF.Link + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Currency + stock_qty: DF.Float + stock_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_update_batch/bom_update_batch.py b/erpnext/manufacturing/doctype/bom_update_batch/bom_update_batch.py index f952e435e67d..c3793bef980a 100644 --- a/erpnext/manufacturing/doctype/bom_update_batch/bom_update_batch.py +++ b/erpnext/manufacturing/doctype/bom_update_batch/bom_update_batch.py @@ -6,4 +6,21 @@ class BOMUpdateBatch(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + batch_no: DF.Int + boms_updated: DF.LongText | None + level: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + status: DF.Literal["Pending", "Completed"] + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py index e9867468f98f..198b9b815cb4 100644 --- a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py +++ b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py @@ -24,6 +24,27 @@ class BOMMissingError(frappe.ValidationError): class BOMUpdateLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.bom_update_batch.bom_update_batch import BOMUpdateBatch + + amended_from: DF.Link | None + bom_batches: DF.Table[BOMUpdateBatch] + current_bom: DF.Link | None + current_level: DF.Int + error_log: DF.Link | None + new_bom: DF.Link | None + processed_boms: DF.LongText | None + status: DF.Literal["Queued", "In Progress", "Completed", "Failed"] + update_type: DF.Literal["Replace BOM", "Update Cost"] + # end: auto-generated types + @staticmethod def clear_old_logs(days=None): days = days or 90 diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py index d16fcd083264..95521163e58e 100644 --- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py +++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py @@ -12,6 +12,18 @@ class BOMUpdateTool(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + current_bom: DF.Link + new_bom: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py index 33256a3b31db..8c6321f2b773 100644 --- a/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py +++ b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py @@ -6,4 +6,22 @@ class BOMWebsiteItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor | None + item_code: DF.Link | None + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + website_image: DF.Attach | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py index f8e279287a65..b43b8618d857 100644 --- a/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py +++ b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py @@ -6,4 +6,22 @@ class BOMWebsiteOperation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + operation: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + thumbnail: DF.Data | None + time_in_mins: DF.Float + website_image: DF.Attach | None + workstation: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py b/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py index 460281658a86..1366ada255c9 100644 --- a/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py +++ b/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py @@ -7,6 +7,33 @@ class DowntimeEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + downtime: DF.Float + from_time: DF.Datetime + naming_series: DF.Literal["DT-"] + operator: DF.Link + remarks: DF.Text | None + stop_reason: DF.Literal[ + "", + "Excessive machine set up time", + "Unplanned machine maintenance", + "On-machine press checks", + "Machine operator errors", + "Machine malfunction", + "Electricity down", + "Other", + ] + to_time: DF.Datetime + workstation: DF.Link + # end: auto-generated types + def validate(self): if self.from_time and self.to_time: self.downtime = time_diff_in_hours(self.to_time, self.from_time) * 60 diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index f303531aee1c..4b1015de68c5 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -51,6 +51,82 @@ class JobCardOverTransferError(frappe.ValidationError): class JobCard(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.job_card_item.job_card_item import JobCardItem + from erpnext.manufacturing.doctype.job_card_operation.job_card_operation import JobCardOperation + from erpnext.manufacturing.doctype.job_card_scheduled_time.job_card_scheduled_time import ( + JobCardScheduledTime, + ) + from erpnext.manufacturing.doctype.job_card_scrap_item.job_card_scrap_item import ( + JobCardScrapItem, + ) + from erpnext.manufacturing.doctype.job_card_time_log.job_card_time_log import JobCardTimeLog + + actual_end_date: DF.Datetime | None + actual_start_date: DF.Datetime | None + amended_from: DF.Link | None + barcode: DF.Barcode | None + batch_no: DF.Link | None + bom_no: DF.Link | None + company: DF.Link + current_time: DF.Int + employee: DF.TableMultiSelect[JobCardTimeLog] + expected_end_date: DF.Datetime | None + expected_start_date: DF.Datetime | None + for_job_card: DF.Link | None + for_operation: DF.Link | None + for_quantity: DF.Float + hour_rate: DF.Currency + is_corrective_job_card: DF.Check + item_name: DF.ReadOnly | None + items: DF.Table[JobCardItem] + job_started: DF.Check + naming_series: DF.Literal["PO-JOB.#####"] + operation: DF.Link + operation_id: DF.Data | None + operation_row_number: DF.Literal + posting_date: DF.Date | None + process_loss_qty: DF.Float + production_item: DF.Link | None + project: DF.Link | None + quality_inspection: DF.Link | None + quality_inspection_template: DF.Link | None + remarks: DF.SmallText | None + requested_qty: DF.Float + scheduled_time_logs: DF.Table[JobCardScheduledTime] + scrap_items: DF.Table[JobCardScrapItem] + sequence_id: DF.Int + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + started_time: DF.Datetime | None + status: DF.Literal[ + "Open", + "Work In Progress", + "Material Transferred", + "On Hold", + "Submitted", + "Cancelled", + "Completed", + ] + sub_operations: DF.Table[JobCardOperation] + time_logs: DF.Table[JobCardTimeLog] + time_required: DF.Float + total_completed_qty: DF.Float + total_time_in_mins: DF.Float + transferred_qty: DF.Float + wip_warehouse: DF.Link + work_order: DF.Link + workstation: DF.Link + workstation_type: DF.Link | None + # end: auto-generated types + def onload(self): excess_transfer = frappe.db.get_single_value( "Manufacturing Settings", "job_card_excess_transfer" diff --git a/erpnext/manufacturing/doctype/job_card_item/job_card_item.py b/erpnext/manufacturing/doctype/job_card_item/job_card_item.py index 51a7b41f0d92..ecf082392a3f 100644 --- a/erpnext/manufacturing/doctype/job_card_item/job_card_item.py +++ b/erpnext/manufacturing/doctype/job_card_item/job_card_item.py @@ -6,4 +6,27 @@ class JobCardItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_alternative_item: DF.Check + description: DF.Text | None + item_code: DF.Link | None + item_group: DF.Link | None + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + required_qty: DF.Float + source_warehouse: DF.Link | None + stock_uom: DF.Link | None + transferred_qty: DF.Float + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py b/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py index de44071c6ad4..4d32dd472828 100644 --- a/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py +++ b/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py @@ -7,4 +7,21 @@ class JobCardOperation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + completed_qty: DF.Float + completed_time: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + status: DF.Literal["Complete", "Pause", "Pending", "Work In Progress"] + sub_operation: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/job_card_scheduled_time/job_card_scheduled_time.py b/erpnext/manufacturing/doctype/job_card_scheduled_time/job_card_scheduled_time.py index e50b153b9ca7..b9f44dc4d31c 100644 --- a/erpnext/manufacturing/doctype/job_card_scheduled_time/job_card_scheduled_time.py +++ b/erpnext/manufacturing/doctype/job_card_scheduled_time/job_card_scheduled_time.py @@ -6,4 +6,20 @@ class JobCardScheduledTime(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from_time: DF.Datetime | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + time_in_mins: DF.Float + to_time: DF.Datetime | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/job_card_scrap_item/job_card_scrap_item.py b/erpnext/manufacturing/doctype/job_card_scrap_item/job_card_scrap_item.py index 372df1b0fad8..e4b926efc07c 100644 --- a/erpnext/manufacturing/doctype/job_card_scrap_item/job_card_scrap_item.py +++ b/erpnext/manufacturing/doctype/job_card_scrap_item/job_card_scrap_item.py @@ -5,4 +5,22 @@ class JobCardScrapItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + item_code: DF.Link + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + stock_qty: DF.Float + stock_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py b/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py index 2b3ead383a3a..ba802a98e842 100644 --- a/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py +++ b/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py @@ -6,4 +6,23 @@ class JobCardTimeLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + completed_qty: DF.Float + employee: DF.Link | None + from_time: DF.Datetime | None + operation: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + time_in_mins: DF.Float + to_time: DF.Datetime | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py index 730a85752474..bfc8f4e91501 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py @@ -9,6 +9,32 @@ class ManufacturingSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + add_corrective_operation_cost_in_finished_good_valuation: DF.Check + allow_overtime: DF.Check + allow_production_on_holidays: DF.Check + backflush_raw_materials_based_on: DF.Literal["BOM", "Material Transferred for Manufacture"] + capacity_planning_for_days: DF.Int + default_fg_warehouse: DF.Link | None + default_scrap_warehouse: DF.Link | None + default_wip_warehouse: DF.Link | None + disable_capacity_planning: DF.Check + job_card_excess_transfer: DF.Check + make_serial_no_batch_from_work_order: DF.Check + material_consumption: DF.Check + mins_between_operations: DF.Int + overproduction_percentage_for_sales_order: DF.Percent + overproduction_percentage_for_work_order: DF.Percent + update_bom_costs_automatically: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py b/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py index 3d5a7ce3fe06..aa1c72294d3d 100644 --- a/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py +++ b/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py @@ -6,4 +6,38 @@ class MaterialRequestPlanItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + conversion_factor: DF.Float + description: DF.TextEditor | None + from_warehouse: DF.Link | None + item_code: DF.Link + item_name: DF.Data | None + material_request_type: DF.Literal[ + "", "Purchase", "Material Transfer", "Material Issue", "Manufacture", "Customer Provided" + ] + min_order_qty: DF.Float + ordered_qty: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + projected_qty: DF.Float + quantity: DF.Float + requested_qty: DF.Float + required_bom_qty: DF.Float + reserved_qty_for_production: DF.Float + safety_stock: DF.Float + sales_order: DF.Link | None + schedule_date: DF.Date | None + uom: DF.Link | None + warehouse: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/operation/operation.py b/erpnext/manufacturing/doctype/operation/operation.py index 9c8f9ac8d059..396929109422 100644 --- a/erpnext/manufacturing/doctype/operation/operation.py +++ b/erpnext/manufacturing/doctype/operation/operation.py @@ -8,6 +8,26 @@ class Operation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.sub_operation.sub_operation import SubOperation + + batch_size: DF.Int + create_job_card_based_on_batch_size: DF.Check + description: DF.Text | None + is_corrective_operation: DF.Check + quality_inspection_template: DF.Link | None + sub_operations: DF.Table[SubOperation] + total_operation_time: DF.Float + workstation: DF.Link | None + # end: auto-generated types + def validate(self): if not self.description: self.description = self.name diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 6efb76290504..955821fc58f9 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -33,6 +33,81 @@ class ProductionPlan(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.material_request_plan_item.material_request_plan_item import ( + MaterialRequestPlanItem, + ) + from erpnext.manufacturing.doctype.production_plan_item.production_plan_item import ( + ProductionPlanItem, + ) + from erpnext.manufacturing.doctype.production_plan_item_reference.production_plan_item_reference import ( + ProductionPlanItemReference, + ) + from erpnext.manufacturing.doctype.production_plan_material_request.production_plan_material_request import ( + ProductionPlanMaterialRequest, + ) + from erpnext.manufacturing.doctype.production_plan_material_request_warehouse.production_plan_material_request_warehouse import ( + ProductionPlanMaterialRequestWarehouse, + ) + from erpnext.manufacturing.doctype.production_plan_sales_order.production_plan_sales_order import ( + ProductionPlanSalesOrder, + ) + from erpnext.manufacturing.doctype.production_plan_sub_assembly_item.production_plan_sub_assembly_item import ( + ProductionPlanSubAssemblyItem, + ) + + amended_from: DF.Link | None + combine_items: DF.Check + combine_sub_items: DF.Check + company: DF.Link + customer: DF.Link | None + for_warehouse: DF.Link | None + from_date: DF.Date | None + from_delivery_date: DF.Date | None + get_items_from: DF.Literal["", "Sales Order", "Material Request"] + ignore_existing_ordered_qty: DF.Check + include_non_stock_items: DF.Check + include_safety_stock: DF.Check + include_subcontracted_items: DF.Check + item_code: DF.Link | None + material_requests: DF.Table[ProductionPlanMaterialRequest] + mr_items: DF.Table[MaterialRequestPlanItem] + naming_series: DF.Literal["MFG-PP-.YYYY.-"] + po_items: DF.Table[ProductionPlanItem] + posting_date: DF.Date + prod_plan_references: DF.Table[ProductionPlanItemReference] + project: DF.Link | None + sales_order_status: DF.Literal["", "To Deliver and Bill", "To Bill", "To Deliver"] + sales_orders: DF.Table[ProductionPlanSalesOrder] + skip_available_sub_assembly_item: DF.Check + status: DF.Literal[ + "", + "Draft", + "Submitted", + "Not Started", + "In Process", + "Completed", + "Closed", + "Cancelled", + "Material Requested", + ] + sub_assembly_items: DF.Table[ProductionPlanSubAssemblyItem] + sub_assembly_warehouse: DF.Link | None + to_date: DF.Date | None + to_delivery_date: DF.Date | None + total_planned_qty: DF.Float + total_produced_qty: DF.Float + warehouse: DF.Link | None + warehouses: DF.TableMultiSelect[ProductionPlanMaterialRequestWarehouse] + # end: auto-generated types + def validate(self): self.set_pending_qty_in_row_without_reference() self.calculate_total_planned_qty() diff --git a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py index cc79ac327dba..316923bad2a4 100644 --- a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py +++ b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py @@ -6,4 +6,35 @@ class ProductionPlanItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + bom_no: DF.Link + description: DF.TextEditor | None + include_exploded_items: DF.Check + item_code: DF.Link + item_reference: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Data | None + ordered_qty: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + pending_qty: DF.Float + planned_qty: DF.Float + planned_start_date: DF.Datetime + produced_qty: DF.Float + product_bundle_item: DF.Link | None + sales_order: DF.Link | None + sales_order_item: DF.Data | None + stock_uom: DF.Link + temporary_name: DF.Data | None + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py b/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py index 81d2ecad544b..d95bf8c006fd 100644 --- a/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py +++ b/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py @@ -7,4 +7,21 @@ class ProductionPlanItemReference(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_reference: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Data | None + sales_order: DF.Link | None + sales_order_item: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py b/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py index 83b17893c044..efcba22c4f88 100644 --- a/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py +++ b/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py @@ -6,4 +6,19 @@ class ProductionPlanMaterialRequest(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + material_request: DF.Link + material_request_date: DF.Date | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py b/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py index a66ff44f5584..13e27e5187dd 100644 --- a/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py +++ b/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py @@ -7,4 +7,18 @@ class ProductionPlanMaterialRequestWarehouse(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py index 3f3852983cee..7f793b58685b 100644 --- a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py +++ b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py @@ -6,4 +6,21 @@ class ProductionPlanSalesOrder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + customer: DF.Link | None + grand_total: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + sales_order: DF.Link + sales_order_date: DF.Date | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py b/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py index 069667a64104..ad1d655de8bb 100644 --- a/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py +++ b/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py @@ -7,4 +7,37 @@ class ProductionPlanSubAssemblyItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + bom_level: DF.Int + bom_no: DF.Link | None + description: DF.SmallText | None + fg_warehouse: DF.Link | None + indent: DF.Int + item_name: DF.Data | None + parent: DF.Data + parent_item_code: DF.Link | None + parentfield: DF.Data + parenttype: DF.Data + production_item: DF.Link | None + production_plan_item: DF.Data | None + projected_qty: DF.Float + purchase_order: DF.Link | None + qty: DF.Float + received_qty: DF.Float + schedule_date: DF.Datetime | None + stock_uom: DF.Link | None + supplier: DF.Link | None + type_of_manufacturing: DF.Literal["In House", "Subcontract", "Material Request"] + uom: DF.Link | None + wo_produced_qty: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/routing/routing.py b/erpnext/manufacturing/doctype/routing/routing.py index d4c37cf79e79..4bef3800bf41 100644 --- a/erpnext/manufacturing/doctype/routing/routing.py +++ b/erpnext/manufacturing/doctype/routing/routing.py @@ -9,6 +9,21 @@ class Routing(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.bom_operation.bom_operation import BOMOperation + + disabled: DF.Check + operations: DF.Table[BOMOperation] + routing_name: DF.Data | None + # end: auto-generated types + def validate(self): self.calculate_operating_cost() self.set_routing_id() diff --git a/erpnext/manufacturing/doctype/sub_operation/sub_operation.py b/erpnext/manufacturing/doctype/sub_operation/sub_operation.py index c86058eb5862..f4bb62e8f6c4 100644 --- a/erpnext/manufacturing/doctype/sub_operation/sub_operation.py +++ b/erpnext/manufacturing/doctype/sub_operation/sub_operation.py @@ -7,4 +7,20 @@ class SubOperation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + operation: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + time_in_mins: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 36a0cae5cca5..78bfc767d6f9 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -64,6 +64,80 @@ class SerialNoQtyError(frappe.ValidationError): class WorkOrder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.work_order_item.work_order_item import WorkOrderItem + from erpnext.manufacturing.doctype.work_order_operation.work_order_operation import ( + WorkOrderOperation, + ) + + actual_end_date: DF.Datetime | None + actual_operating_cost: DF.Currency + actual_start_date: DF.Datetime | None + additional_operating_cost: DF.Currency + allow_alternative_item: DF.Check + amended_from: DF.Link | None + batch_size: DF.Float + bom_no: DF.Link + company: DF.Link + corrective_operation_cost: DF.Currency + description: DF.SmallText | None + expected_delivery_date: DF.Date | None + fg_warehouse: DF.Link + from_wip_warehouse: DF.Check + has_batch_no: DF.Check + has_serial_no: DF.Check + image: DF.AttachImage | None + item_name: DF.Data | None + lead_time: DF.Float + material_request: DF.Link | None + material_request_item: DF.Data | None + material_transferred_for_manufacturing: DF.Float + naming_series: DF.Literal["MFG-WO-.YYYY.-"] + operations: DF.Table[WorkOrderOperation] + planned_end_date: DF.Datetime | None + planned_operating_cost: DF.Currency + planned_start_date: DF.Datetime + process_loss_qty: DF.Float + produced_qty: DF.Float + product_bundle_item: DF.Link | None + production_item: DF.Link + production_plan: DF.Link | None + production_plan_item: DF.Data | None + production_plan_sub_assembly_item: DF.Data | None + project: DF.Link | None + qty: DF.Float + required_items: DF.Table[WorkOrderItem] + sales_order: DF.Link | None + sales_order_item: DF.Data | None + scrap_warehouse: DF.Link | None + skip_transfer: DF.Check + source_warehouse: DF.Link | None + status: DF.Literal[ + "", + "Draft", + "Submitted", + "Not Started", + "In Process", + "Completed", + "Stopped", + "Closed", + "Cancelled", + ] + stock_uom: DF.Link | None + total_operating_cost: DF.Currency + transfer_material_against: DF.Literal["", "Work Order", "Job Card"] + update_consumed_material_cost_in_project: DF.Check + use_multi_level_bom: DF.Check + wip_warehouse: DF.Link | None + # end: auto-generated types + def onload(self): ms = frappe.get_doc("Manufacturing Settings") self.set_onload("material_consumption", ms.material_consumption) diff --git a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py index 179274707e3e..267ca5d21dee 100644 --- a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py +++ b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py @@ -7,6 +7,34 @@ class WorkOrderItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_alternative_item: DF.Check + amount: DF.Currency + available_qty_at_source_warehouse: DF.Float + available_qty_at_wip_warehouse: DF.Float + consumed_qty: DF.Float + description: DF.Text | None + include_item_in_manufacturing: DF.Check + item_code: DF.Link | None + item_name: DF.Data | None + operation: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Currency + required_qty: DF.Float + returned_qty: DF.Float + source_warehouse: DF.Link | None + transferred_qty: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py b/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py index 6bda58ea77ed..5bd3ab1b21f7 100644 --- a/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py +++ b/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py @@ -6,4 +6,36 @@ class WorkOrderOperation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_end_time: DF.Datetime | None + actual_operating_cost: DF.Currency + actual_operation_time: DF.Float + actual_start_time: DF.Datetime | None + batch_size: DF.Float + bom: DF.Link | None + completed_qty: DF.Float + description: DF.TextEditor | None + hour_rate: DF.Float + operation: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + planned_end_time: DF.Datetime | None + planned_operating_cost: DF.Currency + planned_start_time: DF.Datetime | None + process_loss_qty: DF.Float + sequence_id: DF.Int + status: DF.Literal["Pending", "Work in Progress", "Completed"] + time_in_mins: DF.Float + workstation: DF.Link | None + workstation_type: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/manufacturing/doctype/workstation/workstation.py b/erpnext/manufacturing/doctype/workstation/workstation.py index ac271b71445c..0a247fc431d0 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.py +++ b/erpnext/manufacturing/doctype/workstation/workstation.py @@ -32,6 +32,31 @@ class OverlapError(frappe.ValidationError): class Workstation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.manufacturing.doctype.workstation_working_hour.workstation_working_hour import ( + WorkstationWorkingHour, + ) + + description: DF.Text | None + holiday_list: DF.Link | None + hour_rate: DF.Currency + hour_rate_consumable: DF.Currency + hour_rate_electricity: DF.Currency + hour_rate_labour: DF.Currency + hour_rate_rent: DF.Currency + production_capacity: DF.Int + working_hours: DF.Table[WorkstationWorkingHour] + workstation_name: DF.Data + workstation_type: DF.Link | None + # end: auto-generated types + def before_save(self): self.set_data_based_on_workstation_type() self.set_hour_rate() diff --git a/erpnext/manufacturing/doctype/workstation_type/workstation_type.py b/erpnext/manufacturing/doctype/workstation_type/workstation_type.py index 8c1e230af0fa..0f151a2fb2b5 100644 --- a/erpnext/manufacturing/doctype/workstation_type/workstation_type.py +++ b/erpnext/manufacturing/doctype/workstation_type/workstation_type.py @@ -7,6 +7,23 @@ class WorkstationType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + hour_rate: DF.Currency + hour_rate_consumable: DF.Currency + hour_rate_electricity: DF.Currency + hour_rate_labour: DF.Currency + hour_rate_rent: DF.Currency + workstation_type: DF.Data + # end: auto-generated types + def before_save(self): self.set_hour_rate() diff --git a/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py b/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py index 99fb5524a909..6754d66fec1e 100644 --- a/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py +++ b/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py @@ -6,4 +6,20 @@ class WorkstationWorkingHour(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + enabled: DF.Check + end_time: DF.Time + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + start_time: DF.Time + # end: auto-generated types + pass diff --git a/erpnext/portal/doctype/homepage/homepage.py b/erpnext/portal/doctype/homepage/homepage.py index c0a0c07d7d53..3539b280cacd 100644 --- a/erpnext/portal/doctype/homepage/homepage.py +++ b/erpnext/portal/doctype/homepage/homepage.py @@ -8,6 +8,24 @@ class Homepage(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link + description: DF.Text + hero_image: DF.AttachImage | None + hero_section: DF.Link | None + hero_section_based_on: DF.Literal["Default", "Slideshow", "Homepage Section"] + slideshow: DF.Link | None + tag_line: DF.Data + title: DF.Data | None + # end: auto-generated types + def validate(self): if not self.description: self.description = frappe._("This is an example website auto-generated from ERPNext") diff --git a/erpnext/portal/doctype/homepage_section/homepage_section.py b/erpnext/portal/doctype/homepage_section/homepage_section.py index 7181affbea71..9499ce323258 100644 --- a/erpnext/portal/doctype/homepage_section/homepage_section.py +++ b/erpnext/portal/doctype/homepage_section/homepage_section.py @@ -7,6 +7,25 @@ class HomepageSection(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.portal.doctype.homepage_section_card.homepage_section_card import ( + HomepageSectionCard, + ) + + no_of_columns: DF.Literal["1", "2", "3", "4", "6"] + section_based_on: DF.Literal["Cards", "Custom HTML"] + section_cards: DF.Table[HomepageSectionCard] + section_html: DF.Code | None + section_order: DF.Int + # end: auto-generated types + @property def column_value(self): return cint(12 / cint(self.no_of_columns or 3)) diff --git a/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py b/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py index eeff63c3f35f..ce2fe31a9801 100644 --- a/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py +++ b/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py @@ -6,4 +6,22 @@ class HomepageSectionCard(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + content: DF.Text | None + image: DF.AttachImage | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + route: DF.Data | None + subtitle: DF.Data | None + title: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/portal/doctype/website_attribute/website_attribute.py b/erpnext/portal/doctype/website_attribute/website_attribute.py index 58a73768be26..2e4a1e326876 100644 --- a/erpnext/portal/doctype/website_attribute/website_attribute.py +++ b/erpnext/portal/doctype/website_attribute/website_attribute.py @@ -6,4 +6,18 @@ class WebsiteAttribute(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + attribute: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/portal/doctype/website_filter_field/website_filter_field.py b/erpnext/portal/doctype/website_filter_field/website_filter_field.py index 8067ebba0fa3..7c48e9dd2aec 100644 --- a/erpnext/portal/doctype/website_filter_field/website_filter_field.py +++ b/erpnext/portal/doctype/website_filter_field/website_filter_field.py @@ -6,4 +6,18 @@ class WebsiteFilterField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + fieldname: DF.Autocomplete | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.py b/erpnext/projects/doctype/activity_cost/activity_cost.py index b99aa1e37d56..257bcc425138 100644 --- a/erpnext/projects/doctype/activity_cost/activity_cost.py +++ b/erpnext/projects/doctype/activity_cost/activity_cost.py @@ -12,6 +12,23 @@ class DuplicationError(frappe.ValidationError): class ActivityCost(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + activity_type: DF.Link + billing_rate: DF.Currency + costing_rate: DF.Currency + department: DF.Link | None + employee: DF.Link | None + employee_name: DF.Data | None + title: DF.Data | None + # end: auto-generated types + def validate(self): self.set_title() self.check_unique() diff --git a/erpnext/projects/doctype/activity_type/activity_type.py b/erpnext/projects/doctype/activity_type/activity_type.py index 5151098bec33..b5903bbb11dc 100644 --- a/erpnext/projects/doctype/activity_type/activity_type.py +++ b/erpnext/projects/doctype/activity_type/activity_type.py @@ -6,4 +6,18 @@ class ActivityType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + activity_type: DF.Data + billing_rate: DF.Currency + costing_rate: DF.Currency + disabled: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/dependent_task/dependent_task.py b/erpnext/projects/doctype/dependent_task/dependent_task.py index 73ce8f9c3d34..f4c276263f39 100644 --- a/erpnext/projects/doctype/dependent_task/dependent_task.py +++ b/erpnext/projects/doctype/dependent_task/dependent_task.py @@ -6,4 +6,18 @@ class DependentTask(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + task: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/project_template/project_template.py b/erpnext/projects/doctype/project_template/project_template.py index 89afb1bd7708..c08fc9d87fc8 100644 --- a/erpnext/projects/doctype/project_template/project_template.py +++ b/erpnext/projects/doctype/project_template/project_template.py @@ -9,6 +9,22 @@ class ProjectTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.projects.doctype.project_template_task.project_template_task import ( + ProjectTemplateTask, + ) + + project_type: DF.Link | None + tasks: DF.Table[ProjectTemplateTask] + # end: auto-generated types + def validate(self): self.validate_dependencies() diff --git a/erpnext/projects/doctype/project_template_task/project_template_task.py b/erpnext/projects/doctype/project_template_task/project_template_task.py index 01ec93500c3a..d0d031b28f41 100644 --- a/erpnext/projects/doctype/project_template_task/project_template_task.py +++ b/erpnext/projects/doctype/project_template_task/project_template_task.py @@ -7,4 +7,19 @@ class ProjectTemplateTask(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + subject: DF.ReadOnly | None + task: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/project_type/project_type.py b/erpnext/projects/doctype/project_type/project_type.py index 4a3724d6a5eb..38e3155e876e 100644 --- a/erpnext/projects/doctype/project_type/project_type.py +++ b/erpnext/projects/doctype/project_type/project_type.py @@ -8,6 +8,18 @@ class ProjectType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.Text | None + project_type: DF.Data + # end: auto-generated types + def on_trash(self): if self.name == "External": frappe.throw(_("You cannot delete Project Type 'External'")) diff --git a/erpnext/projects/doctype/project_update/project_update.py b/erpnext/projects/doctype/project_update/project_update.py index 175f787a303d..53934d051d21 100644 --- a/erpnext/projects/doctype/project_update/project_update.py +++ b/erpnext/projects/doctype/project_update/project_update.py @@ -7,6 +7,25 @@ class ProjectUpdate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.projects.doctype.project_user.project_user import ProjectUser + + amended_from: DF.Link | None + date: DF.Date | None + naming_series: DF.Data | None + project: DF.Link + sent: DF.Check + time: DF.Time | None + users: DF.Table[ProjectUser] + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/project_user/project_user.py b/erpnext/projects/doctype/project_user/project_user.py index a52bcb170a0c..358a16a9e07b 100644 --- a/erpnext/projects/doctype/project_user/project_user.py +++ b/erpnext/projects/doctype/project_user/project_user.py @@ -6,4 +6,24 @@ class ProjectUser(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email: DF.ReadOnly | None + full_name: DF.ReadOnly | None + image: DF.ReadOnly | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project_status: DF.Text | None + user: DF.Link + view_attachments: DF.Check + welcome_email_sent: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/projects_settings/projects_settings.py b/erpnext/projects/doctype/projects_settings/projects_settings.py index db1dc45d7642..9d940184d98c 100644 --- a/erpnext/projects/doctype/projects_settings/projects_settings.py +++ b/erpnext/projects/doctype/projects_settings/projects_settings.py @@ -6,4 +6,17 @@ class ProjectsSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + ignore_employee_time_overlap: DF.Check + ignore_user_time_overlap: DF.Check + ignore_workstation_time_overlap: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 333d4d9b6adc..22df846e39d9 100755 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -18,6 +18,56 @@ class CircularReferenceError(frappe.ValidationError): class Task(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.projects.doctype.task_depends_on.task_depends_on import TaskDependsOn + + act_end_date: DF.Date | None + act_start_date: DF.Date | None + actual_time: DF.Float + closing_date: DF.Date | None + color: DF.Color | None + company: DF.Link | None + completed_by: DF.Link | None + completed_on: DF.Date | None + department: DF.Link | None + depends_on: DF.Table[TaskDependsOn] + depends_on_tasks: DF.Code | None + description: DF.TextEditor | None + duration: DF.Int + exp_end_date: DF.Date | None + exp_start_date: DF.Date | None + expected_time: DF.Float + is_group: DF.Check + is_milestone: DF.Check + is_template: DF.Check + issue: DF.Link | None + lft: DF.Int + old_parent: DF.Data | None + parent_task: DF.Link | None + priority: DF.Literal["Low", "Medium", "High", "Urgent"] + progress: DF.Percent + project: DF.Link | None + review_date: DF.Date | None + rgt: DF.Int + start: DF.Int + status: DF.Literal[ + "Open", "Working", "Pending Review", "Overdue", "Template", "Completed", "Cancelled" + ] + subject: DF.Data + task_weight: DF.Float + template_task: DF.Data | None + total_billing_amount: DF.Currency + total_costing_amount: DF.Currency + type: DF.Link | None + # end: auto-generated types + nsm_parent_field = "parent_task" def get_customer_details(self): diff --git a/erpnext/projects/doctype/task_depends_on/task_depends_on.py b/erpnext/projects/doctype/task_depends_on/task_depends_on.py index 0db1f81f28db..c1cc21a1a05e 100644 --- a/erpnext/projects/doctype/task_depends_on/task_depends_on.py +++ b/erpnext/projects/doctype/task_depends_on/task_depends_on.py @@ -6,4 +6,20 @@ class TaskDependsOn(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project: DF.Text | None + subject: DF.Text | None + task: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/task_type/task_type.py b/erpnext/projects/doctype/task_type/task_type.py index 08bed6973d03..40d69e2bf18f 100644 --- a/erpnext/projects/doctype/task_type/task_type.py +++ b/erpnext/projects/doctype/task_type/task_type.py @@ -7,4 +7,16 @@ class TaskType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + weight: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py index d527a3c92237..cd61da184960 100644 --- a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py +++ b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py @@ -6,4 +6,38 @@ class TimesheetDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + activity_type: DF.Link | None + base_billing_amount: DF.Currency + base_billing_rate: DF.Currency + base_costing_amount: DF.Currency + base_costing_rate: DF.Currency + billing_amount: DF.Currency + billing_hours: DF.Float + billing_rate: DF.Currency + completed: DF.Check + costing_amount: DF.Currency + costing_rate: DF.Currency + description: DF.SmallText | None + expected_hours: DF.Float + from_time: DF.Datetime | None + hours: DF.Float + is_billable: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project: DF.Link | None + project_name: DF.Data | None + sales_invoice: DF.Link | None + task: DF.Link | None + to_time: DF.Datetime | None + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/non_conformance/non_conformance.py b/erpnext/quality_management/doctype/non_conformance/non_conformance.py index a2198f374adc..5817b99956ea 100644 --- a/erpnext/quality_management/doctype/non_conformance/non_conformance.py +++ b/erpnext/quality_management/doctype/non_conformance/non_conformance.py @@ -7,4 +7,22 @@ class NonConformance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + corrective_action: DF.TextEditor | None + details: DF.TextEditor | None + full_name: DF.Data | None + preventive_action: DF.TextEditor | None + procedure: DF.Link + process_owner: DF.Data | None + status: DF.Literal["Open", "Resolved", "Cancelled"] + subject: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_action/quality_action.py b/erpnext/quality_management/doctype/quality_action/quality_action.py index f7cd94dad310..3ef46e394e30 100644 --- a/erpnext/quality_management/doctype/quality_action/quality_action.py +++ b/erpnext/quality_management/doctype/quality_action/quality_action.py @@ -6,5 +6,27 @@ class QualityAction(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.quality_management.doctype.quality_action_resolution.quality_action_resolution import ( + QualityActionResolution, + ) + + corrective_preventive: DF.Literal["Corrective", "Preventive"] + date: DF.Date | None + feedback: DF.Link | None + goal: DF.Link | None + procedure: DF.Link | None + resolutions: DF.Table[QualityActionResolution] + review: DF.Link | None + status: DF.Literal["Open", "Completed"] + # end: auto-generated types + def validate(self): self.status = "Open" if any([d.status == "Open" for d in self.resolutions]) else "Completed" diff --git a/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py b/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py index 7ede3e4de002..5bdd5135409e 100644 --- a/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py +++ b/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py @@ -7,4 +7,22 @@ class QualityActionResolution(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + completion_by: DF.Date | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + problem: DF.LongText | None + resolution: DF.TextEditor | None + responsible: DF.Link | None + status: DF.Literal["Open", "Completed"] + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py b/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py index cc8ce26b58fb..8dc806163f0b 100644 --- a/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py +++ b/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py @@ -7,6 +7,24 @@ class QualityFeedback(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.quality_management.doctype.quality_feedback_parameter.quality_feedback_parameter import ( + QualityFeedbackParameter, + ) + + document_name: DF.DynamicLink + document_type: DF.Literal["User", "Customer"] + parameters: DF.Table[QualityFeedbackParameter] + template: DF.Link + # end: auto-generated types + @frappe.whitelist() def set_parameters(self): if self.template and not getattr(self, "parameters", []): diff --git a/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py b/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py index ff2c84157668..a86ba32aafd3 100644 --- a/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py +++ b/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py @@ -7,4 +7,20 @@ class QualityFeedbackParameter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + feedback: DF.TextEditor | None + parameter: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rating: DF.Literal["", "1", "2", "3", "4", "5"] + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py b/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py index 4590f9d3a05d..df9def321944 100644 --- a/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py +++ b/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py @@ -7,4 +7,20 @@ class QualityFeedbackTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.quality_management.doctype.quality_feedback_template_parameter.quality_feedback_template_parameter import ( + QualityFeedbackTemplateParameter, + ) + + parameters: DF.Table[QualityFeedbackTemplateParameter] + template: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py b/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py index 13e215f954a5..7795dabf751e 100644 --- a/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py +++ b/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py @@ -7,4 +7,18 @@ class QualityFeedbackTemplateParameter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parameter: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_goal/quality_goal.py b/erpnext/quality_management/doctype/quality_goal/quality_goal.py index 22ba81073d1b..6bcc7439f51d 100644 --- a/erpnext/quality_management/doctype/quality_goal/quality_goal.py +++ b/erpnext/quality_management/doctype/quality_goal/quality_goal.py @@ -6,5 +6,56 @@ class QualityGoal(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.quality_management.doctype.quality_goal_objective.quality_goal_objective import ( + QualityGoalObjective, + ) + + date: DF.Literal[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + ] + frequency: DF.Literal["None", "Daily", "Weekly", "Monthly", "Quarterly"] + goal: DF.Data + objectives: DF.Table[QualityGoalObjective] + procedure: DF.Link | None + weekday: DF.Literal["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] + # end: auto-generated types + def validate(self): pass diff --git a/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py b/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py index eaa8db215635..325c2e4d22b5 100644 --- a/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py +++ b/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py @@ -7,4 +7,20 @@ class QualityGoalObjective(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + objective: DF.Text + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + target: DF.Data | None + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py b/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py index 481b3c17f119..a8dd5647af76 100644 --- a/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py +++ b/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py @@ -6,4 +6,24 @@ class QualityMeeting(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.quality_management.doctype.quality_meeting_agenda.quality_meeting_agenda import ( + QualityMeetingAgenda, + ) + from erpnext.quality_management.doctype.quality_meeting_minutes.quality_meeting_minutes import ( + QualityMeetingMinutes, + ) + + agenda: DF.Table[QualityMeetingAgenda] + minutes: DF.Table[QualityMeetingMinutes] + status: DF.Literal["Open", "Closed"] + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py b/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py index c2f5b3f17c19..edf4fd665b17 100644 --- a/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py +++ b/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py @@ -7,4 +7,18 @@ class QualityMeetingAgenda(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + agenda: DF.TextEditor | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py b/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py index f6998df35cb9..c6237d9804f1 100644 --- a/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py +++ b/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py @@ -7,4 +7,20 @@ class QualityMeetingMinutes(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_name: DF.DynamicLink | None + document_type: DF.Literal["Quality Review", "Quality Action", "Quality Feedback"] + minute: DF.TextEditor | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py index 6834abc9d41f..8a67d92d1c55 100644 --- a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py +++ b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py @@ -8,6 +8,29 @@ class QualityProcedure(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.quality_management.doctype.quality_procedure_process.quality_procedure_process import ( + QualityProcedureProcess, + ) + + is_group: DF.Check + lft: DF.Int + old_parent: DF.Data | None + parent_quality_procedure: DF.Link | None + process_owner: DF.Link | None + process_owner_full_name: DF.Data | None + processes: DF.Table[QualityProcedureProcess] + quality_procedure_name: DF.Data + rgt: DF.Int + # end: auto-generated types + nsm_parent_field = "parent_quality_procedure" def before_save(self): diff --git a/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py b/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py index a03c871a85dc..2626fbdb8b12 100644 --- a/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py +++ b/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py @@ -7,4 +7,19 @@ class QualityProcedureProcess(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + procedure: DF.Link | None + process_description: DF.TextEditor | None + # end: auto-generated types + pass diff --git a/erpnext/quality_management/doctype/quality_review/quality_review.py b/erpnext/quality_management/doctype/quality_review/quality_review.py index f691005566d6..bf4a4036d8b7 100644 --- a/erpnext/quality_management/doctype/quality_review/quality_review.py +++ b/erpnext/quality_management/doctype/quality_review/quality_review.py @@ -7,6 +7,26 @@ class QualityReview(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.quality_management.doctype.quality_review_objective.quality_review_objective import ( + QualityReviewObjective, + ) + + additional_information: DF.Text | None + date: DF.Date | None + goal: DF.Link + procedure: DF.Link | None + reviews: DF.Table[QualityReviewObjective] + status: DF.Literal["Open", "Passed", "Failed"] + # end: auto-generated types + def validate(self): # fetch targets from goal if not self.reviews: diff --git a/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py b/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py index 462a97118ef0..9406f58e1c47 100644 --- a/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py +++ b/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py @@ -7,4 +7,22 @@ class QualityReviewObjective(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + objective: DF.Text | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + review: DF.TextEditor | None + status: DF.Literal["Open", "Passed", "Failed"] + target: DF.Data | None + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py index c52685e330ad..bf338d6513bc 100644 --- a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py +++ b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py @@ -18,6 +18,24 @@ class ImportSupplierInvoice(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link + default_buying_price_list: DF.Link + invoice_series: DF.Literal["ACC-PINV-.YYYY.-"] + item_code: DF.Link + status: DF.Data | None + supplier_group: DF.Link + tax_account: DF.Link + zip_file: DF.Attach | None + # end: auto-generated types + def validate(self): if not frappe.db.get_value("Stock Settings", fieldname="stock_uom"): frappe.throw(_("Please set default UOM in Stock Settings")) diff --git a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py index 6ae04c165c45..72b3a49d2a1a 100644 --- a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py +++ b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py @@ -11,6 +11,26 @@ class LowerDeductionCertificate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + certificate_limit: DF.Currency + certificate_no: DF.Data + company: DF.Link + fiscal_year: DF.Link + pan_no: DF.Data + rate: DF.Percent + supplier: DF.Link + tax_withholding_category: DF.Link + valid_from: DF.Date + valid_upto: DF.Date + # end: auto-generated types + def validate(self): self.validate_dates() self.validate_supplier_against_tax_category() diff --git a/erpnext/regional/doctype/south_africa_vat_settings/south_africa_vat_settings.py b/erpnext/regional/doctype/south_africa_vat_settings/south_africa_vat_settings.py index 4c3e8a78e9de..aa3cd4b05afd 100644 --- a/erpnext/regional/doctype/south_africa_vat_settings/south_africa_vat_settings.py +++ b/erpnext/regional/doctype/south_africa_vat_settings/south_africa_vat_settings.py @@ -6,4 +6,20 @@ class SouthAfricaVATSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.south_africa_vat_account.south_africa_vat_account import ( + SouthAfricaVATAccount, + ) + + company: DF.Link + vat_accounts: DF.Table[SouthAfricaVATAccount] + # end: auto-generated types + pass diff --git a/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py b/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py index f2fc34d391a8..0a69aedb3284 100644 --- a/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py +++ b/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py @@ -7,4 +7,18 @@ class UAEVATAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py b/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py index 1af32e4be34e..95ffdd39f8e5 100644 --- a/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py +++ b/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py @@ -7,4 +7,18 @@ class UAEVATSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.regional.doctype.uae_vat_account.uae_vat_account import UAEVATAccount + + company: DF.Link + uae_vat_accounts: DF.Table[UAEVATAccount] + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 78611f0ed76d..7ef8fbbd6309 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -24,6 +24,70 @@ class Customer(TransactionBase): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + 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.selling.doctype.customer_credit_limit.customer_credit_limit import ( + CustomerCreditLimit, + ) + from erpnext.selling.doctype.sales_team.sales_team import SalesTeam + from erpnext.utilities.doctype.portal_user.portal_user import PortalUser + + account_manager: DF.Link | None + accounts: DF.Table[PartyAccount] + companies: DF.Table[AllowedToTransactWith] + credit_limits: DF.Table[CustomerCreditLimit] + customer_details: DF.Text | None + customer_group: DF.Link | None + customer_name: DF.Data + customer_pos_id: DF.Data | None + customer_primary_address: DF.Link | None + customer_primary_contact: DF.Link | None + customer_type: DF.Literal["Company", "Individual", "Proprietorship", "Partnership"] + default_bank_account: DF.Link | None + default_commission_rate: DF.Float + default_currency: DF.Link | None + default_price_list: DF.Link | None + default_sales_partner: DF.Link | None + disabled: DF.Check + dn_required: DF.Check + email_id: DF.ReadOnly | None + gender: DF.Link | None + image: DF.AttachImage | None + industry: DF.Link | None + is_frozen: DF.Check + is_internal_customer: DF.Check + language: DF.Link | None + lead_name: DF.Link | None + loyalty_program: DF.Link | None + loyalty_program_tier: DF.Data | None + market_segment: DF.Link | None + mobile_no: DF.ReadOnly | None + naming_series: DF.Literal["CUST-.YYYY.-"] + opportunity_name: DF.Link | None + payment_terms: DF.Link | None + portal_users: DF.Table[PortalUser] + primary_address: DF.Text | None + represents_company: DF.Link | None + sales_team: DF.Table[SalesTeam] + salutation: DF.Link | None + so_required: DF.Check + tax_category: DF.Link | None + tax_id: DF.Data | None + tax_withholding_category: DF.Link | None + territory: DF.Link | None + website: DF.Data | None + # end: auto-generated types + def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self) diff --git a/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py b/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py index 193027b89a41..fcc6c6e6db66 100644 --- a/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py +++ b/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py @@ -7,4 +7,20 @@ class CustomerCreditLimit(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + bypass_credit_limit_check: DF.Check + company: DF.Link | None + credit_limit: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/industry_type/industry_type.py b/erpnext/selling/doctype/industry_type/industry_type.py index fbe0131dd31a..aedec5fa9435 100644 --- a/erpnext/selling/doctype/industry_type/industry_type.py +++ b/erpnext/selling/doctype/industry_type/industry_type.py @@ -6,4 +6,15 @@ class IndustryType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + industry: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py index 0ef4754bc68e..d1bfd910f93c 100644 --- a/erpnext/selling/doctype/installation_note/installation_note.py +++ b/erpnext/selling/doctype/installation_note/installation_note.py @@ -11,6 +11,38 @@ class InstallationNote(TransactionBase): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.selling.doctype.installation_note_item.installation_note_item import ( + InstallationNoteItem, + ) + + address_display: DF.SmallText | None + amended_from: DF.Link | None + company: DF.Link + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + customer: DF.Link + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + inst_date: DF.Date + inst_time: DF.Time | None + items: DF.Table[InstallationNoteItem] + naming_series: DF.Literal["MAT-INS-.YYYY.-"] + remarks: DF.SmallText | None + status: DF.Literal["Draft", "Submitted", "Cancelled"] + territory: DF.Link + # end: auto-generated types + def __init__(self, *args, **kwargs): super(InstallationNote, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/selling/doctype/installation_note_item/installation_note_item.py b/erpnext/selling/doctype/installation_note_item/installation_note_item.py index 2169a7b6144e..8566ab06a4c0 100644 --- a/erpnext/selling/doctype/installation_note_item/installation_note_item.py +++ b/erpnext/selling/doctype/installation_note_item/installation_note_item.py @@ -6,4 +6,25 @@ class InstallationNoteItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor | None + item_code: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + prevdoc_detail_docname: DF.Data | None + prevdoc_docname: DF.Data | None + prevdoc_doctype: DF.Data | None + qty: DF.Float + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/party_specific_item/party_specific_item.py b/erpnext/selling/doctype/party_specific_item/party_specific_item.py index 0aef7d362e4d..cce29f0ed27a 100644 --- a/erpnext/selling/doctype/party_specific_item/party_specific_item.py +++ b/erpnext/selling/doctype/party_specific_item/party_specific_item.py @@ -7,6 +7,20 @@ class PartySpecificItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + based_on_value: DF.DynamicLink + party: DF.DynamicLink + party_type: DF.Literal["Customer", "Supplier"] + restrict_based_on: DF.Literal["Item", "Item Group", "Brand"] + # end: auto-generated types + def validate(self): exists = frappe.db.exists( { diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.py b/erpnext/selling/doctype/product_bundle/product_bundle.py index 3d4ffebbfb43..66327426ac8c 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.py +++ b/erpnext/selling/doctype/product_bundle/product_bundle.py @@ -9,6 +9,22 @@ class ProductBundle(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.selling.doctype.product_bundle_item.product_bundle_item import ProductBundleItem + + description: DF.Data | None + disabled: DF.Check + items: DF.Table[ProductBundleItem] + new_item_code: DF.Link + # end: auto-generated types + def autoname(self): self.name = self.new_item_code diff --git a/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py b/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py index 5c95a555c8f4..285ad5d5750f 100644 --- a/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py +++ b/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py @@ -6,4 +6,22 @@ class ProductBundleItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor | None + item_code: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + rate: DF.Float + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 95d2d2c57716..8d3bb7874074 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -13,6 +13,109 @@ class Quotation(SellingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + 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.sales_taxes_and_charges.sales_taxes_and_charges import ( + SalesTaxesandCharges, + ) + from erpnext.crm.doctype.competitor_detail.competitor_detail import CompetitorDetail + from erpnext.selling.doctype.quotation_item.quotation_item import QuotationItem + from erpnext.setup.doctype.quotation_lost_reason_detail.quotation_lost_reason_detail import ( + QuotationLostReasonDetail, + ) + from erpnext.stock.doctype.packed_item.packed_item import PackedItem + + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + amended_from: DF.Link | None + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + auto_repeat: DF.Link | None + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + campaign: DF.Link | None + company: DF.Link + company_address: DF.Link | None + company_address_display: DF.SmallText | None + competitors: DF.TableMultiSelect[CompetitorDetail] + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + coupon_code: DF.Link | None + currency: DF.Link + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + discount_amount: DF.Currency + enq_det: DF.Text | None + grand_total: DF.Currency + group_same_items: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + incoterm: DF.Link | None + items: DF.Table[QuotationItem] + language: DF.Data | None + letter_head: DF.Link | None + lost_reasons: DF.TableMultiSelect[QuotationLostReasonDetail] + named_place: DF.Data | None + naming_series: DF.Literal["SAL-QTN-.YYYY.-"] + net_total: DF.Currency + opportunity: DF.Link | None + order_lost_reason: DF.SmallText | None + order_type: DF.Literal["", "Sales", "Maintenance", "Shopping Cart"] + other_charges_calculation: DF.LongText | None + packed_items: DF.Table[PackedItem] + party_name: DF.DynamicLink | None + payment_schedule: DF.Table[PaymentSchedule] + payment_terms_template: DF.Link | None + plc_conversion_rate: DF.Float + price_list_currency: DF.Link + pricing_rules: DF.Table[PricingRuleDetail] + quotation_to: DF.Link + referral_sales_partner: DF.Link | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + selling_price_list: DF.Link + shipping_address: DF.SmallText | None + shipping_address_name: DF.Link | None + shipping_rule: DF.Link | None + source: DF.Link | None + status: DF.Literal[ + "Draft", "Open", "Replied", "Partially Ordered", "Ordered", "Lost", "Cancelled", "Expired" + ] + supplier_quotation: DF.Link | None + tax_category: DF.Link | None + taxes: DF.Table[SalesTaxesandCharges] + taxes_and_charges: DF.Link | None + tc_name: DF.Link | None + terms: DF.TextEditor | None + territory: DF.Link | None + title: DF.Data | None + total: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + transaction_date: DF.Date + valid_till: DF.Date | None + # end: auto-generated types + def set_indicator(self): if self.docstatus == 1: self.indicator_color = "blue" diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.py b/erpnext/selling/doctype/quotation_item/quotation_item.py index 8c2aabbf3fad..f209762c3ba6 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.py +++ b/erpnext/selling/doctype/quotation_item/quotation_item.py @@ -6,4 +6,67 @@ class QuotationItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + additional_notes: DF.Text | None + against_blanket_order: DF.Check + amount: DF.Currency + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + blanket_order: DF.Link | None + blanket_order_rate: DF.Currency + brand: DF.Link | None + conversion_factor: DF.Float + customer_item_code: DF.Data | None + description: DF.TextEditor | None + discount_amount: DF.Currency + discount_percentage: DF.Percent + gross_profit: DF.Currency + has_alternative_item: DF.Check + image: DF.Attach | None + is_alternative: DF.Check + is_free_item: DF.Check + item_code: DF.Link | None + item_group: DF.Link | None + item_name: DF.Data + item_tax_rate: DF.Code | None + item_tax_template: DF.Link | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + net_amount: DF.Currency + net_rate: DF.Currency + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + prevdoc_docname: DF.DynamicLink | None + prevdoc_doctype: DF.Link | None + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + projected_qty: DF.Float + qty: DF.Float + rate: DF.Currency + rate_with_margin: DF.Currency + stock_qty: DF.Float + stock_uom: DF.Link | None + stock_uom_rate: DF.Currency + total_weight: DF.Float + uom: DF.Link + valuation_rate: DF.Currency + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index a23599b18067..fd6c0273ef3a 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -46,6 +46,139 @@ class WarehouseRequired(frappe.ValidationError): class SalesOrder(SellingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + 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.sales_taxes_and_charges.sales_taxes_and_charges import ( + SalesTaxesandCharges, + ) + from erpnext.selling.doctype.sales_order_item.sales_order_item import SalesOrderItem + from erpnext.selling.doctype.sales_team.sales_team import SalesTeam + from erpnext.stock.doctype.packed_item.packed_item import PackedItem + + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + advance_paid: DF.Currency + amended_from: DF.Link | None + amount_eligible_for_commission: DF.Currency + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + auto_repeat: DF.Link | None + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + billing_status: DF.Literal["Not Billed", "Fully Billed", "Partly Billed", "Closed"] + campaign: DF.Link | None + commission_rate: DF.Float + company: DF.Link + company_address: DF.Link | None + company_address_display: DF.SmallText | None + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + contact_phone: DF.Data | None + conversion_rate: DF.Float + cost_center: DF.Link | None + coupon_code: DF.Link | None + currency: DF.Link + customer: DF.Link + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + delivery_date: DF.Date | None + delivery_status: DF.Literal[ + "Not Delivered", "Fully Delivered", "Partly Delivered", "Closed", "Not Applicable" + ] + disable_rounded_total: DF.Check + discount_amount: DF.Currency + dispatch_address: DF.SmallText | None + dispatch_address_name: DF.Link | None + from_date: DF.Date | None + grand_total: DF.Currency + group_same_items: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + incoterm: DF.Link | None + inter_company_order_reference: DF.Link | None + is_internal_customer: DF.Check + items: DF.Table[SalesOrderItem] + language: DF.Data | None + letter_head: DF.Link | None + loyalty_amount: DF.Currency + loyalty_points: DF.Int + named_place: DF.Data | None + naming_series: DF.Literal["SAL-ORD-.YYYY.-"] + net_total: DF.Currency + order_type: DF.Literal["", "Sales", "Maintenance", "Shopping Cart"] + other_charges_calculation: DF.LongText | None + packed_items: DF.Table[PackedItem] + party_account_currency: DF.Link | None + payment_schedule: DF.Table[PaymentSchedule] + payment_terms_template: DF.Link | None + per_billed: DF.Percent + per_delivered: DF.Percent + per_picked: DF.Percent + plc_conversion_rate: DF.Float + po_date: DF.Date | None + po_no: DF.Data | None + price_list_currency: DF.Link + pricing_rules: DF.Table[PricingRuleDetail] + project: DF.Link | None + represents_company: DF.Link | None + reserve_stock: DF.Check + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + sales_partner: DF.Link | None + sales_team: DF.Table[SalesTeam] + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + selling_price_list: DF.Link + set_warehouse: DF.Link | None + shipping_address: DF.SmallText | None + shipping_address_name: DF.Link | None + shipping_rule: DF.Link | None + skip_delivery_note: DF.Check + source: DF.Link | None + status: DF.Literal[ + "", + "Draft", + "On Hold", + "To Deliver and Bill", + "To Bill", + "To Deliver", + "Completed", + "Cancelled", + "Closed", + ] + tax_category: DF.Link | None + tax_id: DF.Data | None + taxes: DF.Table[SalesTaxesandCharges] + taxes_and_charges: DF.Link | None + tc_name: DF.Link | None + terms: DF.TextEditor | None + territory: DF.Link | None + title: DF.Data | None + to_date: DF.Date | None + total: DF.Currency + total_commission: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + transaction_date: DF.Date + # end: auto-generated types + def __init__(self, *args, **kwargs): super(SalesOrder, self).__init__(*args, **kwargs) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index 83d3f3bc0765..25f5b4b0e725 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -7,6 +7,90 @@ class SalesOrderItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + additional_notes: DF.Text | None + against_blanket_order: DF.Check + amount: DF.Currency + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + billed_amt: DF.Currency + blanket_order: DF.Link | None + blanket_order_rate: DF.Currency + bom_no: DF.Link | None + brand: DF.Link | None + conversion_factor: DF.Float + customer_item_code: DF.Data | None + delivered_by_supplier: DF.Check + delivered_qty: DF.Float + delivery_date: DF.Date | None + description: DF.TextEditor | None + discount_amount: DF.Currency + discount_percentage: DF.Percent + ensure_delivery_based_on_produced_serial_no: DF.Check + grant_commission: DF.Check + gross_profit: DF.Currency + image: DF.Attach | None + is_free_item: DF.Check + item_code: DF.Link | None + item_group: DF.Link | None + item_name: DF.Data + item_tax_rate: DF.Code | None + item_tax_template: DF.Link | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + material_request: DF.Link | None + material_request_item: DF.Data | None + net_amount: DF.Currency + net_rate: DF.Currency + ordered_qty: DF.Float + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + picked_qty: DF.Float + planned_qty: DF.Float + prevdoc_docname: DF.Link | None + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + produced_qty: DF.Float + production_plan_qty: DF.Float + projected_qty: DF.Float + purchase_order: DF.Link | None + purchase_order_item: DF.Data | None + qty: DF.Float + quotation_item: DF.Data | None + rate: DF.Currency + rate_with_margin: DF.Currency + reserve_stock: DF.Check + returned_qty: DF.Float + stock_qty: DF.Float + stock_reserved_qty: DF.Float + stock_uom: DF.Link | None + stock_uom_rate: DF.Currency + supplier: DF.Link | None + target_warehouse: DF.Link | None + total_weight: DF.Float + transaction_date: DF.Date | None + uom: DF.Link + valuation_rate: DF.Currency + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + work_order_qty: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py b/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py index 0a07073af05f..d156cccff6de 100644 --- a/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py +++ b/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py @@ -6,4 +6,15 @@ class SalesPartnerType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + sales_partner_type: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/sales_team/sales_team.py b/erpnext/selling/doctype/sales_team/sales_team.py index d3eae3a5978c..6b4d6d5c9d08 100644 --- a/erpnext/selling/doctype/sales_team/sales_team.py +++ b/erpnext/selling/doctype/sales_team/sales_team.py @@ -6,4 +6,23 @@ class SalesTeam(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allocated_amount: DF.Currency + allocated_percentage: DF.Float + commission_rate: DF.Data | None + contact_no: DF.Data | None + incentives: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + sales_person: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.py b/erpnext/selling/doctype/selling_settings/selling_settings.py index d977807e7dc9..24fe909a7a60 100644 --- a/erpnext/selling/doctype/selling_settings/selling_settings.py +++ b/erpnext/selling/doctype/selling_settings/selling_settings.py @@ -11,6 +11,37 @@ class SellingSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_against_multiple_purchase_orders: DF.Check + allow_multiple_items: DF.Check + allow_negative_rates_for_items: DF.Check + allow_sales_order_creation_for_expired_quotation: DF.Check + blanket_order_allowance: DF.Float + cust_master_name: DF.Literal["Customer Name", "Naming Series", "Auto Name"] + customer_group: DF.Link | None + dn_required: DF.Literal["No", "Yes"] + dont_reserve_sales_order_qty_on_sales_return: DF.Check + editable_bundle_item_rates: DF.Check + editable_price_list_rate: DF.Check + enable_discount_accounting: DF.Check + hide_tax_id: DF.Check + maintain_same_rate_action: DF.Literal["Stop", "Warn"] + maintain_same_sales_rate: DF.Check + role_to_override_stop_action: DF.Link | None + sales_update_frequency: DF.Literal["Monthly", "Each Transaction", "Daily"] + selling_price_list: DF.Link | None + so_required: DF.Literal["No", "Yes"] + territory: DF.Link | None + validate_selling_price: DF.Check + # end: auto-generated types + def on_update(self): self.toggle_hide_tax_id() self.toggle_editable_rate_for_bundle_items() diff --git a/erpnext/selling/doctype/sms_center/sms_center.py b/erpnext/selling/doctype/sms_center/sms_center.py index cdc7397e1ec5..99f035141c55 100644 --- a/erpnext/selling/doctype/sms_center/sms_center.py +++ b/erpnext/selling/doctype/sms_center/sms_center.py @@ -10,6 +10,35 @@ class SMSCenter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + branch: DF.Link | None + customer: DF.Link | None + department: DF.Link | None + message: DF.Text + receiver_list: DF.Code | None + sales_partner: DF.Link | None + send_to: DF.Literal[ + "", + "All Contact", + "All Customer Contact", + "All Supplier Contact", + "All Sales Partner Contact", + "All Lead (Open)", + "All Employee (Active)", + "All Sales Person", + ] + supplier: DF.Link | None + total_characters: DF.Int + total_messages: DF.Int + # end: auto-generated types + @frappe.whitelist() def create_receiver_list(self): rec, where_clause = "", "" diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py index fd5a2012c7da..feb14a8a4cb6 100644 --- a/erpnext/setup/doctype/authorization_control/authorization_control.py +++ b/erpnext/setup/doctype/authorization_control/authorization_control.py @@ -10,6 +10,16 @@ class AuthorizationControl(TransactionBase): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + # end: auto-generated types + def get_appr_user_role(self, det, doctype_name, total, based_on, condition, master_name, company): amt_list, appr_users, appr_roles = [], [], [] users, roles = "", "" diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.py b/erpnext/setup/doctype/authorization_rule/authorization_rule.py index 9e64e55ff460..b65a327ef799 100644 --- a/erpnext/setup/doctype/authorization_rule/authorization_rule.py +++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.py @@ -9,6 +9,45 @@ class AuthorizationRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + approving_role: DF.Link | None + approving_user: DF.Link | None + based_on: DF.Literal[ + "", + "Grand Total", + "Average Discount", + "Customerwise Discount", + "Itemwise Discount", + "Item Group wise Discount", + "Not Applicable", + ] + company: DF.Link | None + customer_or_item: DF.Literal["Customer", "Item", "Item Group"] + master_name: DF.DynamicLink | None + system_role: DF.Link | None + system_user: DF.Link | None + to_designation: DF.Link | None + to_emp: DF.Link | None + transaction: DF.Literal[ + "", + "Sales Order", + "Purchase Order", + "Quotation", + "Delivery Note", + "Sales Invoice", + "Purchase Invoice", + "Purchase Receipt", + ] + value: DF.Float + # end: auto-generated types + def check_duplicate_entry(self): exists = frappe.db.sql( """select name, docstatus from `tabAuthorization Rule` diff --git a/erpnext/setup/doctype/branch/branch.py b/erpnext/setup/doctype/branch/branch.py index 133ada05bf07..58d17829c679 100644 --- a/erpnext/setup/doctype/branch/branch.py +++ b/erpnext/setup/doctype/branch/branch.py @@ -6,4 +6,15 @@ class Branch(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + branch: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/brand/brand.py b/erpnext/setup/doctype/brand/brand.py index 1bb6fc9f16ce..cf3f4744391f 100644 --- a/erpnext/setup/doctype/brand/brand.py +++ b/erpnext/setup/doctype/brand/brand.py @@ -9,6 +9,22 @@ class Brand(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.item_default.item_default import ItemDefault + + brand: DF.Data + brand_defaults: DF.Table[ItemDefault] + description: DF.Text | None + image: DF.AttachImage | None + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index b05696ad9696..6b6dba4f1d06 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -19,6 +19,90 @@ class Company(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + abbr: DF.Data + accumulated_depreciation_account: DF.Link | None + allow_account_creation_against_child_company: DF.Check + asset_received_but_not_billed: DF.Link | None + auto_err_frequency: DF.Literal["Daily", "Weekly"] + auto_exchange_rate_revaluation: DF.Check + book_advance_payments_in_separate_party_account: DF.Check + capital_work_in_progress_account: DF.Link | None + chart_of_accounts: DF.Literal + company_description: DF.TextEditor | None + company_logo: DF.AttachImage | None + company_name: DF.Data + cost_center: DF.Link | None + country: DF.Link + create_chart_of_accounts_based_on: DF.Literal["", "Standard Template", "Existing Company"] + credit_limit: DF.Currency + date_of_commencement: DF.Date | None + date_of_establishment: DF.Date | None + date_of_incorporation: DF.Date | None + default_advance_paid_account: DF.Link | None + default_advance_received_account: DF.Link | None + default_bank_account: DF.Link | None + default_buying_terms: DF.Link | None + default_cash_account: DF.Link | None + default_currency: DF.Link + default_deferred_expense_account: DF.Link | None + default_deferred_revenue_account: DF.Link | None + default_discount_account: DF.Link | None + default_expense_account: DF.Link | None + default_finance_book: DF.Link | None + default_holiday_list: DF.Link | None + default_in_transit_warehouse: DF.Link | None + default_income_account: DF.Link | None + default_inventory_account: DF.Link | None + default_letter_head: DF.Link | None + default_payable_account: DF.Link | None + default_provisional_account: DF.Link | None + default_receivable_account: DF.Link | None + default_selling_terms: DF.Link | None + default_warehouse_for_sales_return: DF.Link | None + depreciation_cost_center: DF.Link | None + depreciation_expense_account: DF.Link | None + disposal_account: DF.Link | None + domain: DF.Data | None + email: DF.Data | None + enable_perpetual_inventory: DF.Check + enable_provisional_accounting_for_non_stock_items: DF.Check + exception_budget_approver_role: DF.Link | None + exchange_gain_loss_account: DF.Link | None + existing_company: DF.Link | None + fax: DF.Data | None + is_group: DF.Check + lft: DF.Int + monthly_sales_target: DF.Currency + old_parent: DF.Data | None + parent_company: DF.Link | None + payment_terms: DF.Link | None + phone_no: DF.Data | None + registration_details: DF.Code | None + rgt: DF.Int + round_off_account: DF.Link | None + round_off_cost_center: DF.Link | None + sales_monthly_history: DF.SmallText | None + series_for_depreciation_entry: DF.Data | None + stock_adjustment_account: DF.Link | None + stock_received_but_not_billed: DF.Link | None + submit_err_jv: DF.Check + tax_id: DF.Data | None + total_monthly_sales: DF.Currency + transactions_annual_history: DF.Code | None + unrealized_exchange_gain_loss_account: DF.Link | None + unrealized_profit_loss_account: DF.Link | None + website: DF.Data | None + write_off_account: DF.Link | None + # end: auto-generated types + nsm_parent_field = "parent_company" def onload(self): diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.py b/erpnext/setup/doctype/currency_exchange/currency_exchange.py index f9f3b3a7dcb2..735734b9daf3 100644 --- a/erpnext/setup/doctype/currency_exchange/currency_exchange.py +++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.py @@ -10,6 +10,22 @@ class CurrencyExchange(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + date: DF.Date + exchange_rate: DF.Float + for_buying: DF.Check + for_selling: DF.Check + from_currency: DF.Link + to_currency: DF.Link + # end: auto-generated types + def autoname(self): purpose = "" if not self.date: diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py index 246cc195e129..89b89addd423 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.py +++ b/erpnext/setup/doctype/customer_group/customer_group.py @@ -8,6 +8,31 @@ class CustomerGroup(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.party_account.party_account import PartyAccount + from erpnext.selling.doctype.customer_credit_limit.customer_credit_limit import ( + CustomerCreditLimit, + ) + + accounts: DF.Table[PartyAccount] + credit_limits: DF.Table[CustomerCreditLimit] + customer_group_name: DF.Data + default_price_list: DF.Link | None + is_group: DF.Check + lft: DF.Int + old_parent: DF.Link | None + parent_customer_group: DF.Link | None + payment_terms: DF.Link | None + rgt: DF.Int + # end: auto-generated types + nsm_parent_field = "parent_customer_group" def validate(self): diff --git a/erpnext/setup/doctype/department/department.py b/erpnext/setup/doctype/department/department.py index 1745178574b1..6b090f8af727 100644 --- a/erpnext/setup/doctype/department/department.py +++ b/erpnext/setup/doctype/department/department.py @@ -9,6 +9,24 @@ class Department(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + company: DF.Link + department_name: DF.Data + disabled: DF.Check + is_group: DF.Check + lft: DF.Int + old_parent: DF.Data | None + parent_department: DF.Link | None + rgt: DF.Int + # end: auto-generated types + nsm_parent_field = "parent_department" def autoname(self): diff --git a/erpnext/setup/doctype/designation/designation.py b/erpnext/setup/doctype/designation/designation.py index d7be55cad69b..9ba9e8058415 100644 --- a/erpnext/setup/doctype/designation/designation.py +++ b/erpnext/setup/doctype/designation/designation.py @@ -6,4 +6,16 @@ class Designation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.Text | None + designation_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/driver/driver.py b/erpnext/setup/doctype/driver/driver.py index 26981890ed69..4faa8e3fdcfe 100644 --- a/erpnext/setup/doctype/driver/driver.py +++ b/erpnext/setup/doctype/driver/driver.py @@ -6,4 +6,29 @@ class Driver(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.driving_license_category.driving_license_category import ( + DrivingLicenseCategory, + ) + + address: DF.Link | None + cell_number: DF.Data | None + driving_license_category: DF.Table[DrivingLicenseCategory] + employee: DF.Link | None + expiry_date: DF.Date | None + full_name: DF.Data + issuing_date: DF.Date | None + license_number: DF.Data | None + naming_series: DF.Literal["HR-DRI-.YYYY.-"] + status: DF.Literal["Active", "Suspended", "Left"] + transporter: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/driving_license_category/driving_license_category.py b/erpnext/setup/doctype/driving_license_category/driving_license_category.py index a1a6d55cb4c2..c06ce7dadb83 100644 --- a/erpnext/setup/doctype/driving_license_category/driving_license_category.py +++ b/erpnext/setup/doctype/driving_license_category/driving_license_category.py @@ -6,4 +6,20 @@ class DrivingLicenseCategory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.Data | None + expiry_date: DF.Date | None + issuing_date: DF.Date | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index 6ed44fff686c..53b353dd8a92 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -30,6 +30,50 @@ class EmailDigest(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.email_digest_recipient.email_digest_recipient import ( + EmailDigestRecipient, + ) + + add_quote: DF.Check + bank_balance: DF.Check + calendar_events: DF.Check + company: DF.Link + credit_balance: DF.Check + enabled: DF.Check + expense_year_to_date: DF.Check + expenses_booked: DF.Check + frequency: DF.Literal["Daily", "Weekly", "Monthly"] + income: DF.Check + income_year_to_date: DF.Check + invoiced_amount: DF.Check + issue: DF.Check + new_quotations: DF.Check + next_send: DF.Data | None + notifications: DF.Check + payables: DF.Check + pending_quotations: DF.Check + project: DF.Check + purchase_invoice: DF.Check + purchase_order: DF.Check + purchase_orders_items_overdue: DF.Check + purchase_orders_to_bill: DF.Check + purchase_orders_to_receive: DF.Check + recipients: DF.TableMultiSelect[EmailDigestRecipient] + sales_invoice: DF.Check + sales_order: DF.Check + sales_orders_to_bill: DF.Check + sales_orders_to_deliver: DF.Check + todo_list: DF.Check + # end: auto-generated types + def __init__(self, *args, **kwargs): super(EmailDigest, self).__init__(*args, **kwargs) diff --git a/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py b/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py index 06bf6273c079..3316ca03c586 100644 --- a/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py +++ b/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py @@ -7,4 +7,18 @@ class EmailDigestRecipient(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + recipient: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/employee_education/employee_education.py b/erpnext/setup/doctype/employee_education/employee_education.py index ded583bf01d2..8ef77f5ab690 100644 --- a/erpnext/setup/doctype/employee_education/employee_education.py +++ b/erpnext/setup/doctype/employee_education/employee_education.py @@ -6,4 +6,23 @@ class EmployeeEducation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + class_per: DF.Data | None + level: DF.Literal["Graduate", "Post Graduate", "Under Graduate"] + maj_opt_subj: DF.Text | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qualification: DF.Data | None + school_univ: DF.SmallText | None + year_of_passing: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/employee_external_work_history/employee_external_work_history.py b/erpnext/setup/doctype/employee_external_work_history/employee_external_work_history.py index d594fbf0f0c1..96b9064be0a5 100644 --- a/erpnext/setup/doctype/employee_external_work_history/employee_external_work_history.py +++ b/erpnext/setup/doctype/employee_external_work_history/employee_external_work_history.py @@ -6,4 +6,23 @@ class EmployeeExternalWorkHistory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + address: DF.SmallText | None + company_name: DF.Data | None + contact: DF.Data | None + designation: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + salary: DF.Currency + total_experience: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/employee_group/employee_group.py b/erpnext/setup/doctype/employee_group/employee_group.py index c4ce083c9424..1891328c1ce1 100644 --- a/erpnext/setup/doctype/employee_group/employee_group.py +++ b/erpnext/setup/doctype/employee_group/employee_group.py @@ -6,4 +6,18 @@ class EmployeeGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.employee_group_table.employee_group_table import EmployeeGroupTable + + employee_group_name: DF.Data + employee_list: DF.Table[EmployeeGroupTable] + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/employee_group_table/employee_group_table.py b/erpnext/setup/doctype/employee_group_table/employee_group_table.py index adf6ca2668c6..3775e0ce14ee 100644 --- a/erpnext/setup/doctype/employee_group_table/employee_group_table.py +++ b/erpnext/setup/doctype/employee_group_table/employee_group_table.py @@ -6,4 +6,20 @@ class EmployeeGroupTable(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + employee: DF.Link | None + employee_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + user_id: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/employee_internal_work_history/employee_internal_work_history.py b/erpnext/setup/doctype/employee_internal_work_history/employee_internal_work_history.py index 6225de601486..9f62684f3393 100644 --- a/erpnext/setup/doctype/employee_internal_work_history/employee_internal_work_history.py +++ b/erpnext/setup/doctype/employee_internal_work_history/employee_internal_work_history.py @@ -6,4 +6,22 @@ class EmployeeInternalWorkHistory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + branch: DF.Link | None + department: DF.Link | None + designation: DF.Link | None + from_date: DF.Date | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + to_date: DF.Date | None + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/global_defaults/global_defaults.py b/erpnext/setup/doctype/global_defaults/global_defaults.py index fc80483e8eef..4b7f642747e2 100644 --- a/erpnext/setup/doctype/global_defaults/global_defaults.py +++ b/erpnext/setup/doctype/global_defaults/global_defaults.py @@ -23,6 +23,24 @@ class GlobalDefaults(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + country: DF.Link | None + default_company: DF.Link | None + default_currency: DF.Link + default_distance_unit: DF.Link | None + demo_company: DF.Link | None + disable_in_words: DF.Check + disable_rounded_total: DF.Check + hide_currency_symbol: DF.Literal["", "No", "Yes"] + # end: auto-generated types + def on_update(self): """update defaults""" for key in keydict: diff --git a/erpnext/setup/doctype/holiday/holiday.py b/erpnext/setup/doctype/holiday/holiday.py index 85ca0b74fc7a..b22620321621 100644 --- a/erpnext/setup/doctype/holiday/holiday.py +++ b/erpnext/setup/doctype/holiday/holiday.py @@ -6,4 +6,20 @@ class Holiday(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor + holiday_date: DF.Date + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + weekly_off: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/holiday_list/holiday_list.py b/erpnext/setup/doctype/holiday_list/holiday_list.py index df5b40762c16..1afee41ac332 100644 --- a/erpnext/setup/doctype/holiday_list/holiday_list.py +++ b/erpnext/setup/doctype/holiday_list/holiday_list.py @@ -16,6 +16,29 @@ class OverlapError(frappe.ValidationError): class HolidayList(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.holiday.holiday import Holiday + + color: DF.Color | None + country: DF.Autocomplete | None + from_date: DF.Date + holiday_list_name: DF.Data + holidays: DF.Table[Holiday] + subdivision: DF.Autocomplete | None + to_date: DF.Date + total_holidays: DF.Int + weekly_off: DF.Literal[ + "", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + ] + # end: auto-generated types + def validate(self): self.validate_days() self.total_holidays = len(self.holidays) diff --git a/erpnext/setup/doctype/incoterm/incoterm.py b/erpnext/setup/doctype/incoterm/incoterm.py index 7e2e622c24bb..17305e9fde0c 100644 --- a/erpnext/setup/doctype/incoterm/incoterm.py +++ b/erpnext/setup/doctype/incoterm/incoterm.py @@ -6,6 +6,19 @@ class Incoterm(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + code: DF.Data + description: DF.LongText | None + title: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index fe7a241dc49c..fd65ab6417f4 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -9,6 +9,28 @@ class ItemGroup(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.item_default.item_default import ItemDefault + from erpnext.stock.doctype.item_tax.item_tax import ItemTax + + image: DF.AttachImage | None + is_group: DF.Check + item_group_defaults: DF.Table[ItemDefault] + item_group_name: DF.Data + lft: DF.Int + old_parent: DF.Link | None + parent_item_group: DF.Link | None + rgt: DF.Int + taxes: DF.Table[ItemTax] + # end: auto-generated types + def validate(self): if not self.parent_item_group and not frappe.flags.in_test: if frappe.db.exists("Item Group", _("All Item Groups")): diff --git a/erpnext/setup/doctype/party_type/party_type.py b/erpnext/setup/doctype/party_type/party_type.py index cf7cba845282..76b985be6c31 100644 --- a/erpnext/setup/doctype/party_type/party_type.py +++ b/erpnext/setup/doctype/party_type/party_type.py @@ -7,6 +7,18 @@ class PartyType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_type: DF.Literal["Payable", "Receivable"] + party_type: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/print_heading/print_heading.py b/erpnext/setup/doctype/print_heading/print_heading.py index 3a2f15f4b2a7..8e1a8fba2f11 100644 --- a/erpnext/setup/doctype/print_heading/print_heading.py +++ b/erpnext/setup/doctype/print_heading/print_heading.py @@ -6,4 +6,16 @@ class PrintHeading(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + print_heading: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py index 651705c6e5bd..fb9730e3d7d7 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py @@ -6,4 +6,15 @@ class QuotationLostReason(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + order_lost_reason: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py b/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py index dda64e9c6240..87f700b36c5f 100644 --- a/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py +++ b/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py @@ -7,4 +7,18 @@ class QuotationLostReasonDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + lost_reason: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.py b/erpnext/setup/doctype/sales_partner/sales_partner.py index c3136715fe51..1047360b8464 100644 --- a/erpnext/setup/doctype/sales_partner/sales_partner.py +++ b/erpnext/setup/doctype/sales_partner/sales_partner.py @@ -9,6 +9,30 @@ class SalesPartner(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.target_detail.target_detail import TargetDetail + + commission_rate: DF.Float + description: DF.TextEditor | None + introduction: DF.Text | None + logo: DF.Attach | None + partner_name: DF.Data + partner_type: DF.Link | None + partner_website: DF.Data | None + referral_code: DF.Data | None + route: DF.Data | None + show_in_website: DF.Check + targets: DF.Table[TargetDetail] + territory: DF.Link + # end: auto-generated types + website = frappe._dict( page_title_field="partner_name", condition_field="show_in_website", diff --git a/erpnext/setup/doctype/sales_person/sales_person.py b/erpnext/setup/doctype/sales_person/sales_person.py index beff7f5374ca..c2615d37c289 100644 --- a/erpnext/setup/doctype/sales_person/sales_person.py +++ b/erpnext/setup/doctype/sales_person/sales_person.py @@ -16,6 +16,29 @@ class SalesPerson(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.target_detail.target_detail import TargetDetail + + commission_rate: DF.Data | None + department: DF.Link | None + employee: DF.Link | None + enabled: DF.Check + is_group: DF.Check + lft: DF.Int + old_parent: DF.Data | None + parent_sales_person: DF.Link | None + rgt: DF.Int + sales_person_name: DF.Data + targets: DF.Table[TargetDetail] + # end: auto-generated types + nsm_parent_field = "parent_sales_person" def validate(self): diff --git a/erpnext/setup/doctype/supplier_group/supplier_group.py b/erpnext/setup/doctype/supplier_group/supplier_group.py index 9d2b733b743b..b639b9625091 100644 --- a/erpnext/setup/doctype/supplier_group/supplier_group.py +++ b/erpnext/setup/doctype/supplier_group/supplier_group.py @@ -7,6 +7,26 @@ class SupplierGroup(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.party_account.party_account import PartyAccount + + accounts: DF.Table[PartyAccount] + is_group: DF.Check + lft: DF.Int + old_parent: DF.Link | None + parent_supplier_group: DF.Link | None + payment_terms: DF.Link | None + rgt: DF.Int + supplier_group_name: DF.Data + # end: auto-generated types + nsm_parent_field = "parent_supplier_group" def validate(self): diff --git a/erpnext/setup/doctype/target_detail/target_detail.py b/erpnext/setup/doctype/target_detail/target_detail.py index e27f5b6020dc..86d94b2ad4de 100644 --- a/erpnext/setup/doctype/target_detail/target_detail.py +++ b/erpnext/setup/doctype/target_detail/target_detail.py @@ -6,4 +6,22 @@ class TargetDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + distribution_id: DF.Link + fiscal_year: DF.Link + item_group: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + target_amount: DF.Float + target_qty: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py index 344f6c6a19d8..73b5919f4deb 100644 --- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py +++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py @@ -12,6 +12,21 @@ class TermsandConditions(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + buying: DF.Check + disabled: DF.Check + selling: DF.Check + terms: DF.TextEditor | None + title: DF.Data + # end: auto-generated types + def validate(self): if self.terms: validate_template(self.terms) diff --git a/erpnext/setup/doctype/territory/territory.py b/erpnext/setup/doctype/territory/territory.py index 9bb5569de5b6..1cc3f6272de2 100644 --- a/erpnext/setup/doctype/territory/territory.py +++ b/erpnext/setup/doctype/territory/territory.py @@ -9,6 +9,26 @@ class Territory(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.target_detail.target_detail import TargetDetail + + is_group: DF.Check + lft: DF.Int + old_parent: DF.Link | None + parent_territory: DF.Link | None + rgt: DF.Int + targets: DF.Table[TargetDetail] + territory_manager: DF.Link | None + territory_name: DF.Data + # end: auto-generated types + nsm_parent_field = "parent_territory" def validate(self): diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index d266285b29a3..7182201517e8 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -10,6 +10,25 @@ class TransactionDeletionRecord(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.setup.doctype.transaction_deletion_record_item.transaction_deletion_record_item import ( + TransactionDeletionRecordItem, + ) + + amended_from: DF.Link | None + company: DF.Link + doctypes: DF.Table[TransactionDeletionRecordItem] + doctypes_to_be_ignored: DF.Table[TransactionDeletionRecordItem] + status: DF.Literal["Draft", "Completed"] + # end: auto-generated types + def __init__(self, *args, **kwargs): super(TransactionDeletionRecord, self).__init__(*args, **kwargs) self.batch_size = 5000 diff --git a/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py b/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py index 92ca8a2ac730..f154cdb24741 100644 --- a/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py +++ b/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py @@ -7,4 +7,19 @@ class TransactionDeletionRecordItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + doctype_name: DF.Link + no_of_docs: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/uom/uom.py b/erpnext/setup/doctype/uom/uom.py index ddb512a08520..0e674c1fae74 100644 --- a/erpnext/setup/doctype/uom/uom.py +++ b/erpnext/setup/doctype/uom/uom.py @@ -6,4 +6,17 @@ class UOM(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + enabled: DF.Check + must_be_whole_number: DF.Check + uom_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py b/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py index 12642fe7e256..00d20009479a 100644 --- a/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py +++ b/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py @@ -6,4 +6,18 @@ class UOMConversionFactor(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + category: DF.Link + from_uom: DF.Link + to_uom: DF.Link + value: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/setup/doctype/vehicle/vehicle.py b/erpnext/setup/doctype/vehicle/vehicle.py index 6a1b75ca0bd4..4a6146b5e1cc 100644 --- a/erpnext/setup/doctype/vehicle/vehicle.py +++ b/erpnext/setup/doctype/vehicle/vehicle.py @@ -9,6 +9,36 @@ class Vehicle(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + acquisition_date: DF.Date | None + amended_from: DF.Link | None + carbon_check_date: DF.Date | None + chassis_no: DF.Data | None + color: DF.Data | None + doors: DF.Int + employee: DF.Link | None + end_date: DF.Date | None + fuel_type: DF.Literal["Petrol", "Diesel", "Natural Gas", "Electric"] + insurance_company: DF.Data | None + last_odometer: DF.Int + license_plate: DF.Data + location: DF.Data | None + make: DF.Data + model: DF.Data + policy_no: DF.Data | None + start_date: DF.Date | None + uom: DF.Link + vehicle_value: DF.Currency + wheels: DF.Int + # end: auto-generated types + def validate(self): if getdate(self.start_date) > getdate(self.end_date): frappe.throw(_("Insurance Start date should be less than Insurance End date")) diff --git a/erpnext/setup/doctype/website_item_group/website_item_group.py b/erpnext/setup/doctype/website_item_group/website_item_group.py index 87fcb984530a..3d2b6e8e34e5 100644 --- a/erpnext/setup/doctype/website_item_group/website_item_group.py +++ b/erpnext/setup/doctype/website_item_group/website_item_group.py @@ -8,4 +8,18 @@ class WebsiteItemGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_group: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 5919d7c7f8fe..7b23f9ec0153 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -87,6 +87,33 @@ def get_batch_naming_series(): class Batch(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + batch_id: DF.Data + batch_qty: DF.Float + description: DF.SmallText | None + disabled: DF.Check + expiry_date: DF.Date | None + image: DF.AttachImage | None + item: DF.Link + item_name: DF.Data | None + manufacturing_date: DF.Date | None + parent_batch: DF.Link | None + produced_qty: DF.Float + qty_to_produce: DF.Float + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + stock_uom: DF.Link | None + supplier: DF.Link | None + use_batchwise_valuation: DF.Check + # end: auto-generated types + def autoname(self): """Generate random ID for batch if not specified""" diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index 8b2e5cf9ecb7..93109858a6d8 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -10,6 +10,31 @@ class Bin(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + indented_qty: DF.Float + item_code: DF.Link + ordered_qty: DF.Float + planned_qty: DF.Float + projected_qty: DF.Float + reserved_qty: DF.Float + reserved_qty_for_production: DF.Float + reserved_qty_for_production_plan: DF.Float + reserved_qty_for_sub_contract: DF.Float + reserved_stock: DF.Float + stock_uom: DF.Link | None + stock_value: DF.Float + valuation_rate: DF.Float + warehouse: DF.Link + # end: auto-generated types + def before_save(self): if self.get("__islocal") or not self.stock_uom: self.stock_uom = frappe.get_cached_value("Item", self.item_code, "stock_uom") diff --git a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py index b0499bfe86b3..7db8522f639b 100644 --- a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py +++ b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py @@ -15,6 +15,27 @@ class ClosingStockBalance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + company: DF.Link | None + from_date: DF.Date | None + include_uom: DF.Link | None + item_code: DF.Link | None + item_group: DF.Link | None + naming_series: DF.Literal["CBAL-.#####"] + status: DF.Literal["Draft", "Queued", "In Progress", "Completed", "Failed", "Canceled"] + to_date: DF.Date | None + warehouse: DF.Link | None + warehouse_type: DF.Link | None + # end: auto-generated types + def before_save(self): self.set_status() diff --git a/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py b/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py index b52acb1ad652..d0328292e2b3 100644 --- a/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py +++ b/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py @@ -6,4 +6,16 @@ class CustomsTariffNumber(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.Data | None + tariff_number: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index f240136e9c28..e44736b56ec0 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -18,6 +18,128 @@ class DeliveryNote(SellingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail + from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import ( + SalesTaxesandCharges, + ) + from erpnext.selling.doctype.sales_team.sales_team import SalesTeam + from erpnext.stock.doctype.delivery_note_item.delivery_note_item import DeliveryNoteItem + from erpnext.stock.doctype.packed_item.packed_item import PackedItem + + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + amended_from: DF.Link | None + amount_eligible_for_commission: DF.Currency + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + auto_repeat: DF.Link | None + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + campaign: DF.Link | None + commission_rate: DF.Float + company: DF.Link + company_address: DF.Link | None + company_address_display: DF.SmallText | None + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + currency: DF.Link + customer: DF.Link + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + disable_rounded_total: DF.Check + discount_amount: DF.Currency + dispatch_address: DF.SmallText | None + dispatch_address_name: DF.Link | None + driver: DF.Link | None + driver_name: DF.Data | None + excise_page: DF.Data | None + grand_total: DF.Currency + group_same_items: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + incoterm: DF.Link | None + installation_status: DF.Literal + instructions: DF.Text | None + inter_company_reference: DF.Link | None + is_internal_customer: DF.Check + is_return: DF.Check + issue_credit_note: DF.Check + items: DF.Table[DeliveryNoteItem] + language: DF.Data | None + letter_head: DF.Link | None + lr_date: DF.Date | None + lr_no: DF.Data | None + named_place: DF.Data | None + naming_series: DF.Literal["MAT-DN-.YYYY.-", "MAT-DN-RET-.YYYY.-"] + net_total: DF.Currency + other_charges_calculation: DF.LongText | None + packed_items: DF.Table[PackedItem] + per_billed: DF.Percent + per_installed: DF.Percent + per_returned: DF.Percent + pick_list: DF.Link | None + plc_conversion_rate: DF.Float + po_date: DF.Date | None + po_no: DF.SmallText | None + posting_date: DF.Date + posting_time: DF.Time + price_list_currency: DF.Link + pricing_rules: DF.Table[PricingRuleDetail] + print_without_amount: DF.Check + project: DF.Link | None + represents_company: DF.Link | None + return_against: DF.Link | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + sales_partner: DF.Link | None + sales_team: DF.Table[SalesTeam] + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + selling_price_list: DF.Link + set_posting_time: DF.Check + set_target_warehouse: DF.Link | None + set_warehouse: DF.Link | None + shipping_address: DF.SmallText | None + shipping_address_name: DF.Link | None + shipping_rule: DF.Link | None + source: DF.Link | None + status: DF.Literal["", "Draft", "To Bill", "Completed", "Return Issued", "Cancelled", "Closed"] + tax_category: DF.Link | None + tax_id: DF.Data | None + taxes: DF.Table[SalesTaxesandCharges] + taxes_and_charges: DF.Link | None + tc_name: DF.Link | None + terms: DF.TextEditor | None + territory: DF.Link | None + title: DF.Data | None + total: DF.Currency + total_commission: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + transporter: DF.Link | None + transporter_name: DF.Data | None + vehicle_no: DF.Data | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(DeliveryNote, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py index cd0d7251aee0..c11c4103e59b 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py @@ -6,4 +6,85 @@ class DeliveryNoteItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_batch_qty: DF.Float + actual_qty: DF.Float + against_sales_invoice: DF.Link | None + against_sales_order: DF.Link | None + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + barcode: DF.Data | None + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + batch_no: DF.Link | None + billed_amt: DF.Currency + brand: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + customer_item_code: DF.Data | None + description: DF.TextEditor | None + discount_amount: DF.Currency + discount_percentage: DF.Float + dn_detail: DF.Data | None + expense_account: DF.Link | None + grant_commission: DF.Check + has_item_scanned: DF.Check + image: DF.Attach | None + incoming_rate: DF.Currency + installed_qty: DF.Float + is_free_item: DF.Check + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data + item_tax_rate: DF.SmallText | None + item_tax_template: DF.Link | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + material_request: DF.Link | None + material_request_item: DF.Data | None + net_amount: DF.Currency + net_rate: DF.Currency + packed_qty: DF.Float + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + pick_list_item: DF.Data | None + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + project: DF.Link | None + purchase_order: DF.Link | None + purchase_order_item: DF.Data | None + qty: DF.Float + quality_inspection: DF.Link | None + rate: DF.Currency + rate_with_margin: DF.Currency + received_qty: DF.Float + returned_qty: DF.Float + serial_and_batch_bundle: DF.Link | None + serial_no: DF.Text | None + si_detail: DF.Data | None + so_detail: DF.Data | None + stock_qty: DF.Float + stock_uom: DF.Link + stock_uom_rate: DF.Currency + target_warehouse: DF.Link | None + total_weight: DF.Float + uom: DF.Link + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/delivery_settings/delivery_settings.py b/erpnext/stock/doctype/delivery_settings/delivery_settings.py index ab1ca80e3936..776fbcbd1bf5 100644 --- a/erpnext/stock/doctype/delivery_settings/delivery_settings.py +++ b/erpnext/stock/doctype/delivery_settings/delivery_settings.py @@ -6,4 +6,18 @@ class DeliverySettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + dispatch_attachment: DF.Link | None + dispatch_template: DF.Link | None + send_with_attachment: DF.Check + stop_delay: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/delivery_stop/delivery_stop.py b/erpnext/stock/doctype/delivery_stop/delivery_stop.py index 9da8bfa9869d..fbfbe9426451 100644 --- a/erpnext/stock/doctype/delivery_stop/delivery_stop.py +++ b/erpnext/stock/doctype/delivery_stop/delivery_stop.py @@ -6,4 +6,33 @@ class DeliveryStop(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + address: DF.Link + contact: DF.Link | None + customer: DF.Link | None + customer_address: DF.SmallText | None + customer_contact: DF.SmallText | None + delivery_note: DF.Link | None + details: DF.TextEditor | None + distance: DF.Float + email_sent_to: DF.Data | None + estimated_arrival: DF.Datetime | None + grand_total: DF.Currency + lat: DF.Float + lng: DF.Float + locked: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + uom: DF.Link | None + visited: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.py b/erpnext/stock/doctype/delivery_trip/delivery_trip.py index c531a8769c08..cb9fc5b087c7 100644 --- a/erpnext/stock/doctype/delivery_trip/delivery_trip.py +++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.py @@ -12,6 +12,33 @@ class DeliveryTrip(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.delivery_stop.delivery_stop import DeliveryStop + + amended_from: DF.Link | None + company: DF.Link + delivery_stops: DF.Table[DeliveryStop] + departure_time: DF.Datetime + driver: DF.Link | None + driver_address: DF.Link | None + driver_email: DF.Data | None + driver_name: DF.Data | None + email_notification_sent: DF.Check + employee: DF.Link | None + naming_series: DF.Literal["MAT-DT-.YYYY.-"] + status: DF.Literal["Draft", "Scheduled", "In Transit", "Completed", "Cancelled"] + total_distance: DF.Float + uom: DF.Link | None + vehicle: DF.Link + # end: auto-generated types + def __init__(self, *args, **kwargs): super(DeliveryTrip, self).__init__(*args, **kwargs) diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 257d18fc33a2..60624d4164b1 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -20,6 +20,30 @@ class CanNotBeDefaultDimension(frappe.ValidationError): class InventoryDimension(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + apply_to_all_doctypes: DF.Check + condition: DF.Code | None + dimension_name: DF.Data + disabled: DF.Check + document_type: DF.Link | None + fetch_from_parent: DF.Literal + istable: DF.Check + mandatory_depends_on: DF.SmallText | None + reference_document: DF.Link + reqd: DF.Check + source_fieldname: DF.Data | None + target_fieldname: DF.Data | None + type_of_transaction: DF.Literal["", "Inward", "Outward", "Both"] + validate_negative_stock: DF.Check + # end: auto-generated types + def onload(self): if not self.is_new() and frappe.db.has_column("Stock Ledger Entry", self.target_fieldname): self.set_onload("has_stock_ledger", self.has_stock_ledger()) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index cb34497f2805..2d9e11ab84fa 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -52,6 +52,106 @@ class DataValidationError(frappe.ValidationError): class Item(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.item_barcode.item_barcode import ItemBarcode + from erpnext.stock.doctype.item_customer_detail.item_customer_detail import ItemCustomerDetail + from erpnext.stock.doctype.item_default.item_default import ItemDefault + from erpnext.stock.doctype.item_reorder.item_reorder import ItemReorder + from erpnext.stock.doctype.item_supplier.item_supplier import ItemSupplier + from erpnext.stock.doctype.item_tax.item_tax import ItemTax + from erpnext.stock.doctype.item_variant_attribute.item_variant_attribute import ( + ItemVariantAttribute, + ) + from erpnext.stock.doctype.uom_conversion_detail.uom_conversion_detail import UOMConversionDetail + + allow_alternative_item: DF.Check + allow_negative_stock: DF.Check + asset_category: DF.Link | None + asset_naming_series: DF.Literal + attributes: DF.Table[ItemVariantAttribute] + auto_create_assets: DF.Check + barcodes: DF.Table[ItemBarcode] + batch_number_series: DF.Data | None + brand: DF.Link | None + country_of_origin: DF.Link | None + create_new_batch: DF.Check + customer: DF.Link | None + customer_code: DF.SmallText | None + customer_items: DF.Table[ItemCustomerDetail] + customs_tariff_number: DF.Link | None + default_bom: DF.Link | None + default_item_manufacturer: DF.Link | None + default_manufacturer_part_no: DF.Data | None + default_material_request_type: DF.Literal[ + "Purchase", "Material Transfer", "Material Issue", "Manufacture", "Customer Provided" + ] + delivered_by_supplier: DF.Check + description: DF.TextEditor | None + disabled: DF.Check + enable_deferred_expense: DF.Check + enable_deferred_revenue: DF.Check + end_of_life: DF.Date | None + grant_commission: DF.Check + has_batch_no: DF.Check + has_expiry_date: DF.Check + has_serial_no: DF.Check + has_variants: DF.Check + image: DF.AttachImage | None + include_item_in_manufacturing: DF.Check + inspection_required_before_delivery: DF.Check + inspection_required_before_purchase: DF.Check + is_customer_provided_item: DF.Check + is_fixed_asset: DF.Check + is_grouped_asset: DF.Check + is_purchase_item: DF.Check + is_sales_item: DF.Check + is_stock_item: DF.Check + is_sub_contracted_item: DF.Check + item_code: DF.Data + item_defaults: DF.Table[ItemDefault] + item_group: DF.Link + item_name: DF.Data | None + last_purchase_rate: DF.Float + lead_time_days: DF.Int + max_discount: DF.Float + min_order_qty: DF.Float + naming_series: DF.Literal["STO-ITEM-.YYYY.-"] + no_of_months: DF.Int + no_of_months_exp: DF.Int + opening_stock: DF.Float + over_billing_allowance: DF.Float + over_delivery_receipt_allowance: DF.Float + purchase_uom: DF.Link | None + quality_inspection_template: DF.Link | None + reorder_levels: DF.Table[ItemReorder] + retain_sample: DF.Check + safety_stock: DF.Float + sales_uom: DF.Link | None + sample_quantity: DF.Int + serial_no_series: DF.Data | None + shelf_life_in_days: DF.Int + standard_rate: DF.Currency + stock_uom: DF.Link + supplier_items: DF.Table[ItemSupplier] + taxes: DF.Table[ItemTax] + total_projected_qty: DF.Float + uoms: DF.Table[UOMConversionDetail] + valuation_method: DF.Literal["", "FIFO", "Moving Average", "LIFO"] + valuation_rate: DF.Currency + variant_based_on: DF.Literal["Item Attribute", "Manufacturer"] + variant_of: DF.Link | None + warranty_period: DF.Data | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + # end: auto-generated types + def onload(self): self.set_onload("stock_exists", self.stock_ledger_created()) self.set_onload("asset_naming_series", get_asset_naming_series()) diff --git a/erpnext/stock/doctype/item_alternative/item_alternative.py b/erpnext/stock/doctype/item_alternative/item_alternative.py index 0c24d3c780f1..83bee9c321c8 100644 --- a/erpnext/stock/doctype/item_alternative/item_alternative.py +++ b/erpnext/stock/doctype/item_alternative/item_alternative.py @@ -8,6 +8,21 @@ class ItemAlternative(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + alternative_item_code: DF.Link | None + alternative_item_name: DF.ReadOnly | None + item_code: DF.Link | None + item_name: DF.ReadOnly | None + two_way: DF.Check + # end: auto-generated types + def validate(self): self.has_alternative_item() self.validate_alternative_item() diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.py b/erpnext/stock/doctype/item_attribute/item_attribute.py index ac4c313e28a8..7b341b22480d 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/item_attribute.py @@ -19,6 +19,24 @@ class ItemAttributeIncrementError(frappe.ValidationError): class ItemAttribute(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.item_attribute_value.item_attribute_value import ItemAttributeValue + + attribute_name: DF.Data + from_range: DF.Float + increment: DF.Float + item_attribute_values: DF.Table[ItemAttributeValue] + numeric_values: DF.Check + to_range: DF.Float + # end: auto-generated types + def __setup__(self): self.flags.ignore_these_exceptions_in_test = [InvalidItemAttributeValueError] diff --git a/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py b/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py index bc6fb4f3994b..0ddc86752d16 100644 --- a/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py +++ b/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py @@ -6,4 +6,19 @@ class ItemAttributeValue(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + abbr: DF.Data + attribute_value: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_barcode/item_barcode.py b/erpnext/stock/doctype/item_barcode/item_barcode.py index c2c042143eab..e38b95bad5f0 100644 --- a/erpnext/stock/doctype/item_barcode/item_barcode.py +++ b/erpnext/stock/doctype/item_barcode/item_barcode.py @@ -6,4 +6,36 @@ class ItemBarcode(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + barcode: DF.Data + barcode_type: DF.Literal[ + "", + "EAN", + "UPC-A", + "CODE-39", + "EAN-12", + "EAN-8", + "GS1", + "GTIN", + "ISBN", + "ISBN-10", + "ISBN-13", + "ISSN", + "JAN", + "PZN", + "UPC", + ] + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py index ba81b443bbab..b0978e388e94 100644 --- a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py +++ b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py @@ -6,4 +6,20 @@ class ItemCustomerDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + customer_group: DF.Link | None + customer_name: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + ref_code: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_default/item_default.py b/erpnext/stock/doctype/item_default/item_default.py index 8a9693e3a659..10dae2bc1c09 100644 --- a/erpnext/stock/doctype/item_default/item_default.py +++ b/erpnext/stock/doctype/item_default/item_default.py @@ -6,4 +6,29 @@ class ItemDefault(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + buying_cost_center: DF.Link | None + company: DF.Link + default_discount_account: DF.Link | None + default_price_list: DF.Link | None + default_provisional_account: DF.Link | None + default_supplier: DF.Link | None + default_warehouse: DF.Link | None + deferred_expense_account: DF.Link | None + deferred_revenue_account: DF.Link | None + expense_account: DF.Link | None + income_account: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + selling_cost_center: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py b/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py index b65ba98a8bfa..ed004d523e0f 100644 --- a/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py +++ b/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py @@ -8,6 +8,22 @@ class ItemManufacturer(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + is_default: DF.Check + item_code: DF.Link + item_name: DF.Data | None + manufacturer: DF.Link + manufacturer_part_no: DF.Data + # end: auto-generated types + def validate(self): self.validate_duplicate_entry() self.manage_default_item_manufacturer() diff --git a/erpnext/stock/doctype/item_price/item_price.py b/erpnext/stock/doctype/item_price/item_price.py index 54d1ae634f53..89a130a6bf49 100644 --- a/erpnext/stock/doctype/item_price/item_price.py +++ b/erpnext/stock/doctype/item_price/item_price.py @@ -15,6 +15,35 @@ class ItemPriceDuplicateItem(frappe.ValidationError): class ItemPrice(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + batch_no: DF.Link | None + brand: DF.Link | None + buying: DF.Check + currency: DF.Link | None + customer: DF.Link | None + item_code: DF.Link + item_description: DF.Text | None + item_name: DF.Data | None + lead_time_days: DF.Int + note: DF.Text | None + packing_unit: DF.Int + price_list: DF.Link + price_list_rate: DF.Currency + reference: DF.Data | None + selling: DF.Check + supplier: DF.Link | None + uom: DF.Link | None + valid_from: DF.Date | None + valid_upto: DF.Date | None + # end: auto-generated types + def validate(self): self.validate_item() self.validate_dates() diff --git a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py index 6cadb9973c27..b6ade8afae66 100644 --- a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py +++ b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py @@ -6,4 +6,25 @@ class ItemQualityInspectionParameter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + acceptance_formula: DF.Code | None + formula_based_criteria: DF.Check + max_value: DF.Float + min_value: DF.Float + numeric: DF.Check + parameter_group: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + specification: DF.Link + value: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_reorder/item_reorder.py b/erpnext/stock/doctype/item_reorder/item_reorder.py index c3cc69b32018..94f92f2c09ce 100644 --- a/erpnext/stock/doctype/item_reorder/item_reorder.py +++ b/erpnext/stock/doctype/item_reorder/item_reorder.py @@ -8,4 +8,22 @@ class ItemReorder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + material_request_type: DF.Literal["Purchase", "Transfer", "Material Issue", "Manufacture"] + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + warehouse: DF.Link + warehouse_group: DF.Link | None + warehouse_reorder_level: DF.Float + warehouse_reorder_qty: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_supplier/item_supplier.py b/erpnext/stock/doctype/item_supplier/item_supplier.py index 84f55566614b..955aea3a42e1 100644 --- a/erpnext/stock/doctype/item_supplier/item_supplier.py +++ b/erpnext/stock/doctype/item_supplier/item_supplier.py @@ -6,4 +6,19 @@ class ItemSupplier(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + supplier: DF.Link + supplier_part_no: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_tax/item_tax.py b/erpnext/stock/doctype/item_tax/item_tax.py index aa827198a9eb..4b8adb9b96fd 100644 --- a/erpnext/stock/doctype/item_tax/item_tax.py +++ b/erpnext/stock/doctype/item_tax/item_tax.py @@ -6,4 +6,22 @@ class ItemTax(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_tax_template: DF.Link + maximum_net_rate: DF.Float + minimum_net_rate: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + tax_category: DF.Link | None + valid_from: DF.Date | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_variant/item_variant.py b/erpnext/stock/doctype/item_variant/item_variant.py index f1580fcba9c9..94db29e62829 100644 --- a/erpnext/stock/doctype/item_variant/item_variant.py +++ b/erpnext/stock/doctype/item_variant/item_variant.py @@ -6,4 +6,19 @@ class ItemVariant(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + item_attribute: DF.Link + item_attribute_value: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py index 76b88b85c055..756b7421761d 100644 --- a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py +++ b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py @@ -6,4 +6,24 @@ class ItemVariantAttribute(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + attribute: DF.Link + attribute_value: DF.Data | None + from_range: DF.Float + increment: DF.Float + numeric_values: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + to_range: DF.Float + variant_of: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py index c3edba321c5c..a4bdc0ba783d 100644 --- a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py +++ b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py @@ -8,6 +8,21 @@ class ItemVariantSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.variant_field.variant_field import VariantField + + allow_rename_attribute_value: DF.Check + do_not_update_variants: DF.Check + fields: DF.Table[VariantField] + # end: auto-generated types + invalid_fields_for_copy_fields_in_variants = ["barcodes"] def set_default_fields(self): diff --git a/erpnext/stock/doctype/item_website_specification/item_website_specification.py b/erpnext/stock/doctype/item_website_specification/item_website_specification.py index af9612c186c8..7ac02f6c227f 100644 --- a/erpnext/stock/doctype/item_website_specification/item_website_specification.py +++ b/erpnext/stock/doctype/item_website_specification/item_website_specification.py @@ -8,4 +8,19 @@ class ItemWebsiteSpecification(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor | None + label: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py index 35a3740564ac..67f695ac17d4 100644 --- a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py +++ b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py @@ -6,4 +6,28 @@ class LandedCostItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + applicable_charges: DF.Currency + cost_center: DF.Link | None + description: DF.TextEditor + is_fixed_asset: DF.Check + item_code: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + purchase_receipt_item: DF.Data | None + qty: DF.Float + rate: DF.Currency + receipt_document: DF.DynamicLink | None + receipt_document_type: DF.Literal["Purchase Invoice", "Purchase Receipt"] + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py index f5bbc4ad52ae..9f0ffb8956c0 100644 --- a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py +++ b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py @@ -6,4 +6,22 @@ class LandedCostPurchaseReceipt(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + grand_total: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + posting_date: DF.Date | None + receipt_document: DF.DynamicLink + receipt_document_type: DF.Literal["", "Purchase Invoice", "Purchase Receipt"] + supplier: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py index a4a1c5839696..8509cb71d853 100644 --- a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py +++ b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py @@ -6,4 +6,23 @@ class LandedCostTaxesandCharges(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account_currency: DF.Link | None + amount: DF.Currency + base_amount: DF.Currency + description: DF.SmallText + exchange_rate: DF.Float + expense_account: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py index 7f0dc2df9f32..021c43e300c5 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py @@ -15,6 +15,33 @@ class LandedCostVoucher(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.landed_cost_item.landed_cost_item import LandedCostItem + from erpnext.stock.doctype.landed_cost_purchase_receipt.landed_cost_purchase_receipt import ( + LandedCostPurchaseReceipt, + ) + from erpnext.stock.doctype.landed_cost_taxes_and_charges.landed_cost_taxes_and_charges import ( + LandedCostTaxesandCharges, + ) + + amended_from: DF.Link | None + company: DF.Link + distribute_charges_based_on: DF.Literal["Qty", "Amount", "Distribute Manually"] + items: DF.Table[LandedCostItem] + naming_series: DF.Literal["MAT-LCV-.YYYY.-"] + posting_date: DF.Date + purchase_receipts: DF.Table[LandedCostPurchaseReceipt] + taxes: DF.Table[LandedCostTaxesandCharges] + total_taxes_and_charges: DF.Currency + # end: auto-generated types + @frappe.whitelist() def get_items_from_purchase_receipts(self): self.set("items", []) diff --git a/erpnext/stock/doctype/manufacturer/manufacturer.py b/erpnext/stock/doctype/manufacturer/manufacturer.py index 426affc40b82..5e559d05ad47 100644 --- a/erpnext/stock/doctype/manufacturer/manufacturer.py +++ b/erpnext/stock/doctype/manufacturer/manufacturer.py @@ -7,6 +7,22 @@ class Manufacturer(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + country: DF.Link | None + full_name: DF.Data | None + logo: DF.AttachImage | None + notes: DF.SmallText | None + short_name: DF.Data + website: DF.Data | None + # end: auto-generated types + def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self) diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index ecdec800e567..7df74f81abf1 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -23,6 +23,55 @@ class MaterialRequest(BuyingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.material_request_item.material_request_item import MaterialRequestItem + + amended_from: DF.Link | None + company: DF.Link + customer: DF.Link | None + items: DF.Table[MaterialRequestItem] + job_card: DF.Link | None + letter_head: DF.Link | None + material_request_type: DF.Literal[ + "Purchase", "Material Transfer", "Material Issue", "Manufacture", "Customer Provided" + ] + naming_series: DF.Literal["MAT-MR-.YYYY.-"] + per_ordered: DF.Percent + per_received: DF.Percent + scan_barcode: DF.Data | None + schedule_date: DF.Date | None + select_print_heading: DF.Link | None + set_from_warehouse: DF.Link | None + set_warehouse: DF.Link | None + status: DF.Literal[ + "", + "Draft", + "Submitted", + "Stopped", + "Cancelled", + "Pending", + "Partially Ordered", + "Partially Received", + "Ordered", + "Issued", + "Transferred", + "Received", + ] + tc_name: DF.Link | None + terms: DF.TextEditor | None + title: DF.Data | None + transaction_date: DF.Date + transfer_status: DF.Literal["", "Not Started", "In Transit", "Completed"] + work_order: DF.Link | None + # end: auto-generated types + def check_if_already_pulled(self): pass diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.py b/erpnext/stock/doctype/material_request_item/material_request_item.py index 08c9ed27427b..2bed596292a6 100644 --- a/erpnext/stock/doctype/material_request_item/material_request_item.py +++ b/erpnext/stock/doctype/material_request_item/material_request_item.py @@ -9,6 +9,54 @@ class MaterialRequestItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + amount: DF.Currency + bom_no: DF.Link | None + brand: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + description: DF.TextEditor | None + expense_account: DF.Link | None + from_warehouse: DF.Link | None + image: DF.AttachImage | None + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data | None + job_card_item: DF.Data | None + lead_time_date: DF.Date | None + manufacturer: DF.Link | None + manufacturer_part_no: DF.Data | None + material_request_plan_item: DF.Data | None + min_order_qty: DF.Float + ordered_qty: DF.Float + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + production_plan: DF.Link | None + project: DF.Link | None + projected_qty: DF.Float + qty: DF.Float + rate: DF.Currency + received_qty: DF.Float + sales_order: DF.Link | None + sales_order_item: DF.Data | None + schedule_date: DF.Date + stock_qty: DF.Float + stock_uom: DF.Link + uom: DF.Link + warehouse: DF.Link | None + wip_composite_asset: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 35701c90deb8..ed667c2b992f 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -14,6 +14,42 @@ class PackedItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_batch_qty: DF.Float + actual_qty: DF.Float + batch_no: DF.Link | None + conversion_factor: DF.Float + description: DF.TextEditor | None + incoming_rate: DF.Currency + item_code: DF.Link | None + item_name: DF.Data | None + ordered_qty: DF.Float + packed_qty: DF.Float + page_break: DF.Check + parent: DF.Data + parent_detail_docname: DF.Data | None + parent_item: DF.Link | None + parentfield: DF.Data + parenttype: DF.Data + picked_qty: DF.Float + prevdoc_doctype: DF.Data | None + projected_qty: DF.Float + qty: DF.Float + rate: DF.Currency + serial_and_batch_bundle: DF.Link | None + serial_no: DF.Text | None + target_warehouse: DF.Link | None + uom: DF.Link | None + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index 6ea5938917ab..88acfe83f20f 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -10,6 +10,29 @@ class PackingSlip(StatusUpdater): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.packing_slip_item.packing_slip_item import PackingSlipItem + + amended_from: DF.Link | None + delivery_note: DF.Link + from_case_no: DF.Int + gross_weight_pkg: DF.Float + gross_weight_uom: DF.Link | None + items: DF.Table[PackingSlipItem] + letter_head: DF.Link | None + naming_series: DF.Literal["MAT-PAC-.YYYY.-"] + net_weight_pkg: DF.Float + net_weight_uom: DF.Link | None + to_case_no: DF.Int + # end: auto-generated types + def __init__(self, *args, **kwargs) -> None: super(PackingSlip, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py index ec148aa5bc76..fa883c1740ed 100644 --- a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py +++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py @@ -8,4 +8,28 @@ class PackingSlipItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + batch_no: DF.Link | None + description: DF.TextEditor | None + dn_detail: DF.Data | None + item_code: DF.Link + item_name: DF.Data | None + net_weight: DF.Float + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + pi_detail: DF.Data | None + qty: DF.Float + stock_uom: DF.Link | None + weight_uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index e7f620496cfd..545e45f3d824 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -29,6 +29,34 @@ class PickList(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.pick_list_item.pick_list_item import PickListItem + + amended_from: DF.Link | None + company: DF.Link + customer: DF.Link | None + customer_name: DF.Data | None + for_qty: DF.Float + group_same_items: DF.Check + locations: DF.Table[PickListItem] + material_request: DF.Link | None + naming_series: DF.Literal["STO-PICK-.YYYY.-"] + parent_warehouse: DF.Link | None + prompt_qty: DF.Check + purpose: DF.Literal["Material Transfer for Manufacture", "Material Transfer", "Delivery"] + scan_barcode: DF.Data | None + scan_mode: DF.Check + status: DF.Literal["Draft", "Open", "Completed", "Cancelled"] + work_order: DF.Link | None + # end: auto-generated types + def onload(self) -> None: if frappe.get_cached_value("Stock Settings", None, "enable_stock_reservation"): if self.has_unreserved_stock(): diff --git a/erpnext/stock/doctype/pick_list_item/pick_list_item.py b/erpnext/stock/doctype/pick_list_item/pick_list_item.py index 6ecccb124825..6e5a94e44658 100644 --- a/erpnext/stock/doctype/pick_list_item/pick_list_item.py +++ b/erpnext/stock/doctype/pick_list_item/pick_list_item.py @@ -7,4 +7,37 @@ class PickListItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + batch_no: DF.Link | None + conversion_factor: DF.Float + description: DF.Text | None + item_code: DF.Link + item_group: DF.Data | None + item_name: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + picked_qty: DF.Float + product_bundle_item: DF.Data | None + qty: DF.Float + sales_order: DF.Link | None + sales_order_item: DF.Data | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + stock_qty: DF.Float + stock_reserved_qty: DF.Float + stock_uom: DF.Link | None + uom: DF.Link | None + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/price_list/price_list.py b/erpnext/stock/doctype/price_list/price_list.py index 21c0f18cc3ef..580c7c00b127 100644 --- a/erpnext/stock/doctype/price_list/price_list.py +++ b/erpnext/stock/doctype/price_list/price_list.py @@ -9,6 +9,25 @@ class PriceList(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.price_list_country.price_list_country import PriceListCountry + + buying: DF.Check + countries: DF.Table[PriceListCountry] + currency: DF.Link + enabled: DF.Check + price_list_name: DF.Data + price_not_uom_dependent: DF.Check + selling: DF.Check + # end: auto-generated types + def validate(self): if not cint(self.buying) and not cint(self.selling): throw(_("Price List must be applicable for Buying or Selling")) diff --git a/erpnext/stock/doctype/price_list_country/price_list_country.py b/erpnext/stock/doctype/price_list_country/price_list_country.py index 94e1107b2cf6..574d7e005173 100644 --- a/erpnext/stock/doctype/price_list_country/price_list_country.py +++ b/erpnext/stock/doctype/price_list_country/price_list_country.py @@ -6,4 +6,18 @@ class PriceListCountry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + country: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 8647528ea50f..907bc6712f26 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -21,6 +21,118 @@ class PurchaseReceipt(BuyingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail + from erpnext.accounts.doctype.purchase_taxes_and_charges.purchase_taxes_and_charges import ( + PurchaseTaxesandCharges, + ) + from erpnext.buying.doctype.purchase_receipt_item_supplied.purchase_receipt_item_supplied import ( + PurchaseReceiptItemSupplied, + ) + from erpnext.stock.doctype.purchase_receipt_item.purchase_receipt_item import PurchaseReceiptItem + + additional_discount_percentage: DF.Float + address_display: DF.SmallText | None + amended_from: DF.Link | None + apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] + apply_putaway_rule: DF.Check + auto_repeat: DF.Link | None + base_discount_amount: DF.Currency + base_grand_total: DF.Currency + base_in_words: DF.Data | None + base_net_total: DF.Currency + base_rounded_total: DF.Currency + base_rounding_adjustment: DF.Currency + base_taxes_and_charges_added: DF.Currency + base_taxes_and_charges_deducted: DF.Currency + base_total: DF.Currency + base_total_taxes_and_charges: DF.Currency + billing_address: DF.Link | None + billing_address_display: DF.SmallText | None + buying_price_list: DF.Link | None + company: DF.Link + contact_display: DF.SmallText | None + contact_email: DF.SmallText | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + conversion_rate: DF.Float + cost_center: DF.Link | None + currency: DF.Link + disable_rounded_total: DF.Check + discount_amount: DF.Currency + grand_total: DF.Currency + group_same_items: DF.Check + ignore_pricing_rule: DF.Check + in_words: DF.Data | None + incoterm: DF.Link | None + instructions: DF.SmallText | None + inter_company_reference: DF.Link | None + is_internal_supplier: DF.Check + is_old_subcontracting_flow: DF.Check + is_return: DF.Check + is_subcontracted: DF.Check + items: DF.Table[PurchaseReceiptItem] + language: DF.Data | None + letter_head: DF.Link | None + lr_date: DF.Date | None + lr_no: DF.Data | None + named_place: DF.Data | None + naming_series: DF.Literal["MAT-PRE-.YYYY.-", "MAT-PR-RET-.YYYY.-"] + net_total: DF.Currency + other_charges_calculation: DF.LongText | None + per_billed: DF.Percent + per_returned: DF.Percent + plc_conversion_rate: DF.Float + posting_date: DF.Date + posting_time: DF.Time + price_list_currency: DF.Link | None + pricing_rules: DF.Table[PricingRuleDetail] + project: DF.Link | None + range: DF.Data | None + rejected_warehouse: DF.Link | None + remarks: DF.SmallText | None + represents_company: DF.Link | None + return_against: DF.Link | None + rounded_total: DF.Currency + rounding_adjustment: DF.Currency + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + set_from_warehouse: DF.Link | None + set_posting_time: DF.Check + set_warehouse: DF.Link | None + shipping_address: DF.Link | None + shipping_address_display: DF.SmallText | None + shipping_rule: DF.Link | None + status: DF.Literal["", "Draft", "To Bill", "Completed", "Return Issued", "Cancelled", "Closed"] + subcontracting_receipt: DF.Link | None + supplied_items: DF.Table[PurchaseReceiptItemSupplied] + supplier: DF.Link + supplier_address: DF.Link | None + supplier_delivery_note: DF.Data | None + supplier_name: DF.Data | None + supplier_warehouse: DF.Link | None + tax_category: DF.Link | None + taxes: DF.Table[PurchaseTaxesandCharges] + taxes_and_charges: DF.Link | None + taxes_and_charges_added: DF.Currency + taxes_and_charges_deducted: DF.Currency + tc_name: DF.Link | None + terms: DF.TextEditor | None + title: DF.Data | None + total: DF.Currency + total_net_weight: DF.Float + total_qty: DF.Float + total_taxes_and_charges: DF.Currency + transporter_name: DF.Data | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(PurchaseReceipt, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py index b4b9fd336352..aed8d21dae7e 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py @@ -6,4 +6,104 @@ class PurchaseReceiptItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + asset_category: DF.Link | None + asset_location: DF.Link | None + barcode: DF.Data | None + base_amount: DF.Currency + base_net_amount: DF.Currency + base_net_rate: DF.Currency + base_price_list_rate: DF.Currency + base_rate: DF.Currency + base_rate_with_margin: DF.Currency + batch_no: DF.Link | None + billed_amt: DF.Currency + bom: DF.Link | None + brand: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + delivery_note_item: DF.Data | None + description: DF.TextEditor | None + discount_amount: DF.Currency + discount_percentage: DF.Percent + expense_account: DF.Link | None + from_warehouse: DF.Link | None + has_item_scanned: DF.Check + image: DF.Attach | None + include_exploded_items: DF.Check + is_fixed_asset: DF.Check + is_free_item: DF.Check + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data + item_tax_amount: DF.Currency + item_tax_rate: DF.Code | None + item_tax_template: DF.Link | None + landed_cost_voucher_amount: DF.Currency + manufacturer: DF.Link | None + manufacturer_part_no: DF.Data | None + margin_rate_or_amount: DF.Float + margin_type: DF.Literal["", "Percentage", "Amount"] + material_request: DF.Link | None + material_request_item: DF.Data | None + net_amount: DF.Currency + net_rate: DF.Currency + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + price_list_rate: DF.Currency + pricing_rules: DF.SmallText | None + product_bundle: DF.Link | None + project: DF.Link | None + provisional_expense_account: DF.Link | None + purchase_invoice: DF.Link | None + purchase_invoice_item: DF.Data | None + purchase_order: DF.Link | None + purchase_order_item: DF.Data | None + purchase_receipt_item: DF.Data | None + putaway_rule: DF.Link | None + qty: DF.Float + quality_inspection: DF.Link | None + rate: DF.Currency + rate_difference_with_purchase_invoice: DF.Currency + rate_with_margin: DF.Currency + received_qty: DF.Float + received_stock_qty: DF.Float + rejected_qty: DF.Float + rejected_serial_and_batch_bundle: DF.Link | None + rejected_serial_no: DF.Text | None + rejected_warehouse: DF.Link | None + retain_sample: DF.Check + returned_qty: DF.Float + rm_supp_cost: DF.Currency + sales_order: DF.Link | None + sales_order_item: DF.Data | None + sample_quantity: DF.Int + schedule_date: DF.Date | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.Text | None + stock_qty: DF.Float + stock_uom: DF.Link + stock_uom_rate: DF.Currency + subcontracting_receipt_item: DF.Data | None + supplier_part_no: DF.Data | None + total_weight: DF.Float + uom: DF.Link + valuation_rate: DF.Currency + warehouse: DF.Link | None + weight_per_unit: DF.Float + weight_uom: DF.Link | None + wip_composite_asset: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/putaway_rule/putaway_rule.py b/erpnext/stock/doctype/putaway_rule/putaway_rule.py index 0a04210e0b01..3fc4e01bdc77 100644 --- a/erpnext/stock/doctype/putaway_rule/putaway_rule.py +++ b/erpnext/stock/doctype/putaway_rule/putaway_rule.py @@ -15,6 +15,27 @@ class PutawayRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + capacity: DF.Float + company: DF.Link + conversion_factor: DF.Float + disable: DF.Check + item_code: DF.Link + item_name: DF.Data | None + priority: DF.Int + stock_capacity: DF.Float + stock_uom: DF.Link | None + uom: DF.Link | None + warehouse: DF.Link + # end: auto-generated types + def validate(self): self.validate_duplicate_rule() self.validate_warehouse_and_company() diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 9673c81e5531..4464ea820e49 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -14,6 +14,49 @@ class QualityInspection(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.quality_inspection_reading.quality_inspection_reading import ( + QualityInspectionReading, + ) + + amended_from: DF.Link | None + batch_no: DF.Link | None + bom_no: DF.Link | None + description: DF.SmallText | None + inspected_by: DF.Link + inspection_type: DF.Literal["", "Incoming", "Outgoing", "In Process"] + item_code: DF.Link + item_name: DF.Data | None + item_serial_no: DF.Link | None + manual_inspection: DF.Check + naming_series: DF.Literal["MAT-QA-.YYYY.-"] + quality_inspection_template: DF.Link | None + readings: DF.Table[QualityInspectionReading] + reference_name: DF.DynamicLink + reference_type: DF.Literal[ + "", + "Purchase Receipt", + "Purchase Invoice", + "Subcontracting Receipt", + "Delivery Note", + "Sales Invoice", + "Stock Entry", + "Job Card", + ] + remarks: DF.Text | None + report_date: DF.Date + sample_size: DF.Float + status: DF.Literal["", "Accepted", "Rejected"] + verified_by: DF.Data | None + # end: auto-generated types + def validate(self): if not self.readings and self.item_code: self.get_item_specification_details() diff --git a/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py b/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py index d5123c7ce6e4..310915f075e5 100644 --- a/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py +++ b/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py @@ -7,4 +7,17 @@ class QualityInspectionParameter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.TextEditor | None + parameter: DF.Data + parameter_group: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py b/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py index 26e936151695..01053765f3f0 100644 --- a/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py +++ b/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py @@ -7,4 +7,15 @@ class QualityInspectionParameterGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + group_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py b/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py index 81454f110b93..0ba90081d8a9 100644 --- a/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py +++ b/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py @@ -6,4 +6,38 @@ class QualityInspectionReading(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + acceptance_formula: DF.Code | None + formula_based_criteria: DF.Check + manual_inspection: DF.Check + max_value: DF.Float + min_value: DF.Float + numeric: DF.Check + parameter_group: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reading_10: DF.Data | None + reading_1: DF.Data | None + reading_2: DF.Data | None + reading_3: DF.Data | None + reading_4: DF.Data | None + reading_5: DF.Data | None + reading_6: DF.Data | None + reading_7: DF.Data | None + reading_8: DF.Data | None + reading_9: DF.Data | None + reading_value: DF.Data | None + specification: DF.Link + status: DF.Literal["", "Accepted", "Rejected"] + value: DF.Data | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py b/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py index 9b8f5d6378c7..44b77350b46e 100644 --- a/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py +++ b/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py @@ -7,6 +7,22 @@ class QualityInspectionTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.item_quality_inspection_parameter.item_quality_inspection_parameter import ( + ItemQualityInspectionParameter, + ) + + item_quality_inspection_parameter: DF.Table[ItemQualityInspectionParameter] + quality_inspection_template_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py b/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py index 846be0b9bdcd..34fb68c1b727 100644 --- a/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py +++ b/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py @@ -10,6 +10,24 @@ class QuickStockBalance(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + date: DF.Date + item: DF.Link + item_barcode: DF.Data | None + item_description: DF.SmallText | None + item_name: DF.Data | None + qty: DF.Float + value: DF.Currency + warehouse: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index f128c8e20616..97ada06e1dd7 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -25,6 +25,37 @@ class RepostItemValuation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + affected_transactions: DF.Code | None + allow_negative_stock: DF.Check + allow_zero_rate: DF.Check + amended_from: DF.Link | None + based_on: DF.Literal["Transaction", "Item and Warehouse"] + company: DF.Link | None + current_index: DF.Int + distinct_item_and_warehouse: DF.Code | None + error_log: DF.LongText | None + gl_reposting_index: DF.Int + item_code: DF.Link | None + items_to_be_repost: DF.Code | None + posting_date: DF.Date + posting_time: DF.Time | None + reposting_data_file: DF.Attach | None + status: DF.Literal["Queued", "In Progress", "Completed", "Skipped", "Failed"] + total_reposting_count: DF.Int + via_landed_cost_voucher: DF.Check + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + warehouse: DF.Link | None + # end: auto-generated types + @staticmethod def clear_old_logs(days=None): days = days or 90 diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py index 1e13eb2a8a9f..1449ac312ea9 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py @@ -44,6 +44,42 @@ class SerialNoWarehouseError(frappe.ValidationError): class SerialandBatchBundle(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.serial_and_batch_entry.serial_and_batch_entry import ( + SerialandBatchEntry, + ) + + amended_from: DF.Link | None + avg_rate: DF.Float + company: DF.Link + entries: DF.Table[SerialandBatchEntry] + has_batch_no: DF.Check + has_serial_no: DF.Check + is_cancelled: DF.Check + is_rejected: DF.Check + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data | None + naming_series: DF.Literal["SABB-.########"] + posting_date: DF.Date | None + posting_time: DF.Time | None + returned_against: DF.Data | None + total_amount: DF.Float + total_qty: DF.Float + type_of_transaction: DF.Literal["", "Inward", "Outward", "Maintenance", "Asset Repair"] + voucher_detail_no: DF.Data | None + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link + warehouse: DF.Link | None + # end: auto-generated types + def validate(self): self.validate_serial_and_batch_no() self.validate_duplicate_serial_and_batch_no() diff --git a/erpnext/stock/doctype/serial_and_batch_entry/serial_and_batch_entry.py b/erpnext/stock/doctype/serial_and_batch_entry/serial_and_batch_entry.py index 337403e2e18c..c849e682ccda 100644 --- a/erpnext/stock/doctype/serial_and_batch_entry/serial_and_batch_entry.py +++ b/erpnext/stock/doctype/serial_and_batch_entry/serial_and_batch_entry.py @@ -6,4 +6,27 @@ class SerialandBatchEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + batch_no: DF.Link | None + delivered_qty: DF.Float + incoming_rate: DF.Float + is_outward: DF.Check + outgoing_rate: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + serial_no: DF.Link | None + stock_queue: DF.SmallText | None + stock_value_difference: DF.Float + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index ba9482a7ba87..d562560da141 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -27,6 +27,39 @@ class SerialNoWarehouseError(ValidationError): class SerialNo(StockController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amc_expiry_date: DF.Date | None + asset: DF.Link | None + asset_status: DF.Literal["", "Issue", "Receipt", "Transfer"] + batch_no: DF.Link | None + brand: DF.Link | None + company: DF.Link + delivery_document_type: DF.Link | None + description: DF.Text | None + employee: DF.Link | None + item_code: DF.Link + item_group: DF.Link | None + item_name: DF.Data | None + location: DF.Link | None + maintenance_status: DF.Literal[ + "", "Under Warranty", "Out of Warranty", "Under AMC", "Out of AMC" + ] + purchase_rate: DF.Float + serial_no: DF.Data + status: DF.Literal["", "Active", "Inactive", "Delivered", "Expired"] + warehouse: DF.Link | None + warranty_expiry_date: DF.Date | None + warranty_period: DF.Int + work_order: DF.Link | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(SerialNo, self).__init__(*args, **kwargs) self.via_stock_ledger = False diff --git a/erpnext/stock/doctype/shipment/shipment.py b/erpnext/stock/doctype/shipment/shipment.py index 42a67f42beca..346e70e60602 100644 --- a/erpnext/stock/doctype/shipment/shipment.py +++ b/erpnext/stock/doctype/shipment/shipment.py @@ -12,6 +12,65 @@ class Shipment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.shipment_delivery_note.shipment_delivery_note import ( + ShipmentDeliveryNote, + ) + from erpnext.stock.doctype.shipment_parcel.shipment_parcel import ShipmentParcel + + amended_from: DF.Link | None + awb_number: DF.Data | None + carrier: DF.Data | None + carrier_service: DF.Data | None + delivery_address: DF.SmallText | None + delivery_address_name: DF.Link + delivery_company: DF.Link | None + delivery_contact: DF.SmallText | None + delivery_contact_email: DF.Data | None + delivery_contact_name: DF.Link | None + delivery_customer: DF.Link | None + delivery_supplier: DF.Link | None + delivery_to: DF.Data | None + delivery_to_type: DF.Literal["Company", "Customer", "Supplier"] + description_of_content: DF.SmallText + incoterm: DF.Link | None + pallets: DF.Literal["No", "Yes"] + parcel_template: DF.Link | None + pickup: DF.Data | None + pickup_address: DF.SmallText | None + pickup_address_name: DF.Link + pickup_company: DF.Link | None + pickup_contact: DF.SmallText | None + pickup_contact_email: DF.Data | None + pickup_contact_name: DF.Link | None + pickup_contact_person: DF.Link | None + pickup_customer: DF.Link | None + pickup_date: DF.Date + pickup_from: DF.Time + pickup_from_type: DF.Literal["Company", "Customer", "Supplier"] + pickup_supplier: DF.Link | None + pickup_to: DF.Time + pickup_type: DF.Literal["Pickup", "Self delivery"] + service_provider: DF.Data | None + shipment_amount: DF.Currency + shipment_delivery_note: DF.Table[ShipmentDeliveryNote] + shipment_id: DF.Data | None + shipment_parcel: DF.Table[ShipmentParcel] + shipment_type: DF.Literal["Goods", "Documents"] + status: DF.Literal["Draft", "Submitted", "Booked", "Cancelled", "Completed"] + tracking_status: DF.Literal["", "In Progress", "Delivered", "Returned", "Lost"] + tracking_status_info: DF.Data | None + tracking_url: DF.SmallText | None + value_of_goods: DF.Currency + # end: auto-generated types + def validate(self): self.validate_weight() self.validate_pickup_time() diff --git a/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py b/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py index 2b58a39dfb49..fb5e61665c09 100644 --- a/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py +++ b/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py @@ -7,4 +7,19 @@ class ShipmentDeliveryNote(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + delivery_note: DF.Link + grand_total: DF.Currency + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py b/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py index a6070213bb3d..f789f07ce3ae 100644 --- a/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py +++ b/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py @@ -7,4 +7,22 @@ class ShipmentParcel(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + count: DF.Int + height: DF.Int + length: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + weight: DF.Float + width: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py b/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py index a5de312d6b4e..054c0f379a22 100644 --- a/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py +++ b/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py @@ -7,4 +7,19 @@ class ShipmentParcelTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + height: DF.Int + length: DF.Int + parcel_template_name: DF.Data + weight: DF.Float + width: DF.Int + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index b0a75a352ffa..4da2513d951b 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -74,6 +74,82 @@ class MaxSampleAlreadyRetainedError(frappe.ValidationError): class StockEntry(StockController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.landed_cost_taxes_and_charges.landed_cost_taxes_and_charges import ( + LandedCostTaxesandCharges, + ) + from erpnext.stock.doctype.stock_entry_detail.stock_entry_detail import StockEntryDetail + + add_to_transit: DF.Check + additional_costs: DF.Table[LandedCostTaxesandCharges] + address_display: DF.SmallText | None + amended_from: DF.Link | None + apply_putaway_rule: DF.Check + bom_no: DF.Link | None + company: DF.Link + credit_note: DF.Link | None + delivery_note_no: DF.Link | None + fg_completed_qty: DF.Float + from_bom: DF.Check + from_warehouse: DF.Link | None + inspection_required: DF.Check + is_opening: DF.Literal["No", "Yes"] + is_return: DF.Check + items: DF.Table[StockEntryDetail] + job_card: DF.Link | None + letter_head: DF.Link | None + naming_series: DF.Literal["MAT-STE-.YYYY.-"] + outgoing_stock_entry: DF.Link | None + per_transferred: DF.Percent + pick_list: DF.Link | None + posting_date: DF.Date | None + posting_time: DF.Time | None + process_loss_percentage: DF.Percent + process_loss_qty: DF.Float + project: DF.Link | None + purchase_order: DF.Link | None + purchase_receipt_no: DF.Link | None + purpose: DF.Literal[ + "Material Issue", + "Material Receipt", + "Material Transfer", + "Material Transfer for Manufacture", + "Material Consumption for Manufacture", + "Manufacture", + "Repack", + "Send to Subcontractor", + ] + remarks: DF.Text | None + sales_invoice_no: DF.Link | None + scan_barcode: DF.Data | None + select_print_heading: DF.Link | None + set_posting_time: DF.Check + source_address_display: DF.SmallText | None + source_warehouse_address: DF.Link | None + stock_entry_type: DF.Link + subcontracting_order: DF.Link | None + supplier: DF.Link | None + supplier_address: DF.Link | None + supplier_name: DF.Data | None + target_address_display: DF.SmallText | None + target_warehouse_address: DF.Link | None + to_warehouse: DF.Link | None + total_additional_costs: DF.Currency + total_amount: DF.Currency + total_incoming_value: DF.Currency + total_outgoing_value: DF.Currency + use_multi_level_bom: DF.Check + value_difference: DF.Currency + work_order: DF.Link | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(StockEntry, self).__init__(*args, **kwargs) if self.purchase_order: diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py index 000ff2dcf8bd..b2fc1f52e1a9 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py @@ -6,4 +6,65 @@ class StockEntryDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + additional_cost: DF.Currency + against_stock_entry: DF.Link | None + allow_alternative_item: DF.Check + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + attach_something_here: DF.Attach | None + barcode: DF.Data | None + basic_amount: DF.Currency + basic_rate: DF.Currency + batch_no: DF.Link | None + bom_no: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + description: DF.TextEditor | None + expense_account: DF.Link | None + has_item_scanned: DF.Check + image: DF.Attach | None + is_finished_item: DF.Check + is_scrap_item: DF.Check + item_code: DF.Link + item_group: DF.Data | None + item_name: DF.Data | None + job_card_item: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Link | None + original_item: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + po_detail: DF.Data | None + project: DF.Link | None + putaway_rule: DF.Link | None + qty: DF.Float + quality_inspection: DF.Link | None + reference_purchase_receipt: DF.Link | None + retain_sample: DF.Check + s_warehouse: DF.Link | None + sample_quantity: DF.Int + sco_rm_detail: DF.Data | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + set_basic_rate_manually: DF.Check + ste_detail: DF.Data | None + stock_uom: DF.Link + subcontracted_item: DF.Link | None + t_warehouse: DF.Link | None + transfer_qty: DF.Float + transferred_qty: DF.Float + uom: DF.Link + valuation_rate: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py index 7258cfbe2c9d..034223122f60 100644 --- a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py +++ b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py @@ -7,6 +7,28 @@ class StockEntryType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + add_to_transit: DF.Check + purpose: DF.Literal[ + "", + "Material Issue", + "Material Receipt", + "Material Transfer", + "Material Transfer for Manufacture", + "Material Consumption for Manufacture", + "Manufacture", + "Repack", + "Send to Subcontractor", + ] + # end: auto-generated types + def validate(self): if self.add_to_transit and self.purpose != "Material Transfer": self.add_to_transit = 0 diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index c1b205132cf6..e62f0b2ac74b 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -29,6 +29,46 @@ class BackDatedStockTransaction(frappe.ValidationError): class StockLedgerEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + auto_created_serial_and_batch_bundle: DF.Check + batch_no: DF.Data | None + company: DF.Link | None + dependant_sle_voucher_detail_no: DF.Data | None + fiscal_year: DF.Data | None + has_batch_no: DF.Check + has_serial_no: DF.Check + incoming_rate: DF.Currency + is_adjustment_entry: DF.Check + is_cancelled: DF.Check + item_code: DF.Link | None + outgoing_rate: DF.Currency + posting_date: DF.Date | None + posting_time: DF.Time | None + project: DF.Link | None + qty_after_transaction: DF.Float + recalculate_rate: DF.Check + serial_and_batch_bundle: DF.Link | None + serial_no: DF.LongText | None + stock_queue: DF.Text | None + stock_uom: DF.Link | None + stock_value: DF.Currency + stock_value_difference: DF.Currency + to_rename: DF.Check + valuation_rate: DF.Currency + voucher_detail_no: DF.Data | None + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + warehouse: DF.Link | None + # end: auto-generated types + def autoname(self): """ Temporarily name doc for fast insertion diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index c7a278821dc5..0482467dca16 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -29,6 +29,34 @@ class EmptyStockReconciliationItemsError(frappe.ValidationError): class StockReconciliation(StockController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.stock_reconciliation_item.stock_reconciliation_item import ( + StockReconciliationItem, + ) + + amended_from: DF.Link | None + company: DF.Link + cost_center: DF.Link | None + difference_amount: DF.Currency + expense_account: DF.Link | None + items: DF.Table[StockReconciliationItem] + naming_series: DF.Literal["MAT-RECO-.YYYY.-"] + posting_date: DF.Date + posting_time: DF.Time + purpose: DF.Literal["", "Opening Stock", "Stock Reconciliation"] + scan_barcode: DF.Data | None + scan_mode: DF.Check + set_posting_time: DF.Check + set_warehouse: DF.Link | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(StockReconciliation, self).__init__(*args, **kwargs) self.head_row = ["Item Code", "Warehouse", "Quantity", "Valuation Rate"] diff --git a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py index b3b5d082c9af..c82cdf58de1f 100644 --- a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py +++ b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py @@ -6,4 +6,36 @@ class StockReconciliationItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + amount_difference: DF.Currency + barcode: DF.Data | None + batch_no: DF.Link | None + current_amount: DF.Currency + current_qty: DF.Float + current_serial_and_batch_bundle: DF.Link | None + current_serial_no: DF.LongText | None + current_valuation_rate: DF.Currency + has_item_scanned: DF.Data | None + item_code: DF.Link + item_name: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + qty: DF.Float + quantity_difference: DF.ReadOnly | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.LongText | None + valuation_rate: DF.Currency + warehouse: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/stock_reposting_settings/stock_reposting_settings.py b/erpnext/stock/doctype/stock_reposting_settings/stock_reposting_settings.py index 51fb5ac4c409..50f39817fffb 100644 --- a/erpnext/stock/doctype/stock_reposting_settings/stock_reposting_settings.py +++ b/erpnext/stock/doctype/stock_reposting_settings/stock_reposting_settings.py @@ -8,6 +8,24 @@ class StockRepostingSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + end_time: DF.Time | None + item_based_reposting: DF.Check + limit_reposting_timeslot: DF.Check + limits_dont_apply_on: DF.Literal[ + "", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" + ] + notify_reposting_error_to_role: DF.Link | None + start_time: DF.Time | None + # end: auto-generated types + def validate(self): self.set_minimum_reposting_time_slot() diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py index cbfa4e0a432e..85550c2b7db2 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py @@ -13,6 +13,43 @@ class StockReservationEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.serial_and_batch_entry.serial_and_batch_entry import ( + SerialandBatchEntry, + ) + + amended_from: DF.Link | None + available_qty: DF.Float + company: DF.Link | None + delivered_qty: DF.Float + from_voucher_detail_no: DF.Data | None + from_voucher_no: DF.DynamicLink | None + from_voucher_type: DF.Literal["", "Pick List", "Purchase Receipt"] + has_batch_no: DF.Check + has_serial_no: DF.Check + item_code: DF.Link | None + project: DF.Link | None + reservation_based_on: DF.Literal["Qty", "Serial and Batch"] + reserved_qty: DF.Float + sb_entries: DF.Table[SerialandBatchEntry] + status: DF.Literal[ + "Draft", "Partially Reserved", "Reserved", "Partially Delivered", "Delivered", "Cancelled" + ] + stock_uom: DF.Link | None + voucher_detail_no: DF.Data | None + voucher_no: DF.DynamicLink | None + voucher_qty: DF.Float + voucher_type: DF.Literal["", "Sales Order"] + warehouse: DF.Link | None + # end: auto-generated types + def validate(self) -> None: from erpnext.stock.utils import validate_disabled_warehouse, validate_warehouse_company diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index c7afb105b173..088c7cdfe1c3 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -15,6 +15,51 @@ class StockSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action_if_quality_inspection_is_not_submitted: DF.Literal["Stop", "Warn"] + action_if_quality_inspection_is_rejected: DF.Literal["Stop", "Warn"] + allow_from_dn: DF.Check + allow_from_pr: DF.Check + allow_negative_stock: DF.Check + allow_partial_reservation: DF.Check + allow_to_edit_stock_uom_qty_for_purchase: DF.Check + allow_to_edit_stock_uom_qty_for_sales: DF.Check + auto_create_serial_and_batch_bundle_for_outward: DF.Check + auto_indent: DF.Check + auto_insert_price_list_rate_if_missing: DF.Check + auto_reserve_serial_and_batch: DF.Check + auto_reserve_stock_for_sales_order_on_purchase: DF.Check + clean_description_html: DF.Check + default_warehouse: DF.Link | None + disable_serial_no_and_batch_selector: DF.Check + enable_stock_reservation: DF.Check + item_group: DF.Link | None + item_naming_by: DF.Literal["Item Code", "Naming Series"] + mr_qty_allowance: DF.Float + naming_series_prefix: DF.Data | None + over_delivery_receipt_allowance: DF.Float + pick_serial_and_batch_based_on: DF.Literal["FIFO", "LIFO", "Expiry"] + reorder_email_notify: DF.Check + role_allowed_to_create_edit_back_dated_transactions: DF.Link | None + role_allowed_to_over_deliver_receive: DF.Link | None + sample_retention_warehouse: DF.Link | None + show_barcode_field: DF.Check + stock_auth_role: DF.Link | None + stock_frozen_upto: DF.Date | None + stock_frozen_upto_days: DF.Int + stock_uom: DF.Link | None + update_existing_price_list_rate: DF.Check + use_naming_series: DF.Check + valuation_method: DF.Literal["FIFO", "Moving Average", "LIFO"] + # end: auto-generated types + def validate(self): for key in [ "item_naming_by", diff --git a/erpnext/stock/doctype/uom_category/uom_category.py b/erpnext/stock/doctype/uom_category/uom_category.py index 844f6e636432..edbd1b9614b4 100644 --- a/erpnext/stock/doctype/uom_category/uom_category.py +++ b/erpnext/stock/doctype/uom_category/uom_category.py @@ -6,4 +6,15 @@ class UOMCategory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + category_name: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py index e17a01eabc17..d73ba65ca956 100644 --- a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py +++ b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py @@ -6,4 +6,19 @@ class UOMConversionDetail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + conversion_factor: DF.Float + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + uom: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/variant_field/variant_field.py b/erpnext/stock/doctype/variant_field/variant_field.py index e8e02a0e8564..65c9ee7d523a 100644 --- a/erpnext/stock/doctype/variant_field/variant_field.py +++ b/erpnext/stock/doctype/variant_field/variant_field.py @@ -6,4 +6,18 @@ class VariantField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + field_name: DF.Autocomplete + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py index 430a8d17e01e..ef9b12eca279 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.py +++ b/erpnext/stock/doctype/warehouse/warehouse.py @@ -13,6 +13,35 @@ class Warehouse(NestedSet): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + account: DF.Link | None + address_line_1: DF.Data | None + address_line_2: DF.Data | None + city: DF.Data | None + company: DF.Link + default_in_transit_warehouse: DF.Link | None + disabled: DF.Check + email_id: DF.Data | None + is_group: DF.Check + lft: DF.Int + mobile_no: DF.Data | None + old_parent: DF.Link | None + parent_warehouse: DF.Link | None + phone_no: DF.Data | None + pin: DF.Data | None + rgt: DF.Int + state: DF.Data | None + warehouse_name: DF.Data + warehouse_type: DF.Link | None + # end: auto-generated types + nsm_parent_field = "parent_warehouse" def autoname(self): diff --git a/erpnext/stock/doctype/warehouse_type/warehouse_type.py b/erpnext/stock/doctype/warehouse_type/warehouse_type.py index 3e07fe7d3cfd..91c83ba3444e 100644 --- a/erpnext/stock/doctype/warehouse_type/warehouse_type.py +++ b/erpnext/stock/doctype/warehouse_type/warehouse_type.py @@ -7,4 +7,15 @@ class WarehouseType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/subcontracting/doctype/subcontracting_bom/subcontracting_bom.py b/erpnext/subcontracting/doctype/subcontracting_bom/subcontracting_bom.py index 49ba98653f50..6a889b16d87d 100644 --- a/erpnext/subcontracting/doctype/subcontracting_bom/subcontracting_bom.py +++ b/erpnext/subcontracting/doctype/subcontracting_bom/subcontracting_bom.py @@ -8,6 +8,25 @@ class SubcontractingBOM(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + conversion_factor: DF.Float + finished_good: DF.Link + finished_good_bom: DF.Link + finished_good_qty: DF.Float + finished_good_uom: DF.Link | None + is_active: DF.Check + service_item: DF.Link + service_item_qty: DF.Float + service_item_uom: DF.Link + # end: auto-generated types + def validate(self): self.validate_finished_good() self.validate_service_item() diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py index 6a658460da96..68d98fc73428 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py @@ -13,6 +13,73 @@ class SubcontractingOrder(SubcontractingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.landed_cost_taxes_and_charges.landed_cost_taxes_and_charges import ( + LandedCostTaxesandCharges, + ) + from erpnext.subcontracting.doctype.subcontracting_order_item.subcontracting_order_item import ( + SubcontractingOrderItem, + ) + from erpnext.subcontracting.doctype.subcontracting_order_service_item.subcontracting_order_service_item import ( + SubcontractingOrderServiceItem, + ) + from erpnext.subcontracting.doctype.subcontracting_order_supplied_item.subcontracting_order_supplied_item import ( + SubcontractingOrderSuppliedItem, + ) + + additional_costs: DF.Table[LandedCostTaxesandCharges] + address_display: DF.SmallText | None + amended_from: DF.Link | None + billing_address: DF.Link | None + billing_address_display: DF.SmallText | None + company: DF.Link + contact_display: DF.SmallText | None + contact_email: DF.SmallText | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + cost_center: DF.Link | None + distribute_additional_costs_based_on: DF.Literal["Qty", "Amount"] + items: DF.Table[SubcontractingOrderItem] + letter_head: DF.Link | None + naming_series: DF.Literal["SC-ORD-.YYYY.-"] + per_received: DF.Percent + project: DF.Link | None + purchase_order: DF.Link + schedule_date: DF.Date | None + select_print_heading: DF.Link | None + service_items: DF.Table[SubcontractingOrderServiceItem] + set_reserve_warehouse: DF.Link | None + set_warehouse: DF.Link | None + shipping_address: DF.Link | None + shipping_address_display: DF.SmallText | None + status: DF.Literal[ + "Draft", + "Open", + "Partially Received", + "Completed", + "Material Transferred", + "Partial Material Transferred", + "Cancelled", + ] + supplied_items: DF.Table[SubcontractingOrderSuppliedItem] + supplier: DF.Link + supplier_address: DF.Link | None + supplier_name: DF.Data + supplier_warehouse: DF.Link + title: DF.Data | None + total: DF.Currency + total_additional_costs: DF.Currency + total_qty: DF.Float + transaction_date: DF.Date + # end: auto-generated types + def before_validate(self): super(SubcontractingOrder, self).before_validate() diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py index 174f5b212c2d..fcd143c1dd94 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py @@ -6,4 +6,43 @@ class SubcontractingOrderItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + additional_cost_per_qty: DF.Currency + amount: DF.Currency + bom: DF.Link + conversion_factor: DF.Float + cost_center: DF.Link | None + description: DF.TextEditor + expected_delivery_date: DF.Date | None + expense_account: DF.Link | None + image: DF.Attach | None + include_exploded_items: DF.Check + item_code: DF.Link + item_name: DF.Data + manufacturer: DF.Link | None + manufacturer_part_no: DF.Data | None + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project: DF.Link | None + purchase_order_item: DF.Data | None + qty: DF.Float + rate: DF.Currency + received_qty: DF.Float + returned_qty: DF.Float + rm_cost_per_qty: DF.Currency + schedule_date: DF.Date | None + service_cost_per_qty: DF.Currency + stock_uom: DF.Link + warehouse: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py b/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py index ad6289d9231c..cc4901baf45c 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py @@ -6,4 +6,25 @@ class SubcontractingOrderServiceItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + fg_item: DF.Link + fg_item_qty: DF.Float + item_code: DF.Link + item_name: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + purchase_order_item: DF.Data | None + qty: DF.Float + rate: DF.Currency + # end: auto-generated types + pass diff --git a/erpnext/subcontracting/doctype/subcontracting_order_supplied_item/subcontracting_order_supplied_item.py b/erpnext/subcontracting/doctype/subcontracting_order_supplied_item/subcontracting_order_supplied_item.py index 5619e3b79aef..4892601d0826 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_supplied_item/subcontracting_order_supplied_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_supplied_item/subcontracting_order_supplied_item.py @@ -6,4 +6,31 @@ class SubcontractingOrderSuppliedItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + bom_detail_no: DF.Data | None + consumed_qty: DF.Float + conversion_factor: DF.Float + main_item_code: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Currency + reference_name: DF.Data | None + required_qty: DF.Float + reserve_warehouse: DF.Link | None + returned_qty: DF.Float + rm_item_code: DF.Link | None + stock_uom: DF.Link | None + supplied_qty: DF.Float + total_supplied_qty: DF.Float + # end: auto-generated types + pass diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index 37caf8397079..ac845d86fb77 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -13,6 +13,76 @@ class SubcontractingReceipt(SubcontractingController): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.stock.doctype.landed_cost_taxes_and_charges.landed_cost_taxes_and_charges import ( + LandedCostTaxesandCharges, + ) + from erpnext.subcontracting.doctype.subcontracting_receipt_item.subcontracting_receipt_item import ( + SubcontractingReceiptItem, + ) + from erpnext.subcontracting.doctype.subcontracting_receipt_supplied_item.subcontracting_receipt_supplied_item import ( + SubcontractingReceiptSuppliedItem, + ) + + additional_costs: DF.Table[LandedCostTaxesandCharges] + address_display: DF.SmallText | None + amended_from: DF.Link | None + auto_repeat: DF.Link | None + bill_date: DF.Date | None + bill_no: DF.Data | None + billing_address: DF.Link | None + billing_address_display: DF.SmallText | None + company: DF.Link + contact_display: DF.SmallText | None + contact_email: DF.SmallText | None + contact_mobile: DF.SmallText | None + contact_person: DF.Link | None + cost_center: DF.Link | None + distribute_additional_costs_based_on: DF.Literal["Qty", "Amount"] + in_words: DF.Data | None + instructions: DF.SmallText | None + is_return: DF.Check + items: DF.Table[SubcontractingReceiptItem] + language: DF.Data | None + letter_head: DF.Link | None + lr_date: DF.Date | None + lr_no: DF.Data | None + naming_series: DF.Literal["MAT-SCR-.YYYY.-", "MAT-SCR-RET-.YYYY.-"] + per_returned: DF.Percent + posting_date: DF.Date + posting_time: DF.Time + project: DF.Link | None + range: DF.Data | None + rejected_warehouse: DF.Link | None + remarks: DF.SmallText | None + represents_company: DF.Link | None + return_against: DF.Link | None + select_print_heading: DF.Link | None + set_posting_time: DF.Check + set_warehouse: DF.Link | None + shipping_address: DF.Link | None + shipping_address_display: DF.SmallText | None + status: DF.Literal["", "Draft", "Completed", "Return", "Return Issued", "Cancelled", "Closed"] + supplied_items: DF.Table[SubcontractingReceiptSuppliedItem] + supplier: DF.Link + supplier_address: DF.Link | None + supplier_delivery_note: DF.Data | None + supplier_name: DF.Data | None + supplier_warehouse: DF.Link | None + title: DF.Data | None + total: DF.Currency + total_additional_costs: DF.Currency + total_qty: DF.Float + transporter_name: DF.Data | None + # end: auto-generated types + def __init__(self, *args, **kwargs): super(SubcontractingReceipt, self).__init__(*args, **kwargs) self.status_updater = [ diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py index 374f95baf39b..d02160ece451 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py @@ -6,4 +6,59 @@ class SubcontractingReceiptItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + additional_cost_per_qty: DF.Currency + amount: DF.Currency + batch_no: DF.Link | None + bom: DF.Link | None + brand: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + description: DF.TextEditor | None + expense_account: DF.Link | None + image: DF.Attach | None + include_exploded_items: DF.Check + is_scrap_item: DF.Check + item_code: DF.Link + item_name: DF.Data | None + manufacturer: DF.Link | None + manufacturer_part_no: DF.Data | None + page_break: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + project: DF.Link | None + purchase_order: DF.Link | None + purchase_order_item: DF.Data | None + qty: DF.Float + quality_inspection: DF.Link | None + rate: DF.Currency + received_qty: DF.Float + reference_name: DF.Data | None + rejected_qty: DF.Float + rejected_serial_and_batch_bundle: DF.Link | None + rejected_serial_no: DF.SmallText | None + rejected_warehouse: DF.Link | None + returned_qty: DF.Float + rm_cost_per_qty: DF.Currency + rm_supp_cost: DF.Currency + schedule_date: DF.Date | None + scrap_cost_per_qty: DF.Float + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + service_cost_per_qty: DF.Currency + stock_uom: DF.Link + subcontracting_order: DF.Link | None + subcontracting_order_item: DF.Data | None + subcontracting_receipt_item: DF.Data | None + warehouse: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_supplied_item/subcontracting_receipt_supplied_item.py b/erpnext/subcontracting/doctype/subcontracting_receipt_supplied_item/subcontracting_receipt_supplied_item.py index f4d2805d4b17..2ee55518d52a 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_supplied_item/subcontracting_receipt_supplied_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_supplied_item/subcontracting_receipt_supplied_item.py @@ -6,4 +6,35 @@ class SubcontractingReceiptSuppliedItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + available_qty_for_consumption: DF.Float + batch_no: DF.Link | None + bom_detail_no: DF.Data | None + consumed_qty: DF.Float + conversion_factor: DF.Float + current_stock: DF.Float + description: DF.TextEditor | None + item_name: DF.Data | None + main_item_code: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Currency + reference_name: DF.Data | None + required_qty: DF.Float + rm_item_code: DF.Link | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.Text | None + stock_uom: DF.Link | None + subcontracting_order: DF.Link | None + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index f23419e98e8b..c03fb3ea1ff5 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -18,6 +18,50 @@ class Issue(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + agreement_status: DF.Literal["First Response Due", "Resolution Due", "Fulfilled", "Failed"] + attachment: DF.Attach | None + avg_response_time: DF.Duration | None + company: DF.Link | None + contact: DF.Link | None + content_type: DF.Data | None + customer: DF.Link | None + customer_name: DF.Data | None + description: DF.TextEditor | None + email_account: DF.Link | None + first_responded_on: DF.Datetime | None + first_response_time: DF.Duration | None + issue_split_from: DF.Link | None + issue_type: DF.Link | None + lead: DF.Link | None + naming_series: DF.Literal["ISS-.YYYY.-"] + on_hold_since: DF.Datetime | None + opening_date: DF.Date | None + opening_time: DF.Time | None + priority: DF.Link | None + project: DF.Link | None + raised_by: DF.Data | None + resolution_by: DF.Datetime | None + resolution_date: DF.Datetime | None + resolution_details: DF.TextEditor | None + resolution_time: DF.Duration | None + response_by: DF.Datetime | None + service_level_agreement: DF.Link | None + service_level_agreement_creation: DF.Datetime | None + status: DF.Literal["Open", "Replied", "On Hold", "Resolved", "Closed"] + subject: DF.Data + total_hold_time: DF.Duration | None + user_resolution_time: DF.Duration | None + via_customer_portal: DF.Check + # end: auto-generated types + def validate(self): if self.is_new() and self.via_customer_portal: self.flags.create_communication = True diff --git a/erpnext/support/doctype/issue_priority/issue_priority.py b/erpnext/support/doctype/issue_priority/issue_priority.py index f21a453d2405..e2fbc70c546b 100644 --- a/erpnext/support/doctype/issue_priority/issue_priority.py +++ b/erpnext/support/doctype/issue_priority/issue_priority.py @@ -6,4 +6,15 @@ class IssuePriority(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/issue_type/issue_type.py b/erpnext/support/doctype/issue_type/issue_type.py index c5adc8b90385..b33033b0f06f 100644 --- a/erpnext/support/doctype/issue_type/issue_type.py +++ b/erpnext/support/doctype/issue_type/issue_type.py @@ -6,4 +6,15 @@ class IssueType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py b/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py index 41d4f7f501fc..59a541423d67 100644 --- a/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py +++ b/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py @@ -7,4 +7,18 @@ class PauseSLAOnStatus(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + status: DF.Literal + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/service_day/service_day.py b/erpnext/support/doctype/service_day/service_day.py index 4a3b1f00dbf7..b90a0776becf 100644 --- a/erpnext/support/doctype/service_day/service_day.py +++ b/erpnext/support/doctype/service_day/service_day.py @@ -7,4 +7,20 @@ class ServiceDay(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + end_time: DF.Time + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + start_time: DF.Time + workday: DF.Literal["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py index 6c9bc54f7e6d..879381c3f218 100644 --- a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py +++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py @@ -29,6 +29,41 @@ class ServiceLevelAgreement(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.support.doctype.pause_sla_on_status.pause_sla_on_status import PauseSLAOnStatus + from erpnext.support.doctype.service_day.service_day import ServiceDay + from erpnext.support.doctype.service_level_priority.service_level_priority import ( + ServiceLevelPriority, + ) + from erpnext.support.doctype.sla_fulfilled_on_status.sla_fulfilled_on_status import ( + SLAFulfilledOnStatus, + ) + + apply_sla_for_resolution: DF.Check + condition: DF.Code | None + default_priority: DF.Link | None + default_service_level_agreement: DF.Check + document_type: DF.Link + enabled: DF.Check + end_date: DF.Date | None + entity: DF.DynamicLink | None + entity_type: DF.Literal["", "Customer", "Customer Group", "Territory"] + holiday_list: DF.Link + pause_sla_on: DF.Table[PauseSLAOnStatus] + priorities: DF.Table[ServiceLevelPriority] + service_level: DF.Data + sla_fulfilled_on: DF.Table[SLAFulfilledOnStatus] + start_date: DF.Date | None + support_and_resolution: DF.Table[ServiceDay] + # end: auto-generated types + def validate(self): self.validate_selected_doctype() self.validate_doc() diff --git a/erpnext/support/doctype/service_level_priority/service_level_priority.py b/erpnext/support/doctype/service_level_priority/service_level_priority.py index adb153e2563d..6ee6fdfcf1d7 100644 --- a/erpnext/support/doctype/service_level_priority/service_level_priority.py +++ b/erpnext/support/doctype/service_level_priority/service_level_priority.py @@ -7,4 +7,21 @@ class ServiceLevelPriority(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + default_priority: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + priority: DF.Link + resolution_time: DF.Duration | None + response_time: DF.Duration + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/sla_fulfilled_on_status/sla_fulfilled_on_status.py b/erpnext/support/doctype/sla_fulfilled_on_status/sla_fulfilled_on_status.py index dbffcb8060b1..b348bf198bbd 100644 --- a/erpnext/support/doctype/sla_fulfilled_on_status/sla_fulfilled_on_status.py +++ b/erpnext/support/doctype/sla_fulfilled_on_status/sla_fulfilled_on_status.py @@ -6,4 +6,18 @@ class SLAFulfilledOnStatus(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + status: DF.Literal + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/support_search_source/support_search_source.py b/erpnext/support/doctype/support_search_source/support_search_source.py index 2270015a1928..b4aa9529366f 100644 --- a/erpnext/support/doctype/support_search_source/support_search_source.py +++ b/erpnext/support/doctype/support_search_source/support_search_source.py @@ -6,4 +6,31 @@ class SupportSearchSource(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + base_url: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + post_description_key: DF.Data | None + post_route: DF.Data | None + post_route_key_list: DF.Data | None + post_title_key: DF.Data | None + query_route: DF.Data | None + response_result_key_path: DF.Data | None + result_preview_field: DF.Data | None + result_route_field: DF.Data | None + result_title_field: DF.Data | None + search_term_param_name: DF.Data | None + source_doctype: DF.Link | None + source_name: DF.Data | None + source_type: DF.Literal["API", "Link"] + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/support_settings/support_settings.py b/erpnext/support/doctype/support_settings/support_settings.py index ee8a3f500665..3bc1afed7ae3 100644 --- a/erpnext/support/doctype/support_settings/support_settings.py +++ b/erpnext/support/doctype/support_settings/support_settings.py @@ -6,4 +6,33 @@ class SupportSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.support.doctype.support_search_source.support_search_source import ( + SupportSearchSource, + ) + + allow_resetting_service_level_agreement: DF.Check + close_issue_after_days: DF.Int + forum_url: DF.Data | None + get_latest_query: DF.Data | None + get_started_sections: DF.Code | None + greeting_subtitle: DF.Data | None + greeting_title: DF.Data | None + post_description_key: DF.Data | None + post_route_key: DF.Data | None + post_route_string: DF.Data | None + post_title_key: DF.Data | None + response_key_list: DF.Data | None + search_apis: DF.Table[SupportSearchSource] + show_latest_forum_posts: DF.Check + track_service_level_agreement: DF.Check + # end: auto-generated types + pass diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.py b/erpnext/support/doctype/warranty_claim/warranty_claim.py index ff63b77f9ed8..e0eb5a3ab884 100644 --- a/erpnext/support/doctype/warranty_claim/warranty_claim.py +++ b/erpnext/support/doctype/warranty_claim/warranty_claim.py @@ -10,6 +10,47 @@ class WarrantyClaim(TransactionBase): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + address_display: DF.SmallText | None + amc_expiry_date: DF.Date | None + amended_from: DF.Link | None + company: DF.Link + complaint: DF.TextEditor + complaint_date: DF.Date + complaint_raised_by: DF.Data | None + contact_display: DF.SmallText | None + contact_email: DF.Data | None + contact_mobile: DF.Data | None + contact_person: DF.Link | None + customer: DF.Link + customer_address: DF.Link | None + customer_group: DF.Link | None + customer_name: DF.Data | None + description: DF.SmallText | None + from_company: DF.Data | None + item_code: DF.Link | None + item_name: DF.Data | None + naming_series: DF.Literal["SER-WRN-.YYYY.-"] + resolution_date: DF.Datetime | None + resolution_details: DF.Text | None + resolved_by: DF.Link | None + serial_no: DF.Link | None + service_address: DF.SmallText | None + status: DF.Literal["", "Open", "Closed", "Work In Progress", "Cancelled"] + territory: DF.Link | None + warranty_amc_status: DF.Literal[ + "", "Under Warranty", "Out of Warranty", "Under AMC", "Out of AMC" + ] + warranty_expiry_date: DF.Date | None + # end: auto-generated types + def validate(self): if session["user"] != "Guest" and not self.customer: frappe.throw(_("Customer is required")) diff --git a/erpnext/telephony/doctype/call_log/call_log.py b/erpnext/telephony/doctype/call_log/call_log.py index 1d6839c1e6e4..259f55b572a9 100644 --- a/erpnext/telephony/doctype/call_log/call_log.py +++ b/erpnext/telephony/doctype/call_log/call_log.py @@ -16,6 +16,34 @@ class CallLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.dynamic_link.dynamic_link import DynamicLink + from frappe.types import DF + + call_received_by: DF.Link | None + customer: DF.Link | None + duration: DF.Duration | None + employee_user_id: DF.Link | None + end_time: DF.Datetime | None + id: DF.Data | None + links: DF.Table[DynamicLink] + medium: DF.Data | None + recording_url: DF.Data | None + start_time: DF.Datetime | None + status: DF.Literal[ + "Ringing", "In Progress", "Completed", "Failed", "Busy", "No Answer", "Queued", "Canceled" + ] + summary: DF.SmallText | None + to: DF.Data | None + type: DF.Literal["Incoming", "Outgoing"] + type_of_call: DF.Link | None + # end: auto-generated types + def validate(self): deduplicate_dynamic_links(self) diff --git a/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py b/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py index b73f385cc3db..ddc86c409662 100644 --- a/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py +++ b/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py @@ -7,4 +7,23 @@ class IncomingCallHandlingSchedule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + agent_group: DF.Link + day_of_week: DF.Literal[ + "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" + ] + from_time: DF.Time + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + to_time: DF.Time + # end: auto-generated types + pass diff --git a/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py b/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py index 5edf81df7369..f80c2d229ceb 100644 --- a/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py +++ b/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py @@ -11,6 +11,25 @@ class IncomingCallSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.telephony.doctype.incoming_call_handling_schedule.incoming_call_handling_schedule import ( + IncomingCallHandlingSchedule, + ) + + agent_busy_message: DF.Data | None + agent_unavailable_message: DF.Data | None + call_handling_schedule: DF.Table[IncomingCallHandlingSchedule] + call_routing: DF.Literal["Sequential", "Simultaneous"] + greeting_message: DF.Data | None + # end: auto-generated types + def validate(self): """List of validations * Make sure that to time slot is ahead of from time slot in call schedule diff --git a/erpnext/telephony/doctype/telephony_call_type/telephony_call_type.py b/erpnext/telephony/doctype/telephony_call_type/telephony_call_type.py index 944ffef36f23..ddb6f93f2e5f 100644 --- a/erpnext/telephony/doctype/telephony_call_type/telephony_call_type.py +++ b/erpnext/telephony/doctype/telephony_call_type/telephony_call_type.py @@ -6,4 +6,16 @@ class TelephonyCallType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + call_type: DF.Data + # end: auto-generated types + pass diff --git a/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py b/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py index 9f9486f58046..da3a83a9eebb 100644 --- a/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py +++ b/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py @@ -7,4 +7,19 @@ class VoiceCallSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + agent_busy_message: DF.Data | None + agent_unavailable_message: DF.Data | None + call_receiving_device: DF.Literal["Computer", "Phone"] + greeting_message: DF.Data | None + user: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/utilities/doctype/portal_user/portal_user.py b/erpnext/utilities/doctype/portal_user/portal_user.py index 2e0064d1981c..176e32d6b52a 100644 --- a/erpnext/utilities/doctype/portal_user/portal_user.py +++ b/erpnext/utilities/doctype/portal_user/portal_user.py @@ -6,4 +6,18 @@ class PortalUser(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + user: DF.Link + # end: auto-generated types + pass diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.py b/erpnext/utilities/doctype/rename_tool/rename_tool.py index b31574cdc85c..19b29f79aa12 100644 --- a/erpnext/utilities/doctype/rename_tool/rename_tool.py +++ b/erpnext/utilities/doctype/rename_tool/rename_tool.py @@ -10,6 +10,18 @@ class RenameTool(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + file_to_rename: DF.Attach | None + select_doctype: DF.Literal + # end: auto-generated types + pass diff --git a/erpnext/utilities/doctype/sms_log/sms_log.py b/erpnext/utilities/doctype/sms_log/sms_log.py index 85140f366ff1..8e4c248fd674 100644 --- a/erpnext/utilities/doctype/sms_log/sms_log.py +++ b/erpnext/utilities/doctype/sms_log/sms_log.py @@ -6,4 +6,21 @@ class SMSLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + message: DF.SmallText | None + no_of_requested_sms: DF.Int + no_of_sent_sms: DF.Int + requested_numbers: DF.Code | None + sender_name: DF.Data | None + sent_on: DF.Date | None + sent_to: DF.Code | None + # end: auto-generated types + pass diff --git a/erpnext/utilities/doctype/video/video.py b/erpnext/utilities/doctype/video/video.py index 62033a5e18ef..1a9fe19732e6 100644 --- a/erpnext/utilities/doctype/video/video.py +++ b/erpnext/utilities/doctype/video/video.py @@ -15,6 +15,28 @@ class Video(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + comment_count: DF.Float + description: DF.TextEditor + dislike_count: DF.Float + duration: DF.Duration | None + image: DF.AttachImage | None + like_count: DF.Float + provider: DF.Literal["YouTube", "Vimeo"] + publish_date: DF.Date | None + title: DF.Data + url: DF.Data + view_count: DF.Float + youtube_video_id: DF.Data | None + # end: auto-generated types + def validate(self): if self.provider == "YouTube" and is_tracking_enabled(): self.set_video_id() diff --git a/erpnext/utilities/doctype/video_settings/video_settings.py b/erpnext/utilities/doctype/video_settings/video_settings.py index 9bc7972bb37a..762a795a733c 100644 --- a/erpnext/utilities/doctype/video_settings/video_settings.py +++ b/erpnext/utilities/doctype/video_settings/video_settings.py @@ -9,6 +9,19 @@ class VideoSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + api_key: DF.Data | None + enable_youtube_tracking: DF.Check + frequency: DF.Literal["30 mins", "1 hr", "6 hrs", "Daily"] + # end: auto-generated types + def validate(self): self.validate_youtube_api_key()