Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package/Moduele wise Initial Data for Module Initialization #26296

Open
nipunanr opened this issue May 2, 2024 · 2 comments
Open

Package/Moduele wise Initial Data for Module Initialization #26296

nipunanr opened this issue May 2, 2024 · 2 comments

Comments

@nipunanr
Copy link

nipunanr commented May 2, 2024

Is your feature request related to a problem? Please describe.
When setting up a new module or package in Frappe Framework, there's often a need to prepopulate certain doctypes with initial data. This process can be time-consuming and repetitive, leading to frustration and errors.

Describe the solution you'd like
I would like the ability to add initial data to doctypes when installing a new module or package. This feature should allow users to specify the initial data they want to include for each doctype. For example, when installing a package related to machinery management, users should be able to specify initial data such as "Large Machines," "Agri Machines," and "Cutting Machines" for the "Machine Type" doctype.

Describe alternatives you've considered
One alternative is to manually add initial data after installing the module or package. However, this process is inefficient and prone to errors, especially when dealing with large amounts of data.

Additional context
This feature would greatly improve the setup process for new modules and packages in Frappe Framework, streamlining the initialization of doctypes and reducing the chance of errors.

@cogk
Copy link
Contributor

cogk commented May 2, 2024

Maybe you could be interested in fixtures? https://discuss.frappe.io/t/custom-app-understanding-fixtures/115794/2. How would your feature request differ from fixtures?

Maybe you could create the documents using code in the after_install hook?

@nipunanr
Copy link
Author

nipunanr commented May 7, 2024

@cogk Mainly the differance is the fixtures are highly code related thing. But with all the features in Frappe at the moment, we can create custom Package from Frontend without any effort. So it will be good if this also can be done from frontend/Frappe Interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants