Skip to content

Commit

Permalink
fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalutu committed Jan 6, 2025
1 parent 09d01c7 commit ed2c537
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
18 changes: 18 additions & 0 deletions rentals/fixtures/vehicle_type.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"description": null,
"docstatus": 0,
"doctype": "Vehicle Type",
"is_standard": 1,
"modified": "2025-01-07 00:04:24.505943",
"name": "SUV"
},
{
"description": null,
"docstatus": 0,
"doctype": "Vehicle Type",
"is_standard": 1,
"modified": "2025-01-07 00:04:14.215472",
"name": "Hatchback"
}
]
2 changes: 2 additions & 0 deletions rentals/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
app_email = "[email protected]"
app_license = "mit"

fixtures = [{"dt":"Vehicle Type", "filters":{"is_standard": 1}}]

# Apps
# ------------------

Expand Down
11 changes: 9 additions & 2 deletions rentals/rentals/doctype/vehicle_type/vehicle_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"description"
"description",
"is_standard"
],
"fields": [
{
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description"
},
{
"default": "0",
"fieldname": "is_standard",
"fieldtype": "Check",
"label": "Is Standard?"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-01-06 23:51:08.292102",
"modified": "2025-01-07 00:03:50.859922",
"modified_by": "Administrator",
"module": "Rentals",
"name": "Vehicle Type",
Expand Down

0 comments on commit ed2c537

Please sign in to comment.