fix(seller dialog): Email should be session user email (#15270)
diff --git a/erpnext/public/js/hub/components/profile_dialog.js b/erpnext/public/js/hub/components/profile_dialog.js
index e76abfa..ae44659 100644
--- a/erpnext/public/js/hub/components/profile_dialog.js
+++ b/erpnext/public/js/hub/components/profile_dialog.js
@@ -1,4 +1,4 @@
-const ProfileDialog = (title = __('Edit Profile'), action={}, initial_values={}) => {
+const ProfileDialog = (title = __('Edit Profile'), action={}) => {
const fields = [
{
fieldtype: 'Link',
@@ -13,7 +13,6 @@
.then(company => {
dialog.set_values({
country: company.country,
- company_email: company.email,
currency: company.default_currency
});
});
@@ -23,7 +22,7 @@
{
fieldname: 'company_email',
label: __('Email'),
- fieldtype: 'Data'
+ fieldtype: 'Read Only'
},
{
fieldname: 'country',
@@ -63,11 +62,10 @@
}
});
- dialog.set_values(initial_values);
-
// Post create
const default_company = frappe.defaults.get_default('company');
dialog.set_value('company', default_company);
+ dialog.set_value('company_email', frappe.session.user);
return dialog;
}