Skip to content

Commit

Permalink
fix: update property setters for accounts settings and it's patch to …
Browse files Browse the repository at this point in the history
…default it to billing address
  • Loading branch information
vorasmit committed Oct 18, 2024
1 parent ef52fb2 commit ddfc99b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions india_compliance/gst_india/setup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,6 @@ def set_default_accounts_settings():
"""
Accounts Settings overridden by India Compliance
- Determine Address Tax Category From:
This is overriden to be Billing Address, since that's the correct
address for determining GST applicablility
- Automatically Add Taxes and Charges from Item Tax Template:
This is overriden to be "No". Item Tax Templates are designed to have
all GST Accounts and are primarily used for selection of tax rate.
Expand All @@ -252,11 +248,7 @@ def set_default_accounts_settings():
show_accounts_settings_override_warning()

frappe.db.set_single_value(
"Accounts Settings",
{
"determine_address_tax_category_from": "Billing Address",
"add_taxes_from_item_tax_template": 0,
},
"Accounts Settings", "add_taxes_from_item_tax_template", 0
)

frappe.db.set_default("add_taxes_from_item_tax_template", 0)
Expand Down
2 changes: 1 addition & 1 deletion india_compliance/gst_india/setup/property_setters.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_property_setters(*, include_defaults=False):
"doctype": "Accounts Settings",
"fieldname": "determine_address_tax_category_from",
"property": "read_only",
"value": "1",
"value": "0",
},
{
"doctype": "Accounts Settings",
Expand Down
2 changes: 1 addition & 1 deletion india_compliance/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ india_compliance.patches.v15.remove_duplicate_web_template
[post_model_sync]
india_compliance.patches.v14.set_default_for_overridden_accounts_setting
execute:from india_compliance.gst_india.setup import create_custom_fields; create_custom_fields() #58
execute:from india_compliance.gst_india.setup import create_property_setters; create_property_setters() #8
execute:from india_compliance.gst_india.setup import create_property_setters; create_property_setters() #9
execute:from india_compliance.income_tax_india.setup import create_custom_fields; create_custom_fields() #2
india_compliance.patches.post_install.remove_old_fields #2
india_compliance.patches.post_install.set_gst_tax_type
Expand Down

0 comments on commit ddfc99b

Please sign in to comment.