refactor: ship Custom Fields and Property Setters as module customizations

Move the Sales Invoice withholding fields and both Property Setters from
fixtures to default_thai_company/custom/{sales_invoice,payment_entry}.json
with sync_on_migrate. sync_customizations updates Custom Fields in place
instead of the delete/re-insert that fixtures do on every migrate.
This commit is contained in:
2026-09-12 13:13:49 +00:00
parent ed4062590a
commit abeb2af0c8
6 changed files with 266 additions and 114 deletions
+2 -27
View File
@@ -84,38 +84,13 @@ jinja = {
# Fixtures
# --------
# Custom Fields and Property Setters live in default_thai_company/custom/*.json
# (synced in place on install and migrate); fixtures are for whole documents.
fixtures = [
{"doctype": "Letter Head", "filters": [["name", "in", ["Default Letter Head"]]]},
{"doctype": "Address Template", "filters": [["name", "in", ["Thailand"]]]},
{"doctype": "Print Format", "filters": [["name", "in", ["Default Standard Sales Invoice"]]]},
{
"doctype": "Property Setter",
"filters": [
[
"name",
"in",
[
"Sales Invoice-main-default_print_format",
"Payment Entry-apply_tax_withholding_amount-depends_on",
],
]
],
},
{"doctype": "Tax Withholding Category", "filters": [["name", "like", "WHT %"]]},
{
"doctype": "Custom Field",
"filters": [
[
"name",
"in",
[
"Sales Invoice-tax_withholding_category",
"Sales Invoice-withholding_tax_amount",
"Sales Invoice-amount_after_withholding",
],
]
],
},
]
# Installation