How to fix this

Hello,

Can you share the full traceback?

Also try

bench migrate

App Versions

{
      "erpeaz": "0.0.1",
      "erpnext": "14.77.2",
      "frappe": "14.85.2",
      "frappe_whatsapp": "1.0.7",
      "hrms": "16.0.0-dev",
      "india_compliance": "14.30.7",
      "posawesome": "6.3.0"
}

Route

Form/Sales Invoice/new-sales-invoice-jqbhzwfjlm

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 97, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 48, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1619, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 31, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 310, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 332, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 265, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1061, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 931, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1283, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1267, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/india_compliance/india_compliance/gst_india/overrides/sales_invoice.py", line 61, in validate
    validate_backdated_transaction(doc, gst_settings)
  File "apps/india_compliance/india_compliance/gst_india/overrides/transaction.py", line 707, in validate_backdated_transaction
    if gstr_1_filed_upto := restrict_gstr_1_transaction_for(
  File "apps/india_compliance/india_compliance/gst_india/doctype/gst_settings/gst_settings.py", line 511, in restrict_gstr_1_transaction_for
    if not gst_settings.restrict_changes_after_gstr_1:
AttributeError: 'GSTSettings' object has no attribute 'restrict_changes_after_gstr_1'

Request Data

{
      "type": "POST",
      "args": {
            "doc": "{\"docstatus\":0,\"doctype\":\"Sales Invoice\",\"name\":\"new-sales-invoice-jqbhzwfjlm\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"chapazheri@gmail.com\",\"naming_series\":\"SINV-.YY.-\",\"e_waybill_status\":\"\",\"posting_date\":\"2024-11-25\",\"posting_time\":\"17:53:28\",\"set_posting_time\":0,\"is_pos\":0,\"is_consolidated\":0,\"is_return\":0,\"reason_for_issuing_document\":\"\",\"update_billed_amount_in_sales_order\":0,\"update_billed_amount_in_delivery_note\":1,\"is_debit_note\":0,\"is_reverse_charge\":0,\"is_export_with_gst\":0,\"selling_price_list\":\"INR Selling\",\"ignore_pricing_rule\":0,\"update_stock\":0,\"use_company_roundoff_cost_center\":0,\"disable_rounded_total\":0,\"apply_discount_on\":\"Grand Total\",\"is_cash_or_non_trade_discount\":0,\"total_billing_amount\":0,\"allocate_advances_automatically\":1,\"only_include_allocated_payments\":1,\"write_off_outstanding_amount_automatically\":0,\"redeem_loyalty_points\":0,\"dont_create_loyalty_points\":0,\"ignore_default_payment_terms_template\":0,\"is_opening\":\"No\",\"group_same_items\":0,\"invoice_copy\":\"Original for Recipient\",\"vat_emirate\":\"\",\"tourist_tax_return\":0,\"mode_of_transport\":\"Road\",\"lr_date\":\"2024-11-25\",\"gst_vehicle_type\":\"Regular\",\"status\":\"Draft\",\"einvoice_status\":\"\",\"is_internal_customer\":0,\"is_discounted\":0,\"repost_required\":0,\"items\":[{\"docstatus\":0,\"doctype\":\"Sales Invoice Item\",\"name\":\"new-sales-invoice-item-wwfldrwabk\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"chapazheri@gmail.com\",\"has_item_scanned\":0,\"stock_uom\":\"Nos\",\"margin_type\":\"\",\"is_free_item\":0,\"grant_commission\":1,\"delivered_by_supplier\":0,\"is_fixed_asset\":0,\"enable_deferred_revenue\":0,\"allow_zero_valuation_rate\":0,\"page_break\":0,\"parent\":\"new-sales-invoice-jqbhzwfjlm\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"idx\":1,\"tax_rate\":0,\"tax_amount\":0,\"total_amount\":0,\"qty\":1,\"conversion_factor\":1,\"stock_qty\":1,\"price_list_rate\":30000000,\"base_price_list_rate\":30000000,\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":30000000,\"amount\":30000000,\"base_rate\":30000000,\"base_amount\":30000000,\"stock_uom_rate\":30000000,\"net_rate\":30000000,\"net_amount\":30000000,\"base_net_rate\":30000000,\"base_net_amount\":30000000,\"taxable_value\":0,\"igst_rate\":0,\"cgst_rate\":0,\"sgst_rate\":0,\"cess_rate\":0,\"cess_non_advol_rate\":0,\"igst_amount\":0,\"cgst_amount\":0,\"sgst_amount\":0,\"cess_amount\":0,\"cess_non_advol_amount\":0,\"weight_per_unit\":0,\"total_weight\":0,\"incoming_rate\":0,\"actual_batch_qty\":0,\"actual_qty\":0,\"delivered_qty\":0,\"tax_code\":null,\"gst_hsn_code\":null,\"is_zero_rated\":0,\"is_exempt\":0,\"item_code\":\"00125-Ceri\",\"weight_uom\":null,\"barcode\":null,\"pricing_rules\":\"\",\"item_name\":\"FUJITSU GENERAL HI-WALL INVERTER 1 TR AOGG 12CPAA-B-ODU 3*\",\"description\":\"FUJITSU GENERAL HI-WALL INVERTER 1 TR AOGG 12CPAA-B-ODU 3*\",\"image\":\"\",\"warehouse\":\"Stores - Ceri\",\"income_account\":\"Sales - Ceri\",\"expense_account\":\"Cost of Goods Sold - Ceri\",\"discount_account\":null,\"provisional_expense_account\":null,\"cost_center\":\"Main - Ceri\",\"has_serial_no\":0,\"has_batch_no\":0,\"batch_no\":null,\"uom\":\"Nos\",\"min_order_qty\":\"\",\"discount_percentage\":0,\"update_stock\":0,\"last_purchase_rate\":0,\"transaction_date\":\"2024-11-25\",\"against_blanket_order\":null,\"bom_no\":null,\"item_group\":\"Pansonic-Ceri\",\"brand\":null,\"manufacturer\":null,\"manufacturer_part_no\":null,\"item_tax_template\":\"GST 12% - Ceri\",\"gst_treatment\":\"Taxable\",\"item_tax_rate\":\"{\\\"Output Tax SGST - Ceri\\\": 6.0, \\\"Output Tax CGST - Ceri\\\": 6.0, \\\"Output Tax IGST - Ceri\\\": 12.0, \\\"Input Tax SGST - Ceri\\\": 6.0, \\\"Input Tax CGST - Ceri\\\": 6.0, \\\"Input Tax IGST - Ceri\\\": 12.0, \\\"Input Tax SGST RCM - Ceri\\\": 6.0, \\\"Input Tax CGST RCM - Ceri\\\": 6.0, \\\"Input Tax IGST RCM - Ceri\\\": 12.0}\",\"customer_item_code\":null,\"projected_qty\":-18,\"reserved_qty\":18,\"has_margin\":false,\"free_item_data\":[],\"child_docname\":\"new-sales-invoice-item-wwfldrwabk\"}],\"plc_conversion_rate\":1,\"price_list_currency\":\"INR\",\"currency\":\"INR\",\"conversion_rate\":1,\"company\":\"CHAPazheri\",\"company_address\":\"Cha pazheri-Billing\",\"custom_country\":\"India\",\"custom_abbr\":\"Ceri\",\"custom_fiscal_year\":\"2024-2025\",\"custom_plan\":\"Enterprise\",\"custom_industry\":\"General Trading\",\"company_trn\":null,\"custom_bank_name\":\"Panjab National Bank\",\"custom_account_number\":\"74589652365412\",\"custom_branch\":\"Calicut\",\"custom_ifsc_\":\"UOOIJ85666\",\"letter_head\":\"CHAPazheri\",\"company_tax_id\":\"32AACCL4721C1Z6\",\"company_address_display\":\"CHA KM/9/145-146.NEAR FEDERAL BANK KOZHIKODE ROAD<br>CHA MALAPPURAM. DT. KERALA<br>KONDOTTY -17<br>\\nKerala, State Code: 32<br>India<br>\\nPhone: 919072088738<br>Email: chapazheri@gmail.com<br>GSTIN: 32AACCL4721C1Z6<br>\",\"company_gstin\":\"32AACCL4721C1Z6\",\"custom_role_name\":\"Enterprise SALES,HR,STOCK\",\"base_net_total\":30000000,\"net_total\":30000000,\"base_total\":30000000,\"total\":30000000,\"total_qty\":1,\"rounding_adjustment\":0,\"grand_total\":33600000,\"base_grand_total\":33600000,\"total_taxes_and_charges\":3600000,\"base_total_taxes_and_charges\":3600000,\"base_rounding_adjustment\":0,\"rounded_total\":33600000,\"base_rounded_total\":33600000,\"in_words\":\"\",\"base_in_words\":\"\",\"base_discount_amount\":0,\"total_advance\":0,\"write_off_amount\":0,\"paid_amount\":0,\"base_paid_amount\":0,\"payments\":[],\"change_amount\":0,\"base_change_amount\":0,\"outstanding_amount\":33600000,\"amount_eligible_for_commission\":30000000,\"total_commission\":null,\"tax_id\":null,\"customer_name\":\"Ajosh\",\"customer_name_in_arabic\":null,\"loyalty_program\":null,\"custom_customer_trn_number\":null,\"represents_company\":null,\"customer\":\"Ajosh-Ceri-01\",\"custom_email\":null,\"custom_is_this_b2b\":\"Service\",\"custom_mobile\":null,\"debit_to\":\"Debtors - Ceri\",\"party_account_currency\":\"INR\",\"due_date\":\"2024-11-25\",\"customer_address\":\"Kozhikode-Shipping\",\"billing_address_gstin\":null,\"gst_category\":\"Unregistered\",\"address_display\":\"Kozhikode<br>Kozhikode<br>Kozhikode<br>\\nKerala, State Code: 32<br>India<br>\\nPhone: 9746361998<br>\",\"shipping_address_name\":\"Kozhikode-Shipping\",\"posa_delivery_charges\":null,\"shipping_address\":\"Kozhikode<br>Kozhikode<br>Kozhikode<br>\\nKerala, State Code: 32<br>India<br>\\nPhone: 9746361998<br>\",\"tax_category\":\"In-State\",\"place_of_supply\":\"32-Kerala\",\"taxes_and_charges\":\"Output GST In-state - Ceri\",\"taxes\":[{\"docstatus\":0,\"doctype\":\"Sales Taxes and Charges\",\"name\":\"new-sales-taxes-and-charges-lhzzaaknrp\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"chapazheri@gmail.com\",\"charge_type\":\"On Net Total\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"cost_center\":\"Main - Ceri\",\"dont_recompute_tax\":0,\"parent\":\"new-sales-invoice-jqbhzwfjlm\",\"parentfield\":\"taxes\",\"parenttype\":\"Sales Invoice\",\"idx\":1,\"row_id\":null,\"account_head\":\"Output Tax SGST - Ceri\",\"description\":\"SGST\",\"rate\":0,\"account_currency\":null,\"tax_amount\":1800000,\"total\":31800000,\"tax_amount_after_discount_amount\":1800000,\"base_tax_amount\":1800000,\"base_total\":31800000,\"base_tax_amount_after_discount_amount\":1800000,\"item_wise_tax_detail\":\"{\\\"00125-Ceri\\\":[6,1800000]}\"},{\"docstatus\":0,\"doctype\":\"Sales Taxes and Charges\",\"name\":\"new-sales-taxes-and-charges-eysyzuusku\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"chapazheri@gmail.com\",\"charge_type\":\"On Net Total\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"cost_center\":\"Main - Ceri\",\"dont_recompute_tax\":0,\"parent\":\"new-sales-invoice-jqbhzwfjlm\",\"parentfield\":\"taxes\",\"parenttype\":\"Sales Invoice\",\"idx\":2,\"row_id\":null,\"account_head\":\"Output Tax CGST - Ceri\",\"description\":\"CGST\",\"rate\":0,\"account_currency\":null,\"tax_amount\":1800000,\"total\":33600000,\"tax_amount_after_discount_amount\":1800000,\"base_tax_amount\":1800000,\"base_total\":33600000,\"base_tax_amount_after_discount_amount\":1800000,\"item_wise_tax_detail\":\"{\\\"00125-Ceri\\\":[6,1800000]}\"}],\"contact_person\":null,\"contact_display\":null,\"contact_email\":null,\"contact_mobile\":null,\"customer_group\":null,\"territory\":null,\"language\":\"en\",\"payment_terms_template\":null,\"sales_team\":[],\"total_net_weight\":0}",
            "action": "Save"
      },
      "btn": {
            "jQuery360066554352318723911": {
                  "events": {
                        "click": [
                              {
                                    "type": "click",
                                    "origType": "click",
                                    "guid": 9497,
                                    "namespace": ""
                              }
                        ]
                  }
            }
      },
      "freeze": true,
      "headers": {},
      "error_handlers": {},
      "url": "/api/method/frappe.desk.form.save.savedocs"
}

Response Data

{
      "exception": "AttributeError: 'GSTSettings' object has no attribute 'restrict_changes_after_gstr_1'"
}

Hello,

Is your India Compliance app is updated?

Please, migrate your site once

bench migrate