[hub] set first user's password in marketplace users

This commit is contained in:
Prateeksha Singh 2018-08-31 20:42:48 +05:30
parent ea2b9cbd1c
commit c726fce4b1
4 changed files with 9 additions and 16 deletions

View File

@ -53,7 +53,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "hub_username",
"fieldname": "username",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
@ -85,7 +85,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "hub_password",
"fieldname": "password",
"fieldtype": "Password",
"hidden": 0,
"ignore_user_permissions": 0,
@ -121,8 +121,8 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-08-31 13:58:46.098710",
"modified_by": "Administrator",
"modified": "2018-08-31 20:39:55.944828",
"modified_by": "cave@aperture.com",
"module": "Hub Node",
"name": "Hub User",
"name_case": "",

View File

@ -44,8 +44,8 @@ class MarketplaceSettings(Document):
frappe.throw(json.loads(response.text))
if message.get('email'):
self.update_session_user_password(message)
self.registered = 1
self.users[0].password = message.get('password')
self.save()
return message or None
@ -63,10 +63,6 @@ class MarketplaceSettings(Document):
# self.enabled = 0
# self.save()
def update_session_user_password(self, message):
# TODO: Update child table session user password
pass
def create_hub_connector(self, message):
if frappe.db.exists('Data Migration Connector', 'Hub Connector'):
hub_connector = frappe.get_doc('Data Migration Connector', 'Hub Connector')

View File

@ -19,8 +19,7 @@ const ProfileDialog = (title = __('Edit Profile'), action={}) => {
.then(company => {
dialog.set_values({
country: company.country,
currency: company.default_currency,
company_email: company.email
currency: company.default_currency
});
});
}
@ -28,8 +27,8 @@ const ProfileDialog = (title = __('Edit Profile'), action={}) => {
},
{
fieldname: 'company_email',
label: __('Company Email'),
fieldtype: 'Data'
label: __('Email'),
fieldtype: 'Read Only'
},
{
fieldname: 'users',
@ -81,8 +80,6 @@ const ProfileDialog = (title = __('Edit Profile'), action={}) => {
dialog.fields_dict.users.set_data(users);
});
dialog.set_values(initial_values);
// Post create
const default_company = frappe.defaults.get_default('company');
dialog.set_value('company', default_company);

View File

@ -101,7 +101,7 @@ erpnext.hub.Marketplace = class Marketplace {
register_seller(form_values) {
frappe.call({
method: 'erpnext.hub_node.doctype.hub_settings.hub_settings.register_seller',
method: 'erpnext.hub_node.doctype.marketplace_settings.marketplace_settings.register_seller',
args: form_values
}).then(() => {
this.register_dialog.hide();