Convert raw `frappe.db.sql` across the Projects module to `frappe.qb` / the ORM so the same code runs on MariaDB and Postgres. Behaviour is preserved on MariaDB; the conversions also make these paths valid under Postgres' stricter SQL (GROUP BY, case-sensitivity, empty-string handling). Conversions of note (behaviour kept identical to the MariaDB original): - project.get_users_for_project: search selects the stored full_name instead of concat_ws(first, middle, last) (concat_ws diverges on Postgres, where empty Data fields are NULL) and wraps Locate in LOWER() to keep MariaDB's case-insensitive result ordering. - project costing: percent-complete and sales/billed-amount aggregates rebuilt as Sum() query-builder selects. - task.reschedule_dependent_tasks: the correlated subquery is split into a `Task Depends On` parent-pluck + a Task lookup (same rows, no nested SQL). - timesheet.get_events: user-permission match conditions move to the query-builder form via get_event_conditions_qb; calendar columns rebuilt with Concat/Round. - report/project_wise_stock_tracking & report/daily_timesheet_summary: GROUP BY cost aggregates and the timesheet date window (timestamp(to_date,'24:00:00') -> end-of-day via get_combine_datetime) rebuilt to satisfy Postgres. - search helpers (query_task, get_project, get_timesheet) use frappe.qb.get_query with ignore_permissions=False in place of build_match_conditions/get_match_cond. Tests (run on both MariaDB and Postgres, --lightmode): - Existing project/task/timesheet/activity_cost suites kept green (27 tests). - New project_wise_stock_tracking test drives all three cost aggregates with positive data (purchased / issued / delivered GROUP BY) plus get_project_details. - New daily_timesheet_summary test covers the date-window join. Not included: project_update.py is deferred. Its daily_reminder()/email_sending() select `progress`/`progress_details`, columns that do not exist on the Project Update doctype, so the function errors when invoked regardless of backend - a pre-existing bug that needs an email-rework, not just a query port. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ERPNext
100% Open-Source ERP System to help you run your business.
Motivation
Running a business is a complex task - handling invoices, tracking stock, managing personnel, and other daily operations. In a market where software is sold separately to manage each of these tasks, ERPNext does all of the above and more, for free.
Key Features
- Accounting: All the tools you need to manage cash flow in one place, right from recording transactions to summarizing and analyzing financial reports.
- Order Management: Track inventory levels, replenish stock, and manage sales orders, customers, suppliers, shipments, deliverables, and order fulfillment.
- Manufacturing: Simplifies the production cycle, helps track material consumption, exhibits capacity planning, handles subcontracting, and more!
- Asset Management: From purchase to disposal, IT infrastructure to equipment. Covers every branch of your organization, all in one centralized system.
- Projects: Deliver both internal and external projects on time, budget and profitability. Track tasks, timesheets, and issues by project.
Under the Hood
-
Frappe Framework: A full-stack web application framework written in Python and JavaScript. The framework provides a robust foundation for building web applications, including a database abstraction layer, user authentication, and a REST API.
-
Frappe UI: A Vue-based UI library, to provide a modern user interface. The Frappe UI library provides a variety of components that can be used to build single-page applications on top of the Frappe Framework.
Production Setup
Managed Hosting
You can try Frappe Cloud, a simple, user-friendly, and sophisticated open-source platform to host Frappe applications reliably and securely.
It handles installation, setup, upgrades, monitoring, maintenance, and support of your Frappe deployments. It is a fully featured developer platform with an ability to manage and control multiple Frappe deployments.
Self-Hosted
Docker
See Frappe Docker Documentation for full documentation & FAQ on Docker setup
Prerequisites
For Docker basics and best practices refer to Docker's documentation
Try on your environment
⚠️ Disposable demo only
This setup is intended for quick evaluation. Expect to throw the environment away. You will not be able to install custom apps to this setup. For production deployments, custom configurations, and detailed explanations, see the full documentation.
First clone the repo:
git clone https://github.com/frappe/frappe_docker
cd frappe_docker
Then run:
docker compose -f pwd.yml up -d
Wait for a couple of minutes for ERPNext site to be created or check the create-site container logs before opening browser on port 8080. (username: Administrator, password: admin)
See Frappe Docker for ARM based docker setup
Development Setup
Manual Install
The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details.
New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the Frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).
Local
To setup the repository locally follow the steps mentioned below:
-
Setup bench by following the Installation Steps and start the server
bench start -
In a separate terminal window, run the following commands:
# Create a new site bench new-site erpnext.localhost -
Get the ERPNext app and install it
# Get the ERPNext app bench get-app https://github.com/frappe/erpnext # Install the app bench --site erpnext.localhost install-app erpnext -
Open the URL
http://erpnext.localhost:8000/appin your browser, you should see the app running
Learning and Community
- Frappe School - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
- Official documentation - Extensive documentation for ERPNext.
- Discussion Forum - Engage with the community of ERPNext users and service providers.
- Telegram Group - Get instant help from huge community of users.
Contributing
Logo and Trademark Policy
Please read our Logo and Trademark Policy.




