-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make weight required if weight UOM is present and vice versa (#108)
* fix: make weight required if weight UOM is present and vice versa * fix: update commit hashes for overriden methods
- Loading branch information
1 parent
7e89b54
commit fdf6a44
Showing
3 changed files
with
63 additions
and
0 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
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,55 @@ | ||
{ | ||
"custom_fields": [], | ||
"custom_perms": [], | ||
"doctype": "Item", | ||
"links": [], | ||
"property_setters": [ | ||
{ | ||
"_assign": null, | ||
"_comments": null, | ||
"_liked_by": null, | ||
"_user_tags": null, | ||
"creation": "2024-07-28 04:36:24.732734", | ||
"default_value": null, | ||
"doc_type": "Item", | ||
"docstatus": 0, | ||
"doctype_or_field": "DocField", | ||
"field_name": "weight_uom", | ||
"idx": 0, | ||
"is_system_generated": 0, | ||
"modified": "2024-07-28 04:36:24.732734", | ||
"modified_by": "Administrator", | ||
"module": null, | ||
"name": "Item-weight_uom-mandatory_depends_on", | ||
"owner": "Administrator", | ||
"property": "mandatory_depends_on", | ||
"property_type": "Data", | ||
"row_name": null, | ||
"value": "eval:doc.weight_per_unit" | ||
}, | ||
{ | ||
"_assign": null, | ||
"_comments": null, | ||
"_liked_by": null, | ||
"_user_tags": null, | ||
"creation": "2024-07-28 04:36:24.552718", | ||
"default_value": null, | ||
"doc_type": "Item", | ||
"docstatus": 0, | ||
"doctype_or_field": "DocField", | ||
"field_name": "weight_per_unit", | ||
"idx": 0, | ||
"is_system_generated": 0, | ||
"modified": "2024-07-28 04:36:24.552718", | ||
"modified_by": "Administrator", | ||
"module": null, | ||
"name": "Item-weight_per_unit-mandatory_depends_on", | ||
"owner": "Administrator", | ||
"property": "mandatory_depends_on", | ||
"property_type": "Data", | ||
"row_name": null, | ||
"value": "eval:doc.weight_uom" | ||
} | ||
], | ||
"sync_on_migrate": 1 | ||
} |
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,7 @@ | ||
frappe.ui.form.on('Item', { | ||
validate: frm => { | ||
if (frm.doc.weight_uom && frm.doc.weight_per_unit == 0) { | ||
frappe.throw(__("Please mention 'Weight Per Unit' along with Weight UOM.")) | ||
} | ||
}, | ||
}) |