-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from eliusmgani/feat_set_truck_as_dimension
chore: remove 'truck' from main doctype 'Cargo Registration' because cargo registration can be assigned to multiple manifest and got multiple trucks
- Loading branch information
Showing
6 changed files
with
33 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[pre_model_sync] | ||
|
||
[post_model_sync] | ||
vsd_fleet_ms.patches.custom_fields.add_cargo_id_custom_field_on_sales_invoice_item |
17 changes: 17 additions & 0 deletions
17
vsd_fleet_ms/patches/custom_fields/add_cargo_id_custom_field_on_sales_invoice_item.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import frappe | ||
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields | ||
|
||
def execute(): | ||
fields = { | ||
"Sales Invoice Item": [ | ||
{ | ||
"fieldname": "cargo_id", | ||
"fieldtype": "Data", | ||
"label": "Cargo ID", | ||
"insert_after": "cost_center", | ||
"read_only": 1 | ||
} | ||
] | ||
} | ||
create_custom_fields(fields, update=True) | ||
frappe.reload_doc("accounts", "doctype", "sales_invoice_item", force=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters