How to find the back-end method

frappe.desk.moduleview.get_desktop_settings

fetch_desktop_settings() {
frappe.call(‘frappe.desk.moduleview.get_desktop_settings’)
.then(r => {
console.log(‘###############demo’+JSON.stringify(r));
if (r.message) {
this.update_desktop_settings(r.message);
this.home_settings_fetched = true;
}
});
},

Hello. I’ll gladly help but you got to put some effort on asking the question. Just a title and some non formatted code won’t be of help. Read here how to format code using markdown.

From your question I understand you want to call a method. Frappe uses dot notation, every word between the dots you see: frappe.desk.moduleview is probably inside a folder called frappe which is inside a folder named desk inside a file named moduleview.py etc. There’s many examples on the source code.

2 Likes

Thanks for your help. I found the method.I still have a few questions to ask, but I don’t know how you developed it.

I am using remote Docke container development with VScode, but I do not know how to deploy to the client server after development.If, instead of changing the code, I just wrote some scripts, added some fields, and modified the form on my local client server, how to deploy it.thank you

Check if this helps.

https://discuss.frappe.io/t/re-how-to-deploy-docker-development/65095?u=shuairobin
Can you answer that?Limited ability to read documents can not understand

These two repositories have to specify the same thing, right?When I deploy, I specify the Bench GET-app for my development

yes

bench get-app http://github.com/user/custom_app --branch version-12

In Dockerfile, it becomes

RUN install_app custom_app https://github.com/user/custom_app version-12

If you wrote scripts, fields, and modified the form without turning on developer_mode to 1, all your changes are contained in the database. You backup the database and restore it to your production server, and everything is there. (You may have to create a New Company, and delete the company you were using when you were developing in your local client server.)

The disadvantage of this approach is, you cannot use your changes in other existing applications.

Another approach is to activate developer_mode to 1.

You create and install a new app into your site.

To preserve the changes you made to the form, and scripts you entered, you can export fixtures (you must know how to specify which changes you will copy to your app).

You can add New DocTypes under your app as the module, and develop the code for the Doctype in your app.

You can then install your app to other sites. This is an overview. We can go into detail if you want to go this route.

OK, thank you. I really need technical support, but I can’t find a way.

Have you set up another server in production mode where you will migrate your development code?

Production setup is different from development mode.
For now, in my case, I just use the easy install method to install ERPNext in a Linux server.

Since you did not change the code, the simplest way is to back up your development database and restore it to your production server.

What technical issue do you face?

I’m trying to figure out how to develop and deploy. Define fields, interfaces, scripts.

Level 1. As a first step, you can look up Customize ERPNext.

To deploy, you backup your development site and restore it to your production site.
All your Customization is stored in the database.

Level 2. You can create a custom-app and export fixtures. This will transfer the code in the database to your custom-app which you can install in other applications.

Level 3. You can develop a custom-app by setting developer_mode to 1. Here you can create DocTypes, Reports, etc.

If you are starting out, I advise doing level 1 first.

Level 1 I clearly define field forms that restore the database from the database to production.

Level 2 or 3 is not quite clear, but I’ll figure it out.If you don’t manage levels, you’ll learn where you use them

Thank you for your help.

1 Like

There are some tutorials, and many helpful resource in this forum