mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 01:34:10 +00:00
Merge pull request #51400 from Jatin3128/quick-entry-address-fix
fix(supplier): avoid mandatory_depends_on trigger from prefetched country in quick entry
This commit is contained in:
@@ -23,6 +23,7 @@ frappe.ui.form.ContactAddressQuickEntryForm = class ContactAddressQuickEntryForm
|
||||
mobile_number: "mobile_no",
|
||||
map_to_first_name: "first_name",
|
||||
map_to_last_name: "last_name",
|
||||
country_address: "country",
|
||||
};
|
||||
|
||||
Object.entries(map_field_names).forEach(([fieldname, new_fieldname]) => {
|
||||
@@ -76,7 +77,7 @@ frappe.ui.form.ContactAddressQuickEntryForm = class ContactAddressQuickEntryForm
|
||||
label: __("Address Line 1"),
|
||||
fieldname: "address_line1",
|
||||
fieldtype: "Data",
|
||||
mandatory_depends_on: "eval:doc.city || doc.country",
|
||||
mandatory_depends_on: "eval:doc.city || doc.country_address",
|
||||
},
|
||||
{
|
||||
label: __("Address Line 2"),
|
||||
@@ -95,7 +96,7 @@ frappe.ui.form.ContactAddressQuickEntryForm = class ContactAddressQuickEntryForm
|
||||
label: __("City"),
|
||||
fieldname: "city",
|
||||
fieldtype: "Data",
|
||||
mandatory_depends_on: "eval:doc.country || doc.address_line1",
|
||||
mandatory_depends_on: "eval:doc.country_address || doc.address_line1",
|
||||
},
|
||||
{
|
||||
label: __("State/Province"),
|
||||
@@ -104,7 +105,7 @@ frappe.ui.form.ContactAddressQuickEntryForm = class ContactAddressQuickEntryForm
|
||||
},
|
||||
{
|
||||
label: __("Country"),
|
||||
fieldname: "country",
|
||||
fieldname: "country_address",
|
||||
fieldtype: "Link",
|
||||
options: "Country",
|
||||
mandatory_depends_on: "eval:doc.city || doc.address_line1",
|
||||
|
||||
Reference in New Issue
Block a user