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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user