</>CodeWithKarani
All topics
Topic

Frappe/ERPNext

75 articles in this topic.

Frappe/ERPNext15 min read

One tap at the till, five documents: the submit chain behind ERPNext retail

I recorded an hour and twenty minutes of UpeoRetail and refused to cut the boring parts, because the eight seconds at the counter is the easy bit. What one submit really writes: stock ledger, GL, a serial and batch bundle, a payment, and two integrations that live outside the transaction.

Read
Frappe/ERPNext13 min read

Deploying Frappe apps to a client server you're not allowed to touch

The client will not give you access to their dev server, so every code change means someone on their side pulls and migrates by hand. Here is the complete fix: a self-hosted runner they install, a deploy script they own, and no credential to their environment on your side at all.

Read
Frappe/ERPNext12 min read

Bolting a phone onto ERPNext: custom routes, guest endpoints and HMAC auth in Frappe

Frappe claims every /api/* path before website routing, so a fixed third-party path 404s. Here is the before_request rewrite that fixes it, including the cached property you also have to bust, and why allow_guest endpoints can still be strongly authenticated.

Read
DevOps & Containers8 min read

SSH deployment for Frappe: how it works, and what it costs you

SSH deployment is the right answer when you own the server, and here is a complete working pipeline for it. It is also a private key held by a third party's CI system, which is a bill worth reading before you sign it.

Read
Frappe/ERPNext8 min read

What bench migrate actually does, and the rollback you'll wish you had

Every patch commits as it completes and records itself as applied. So a migration that fails halfway is not a failed migration, it is a half-finished one, and re-running will not undo it. Here is the recovery, with real commands.

Read
Frappe/ERPNext8 min read

Anatomy of a Frappe bench

Five directories, one of which is not a directory at all but a collection of independent git repositories. Understanding that is the difference between a deploy that works and a Saturday spent fixing file ownership.

Read
AI Engineering6 min read

The agent drafts, the human commits: designing the write path for a business AI

A wrong read costs minutes. A wrong write costs a reconciliation. So the commit lives behind an HTTP endpoint the agent cannot call - and everything it can do is scoped to the requesting user, written to an audit row in the same transaction, and given a tested reversal.

Read
Databases8 min read

Find the Query Killing Your ERPNext: A MariaDB Slow Query Log Playbook

Your ERP is slow and three queries are responsible. Configure the MariaDB slow query log properly, run pt-query-digest, and read the numbers that tell you whether it is an index problem or a hardware problem.

Read
AI Engineering6 min read

Hosted brain, dumb connector: splitting an AI agent so the data never leaves the client

Ship your agent to the client and you hand over your product. Pull their data to your platform and you become the custodian of their business records. The third option is a split: a hosted brain that decides what to fetch, and an on-prem connector with no intelligence in it at all.

Read
Databases9 min read

Indexes That Actually Work: A Field Guide to tabGL Entry and tabStock Ledger Entry

ERPNext ships mostly single-column indexes, which are the wrong shape for the reports killing your server. Real EXPLAIN output, the leftmost prefix rule, key_len maths, and the composite indexes that fix ERP reports.

Read
AI Engineering7 min read

Why we did not point an LLM at ERPNext: building a semantic layer for a business agent

Text-to-SQL against a real accounting schema produces confidently wrong numbers, because ERPNext stores revenue in the general ledger, stock valuation in the stock ledger, and gross margin nowhere at all. Here is the metric catalog and catalog-first hybrid engine we built instead.

Read
Databases8 min read

bench backup Is Not a Backup Strategy: Binlogs and Point-in-Time Recovery for ERPNext

A nightly dump means losing a full day of invoices. Set up mariadb-backup plus binary logs, then walk a real recovery: finding the binlog position of a bad bulk cancel and replaying up to the second before it.

Read
Artificial Intelligence6 min read

Rai: what I am building, and which decisions were load-bearing

An AI business analyst for hardware and electronics shops, embedded in ERPNext. The v1 scope is locked, so here is what is in it, which four decisions the whole thing rests on, and the two things I expect to get wrong.

Read
Databases8 min read

Your ERPNext Database Hit 40GB: What to Delete, Archive, and Partition

On most large ERPNext sites the real business data is under 20 percent of the total size. Measure the tables, gut the log bloat, chunk your deletes, understand the partitioning trap, and actually reclaim the disk.

Read
Frappe/ERPNext11 min read

Upgrading ERPNext from Version 15 to Version 16: A Field-Tested Guide

If you've searched the Frappe forum for a "standard" way to upgrade ERPNext from v15 to v16, you've probably noticed the same thing I did: there isn't one. Every guide assumes a slightly different…

Read
Frappe/ERPNext8 min read

Why ERPNext Rounds Your Invoice Amounts Wrong, and the Precision Settings That Fix It

ERPNext rounding bugs are one root cause wearing many hats: fieldtype, Currency vs Float Precision, and per-field overrides across three layers. Here is the map.

Read
Frappe/ERPNext8 min read

Reverse-Engineering the Frappe REST API: the Reference Nobody Wrote

Frappe auto-generates a REST API from your DocTypes but ships no OpenAPI spec, so integrations are trial and error. Here is the working reference: filters, fields, auth, child tables and the gotchas.

Read
Frappe/ERPNext6 min read

Frappe Custom Fields Hit MariaDB's 'max 64 keys allowed': Finding the Excess Indexes

A heavily customised Item or Customer DocType can silently pile up indexes until MariaDB refuses at 64. Here is how to list them, find the wasteful ones, and remove them safely.

Read
Frappe/ERPNext6 min read

'Can't pickle LazyUser' With frappe.enqueue: The Background Job Rule Everyone Breaks

frappe.enqueue pickles its arguments, and a Frappe Document drags in a LazyUser pickle cannot handle. Pass doctype and name strings and re-fetch inside the job.

Read
Frappe/ERPNext7 min read

Frappe Socket.IO Not Working in Production: Diagnose Before You Reinstall

Realtime updates dead in production? Do not run the blind bench setup reinstall ritual. It is almost always one thing: nginx, supervisor, or a firewalled port.

Read
Frappe/ERPNext8 min read

Frappe Scheduled Jobs Not Running: The Full Checklist Nobody Gives You

Frappe scheduled jobs need four things at once: a cron tick, the per-site flag, running workers, and an unblocked queue. Here is how to find the broken link instead of guessing bench enable-scheduler.

Read
Frappe/ERPNext7 min read

Redis 'Connection refused' in Frappe: Find the Real Cause, Not Just Restart

Error 111 connecting to localhost:13000 is not a wrong port, it means nothing is listening. Read the real port, ping it, then fix the actual cause per deployment type.

Read
Frappe/ERPNext7 min read

'Table tabDefaultValue doesn't exist' on bench new-site: Finding the Real Frappe Cause

The tabDefaultValue error on bench new-site is a symptom, not the cause. The real failure is in the MariaDB log: privileges, charset, version or disk. Here is how to find it.

Read
Frappe/ERPNext6 min read

MariaDB Won't Start After a Frappe Install: unknown variable 'innodb-file-format=barracuda'

The Frappe install docs still write innodb-file-format=barracuda into my.cnf, but MariaDB 10.3.1 removed that variable. Here is why mysqld refuses to start and the exact lines to delete.

Read
Frappe/ERPNext5 min read

MariaDB Not Configured for Barracuda: the Fix Depends on Your Version

Frappe's Barracuda error suggests a my.cnf block that crashes MariaDB 10.3+ because the variable was removed. Here is the version-correct config and how to recover.

Read
ERPNext for Business8 min read

Migrating From Tally Into ERPNext Without Losing Your Ledger

There is no reliable Tally-to-ERPNext importer, and you do not need one. Migrate masters and opening balances the way ERPNext expects, then tie out the trial balance.

Read
Frappe/ERPNext3 min read

You’re Using ERPNext… But Do You Actually Know What Your Customers Think?

You’ve implemented ERPNext. Your business is now structured. You can see: Sales Inventory Financials Operations Everything is flowing. But there’s one question most ERPNext users still can’t answer:…

Read
Frappe/ERPNext7 min read

cannot import name 'Table' from 'frappe.query_builder': Use DocType

The frappe.query_builder rewrite around pypika dropped Table with no shim. Here is the correct import, the root cause, and version-tolerant code that survives upgrades.

Read
ERPNext Doctrine3 min read

ERPNext in Production: Why Systems Become Slow, Unreliable, and Hard to Trust - and How UPEOSight Fixes It

ERPNext is a powerful system.Many businesses rely on it every single day to run accounting, inventory, HR, payroll, sales, manufacturing, and integrations. Yet there is a reality most ERPNext users…

Read
ERPNext for Business5 min read

ERPNext-Shopify Integration: Architecture, Pitfalls, and Production Engineering Lessons

Integrating an ERP system with an eCommerce platform looks straightforward at first glance. Products sync. Orders flow in. Stock updates go out. And for a while, everything seems fine. Then, weeks or…

Read
ERPNext Doctrine4 min read

ERPNext as Backend for Mobile Apps & Portals

How Serious SaaS Platforms Are Architected on ERPNext This article is written for business founders, SaaS builders, product leaders, and developers who want clarity, authority, and a real blueprint -…

Read
ERPNext for Business2 min read

The Smarter Way to Manage Receivables: Introducing the Customer Statement with Aging in ERPNext

If you're still chasing spreadsheets, exporting raw data, or manually highlighting overdue invoices - it’s time to stop. Receivables management is not just about knowing who owes you. It’s about…

Read
upeo.academy2 min read

Securing Deliveries: How Technology is Transforming the Way Businesses Protect Delivery Notes

In today’s fast-moving business environment, delivery notes play a critical role in confirming the dispatch and receipt of goods. Yet across industries, we are witnessing a worrying trend: the abuse…

Read
ERPNext for Business3 min read

Revolutionize Your Payments with MPESA and WhatsApp Integration for ERPNext

In today’s fast-paced business environment, efficiency and convenience are key to staying ahead. At Karani Online, we understand the challenges businesses face when managing payments and customer…

Read
ERPNext for Business1 min read

Cost of Goods Sold in ERPNext: Using the Landed Cost Voucher

In my latest video, I dive into how ERPNext simplifies the calculation of the actual Cost of Goods Sold (COGS) using the Landed Cost Voucher feature. COGS is a critical figure for businesses, and…

Read
Technology3 min read

Interactive Frappe And WhatsApp Integration: WhatsApp and Frappe Framework for Real-Time Data Management

In the digital age, businesses and developers are constantly seeking innovative ways to streamline operations and enhance customer interactions. Today, we’re excited to share an impressive…

Read
Technology3 min read

Understanding Zero-Rated and Tax-Exempt Customers in ERPNext: A Kenyan Case Study

In Kenya, grasping the intricacies of Value-Added Tax (VAT) is essential for businesses aiming to remain compliant and optimize their financial operations. A common area of confusion is the…

Read
Technology8 min read

Why ERP Implementations Fail: Avoiding the Top Implementation Mistakes

Implementing an Enterprise Resource Planning (ERP) system can revolutionize a business's efficiency and streamline operations. However, many organizations struggle with ERP implementation failures…

Read
ERPNext for Business3 min read

How to Set Up and Manage Tax Withholding in ERPNext

Tax withholding can be a complex process, but with ERPNext, you can streamline the entire process from setup to reporting. This guide will walk you through setting up tax withholding for suppliers…

Read
Technology3 min read

Optimizing ERPNext Performance: Tips for Faster and Smoother Operations

ERPNext is a powerful and flexible ERP solution, but like any complex system, its performance can be affected by various factors. Ensuring that your ERPNext instance runs efficiently is crucial for…

Read
Frappe/ERPNext2 min read

Installing ERPNext via Docker for Beginners - A Step-by-Step Guide

Installing ERPNext via Docker is a convenient way to set up the platform without needing to deal with complex dependencies and configurations. Below are highly simplified steps to guide you through…

Read
ERPNext for Business2 min read

Revolutionizing Expense Management: Introducing Tax Splitting in ERPNext Expense Management

In the fast-paced world of business, efficiency and accuracy are paramount, especially when it comes to managing expenses. That's why we're thrilled to announce a groundbreaking enhancement to the…

Read
Technology2 min read

How to Upgrade ERPNext from Version 14 to Version 15

Introduction Ensuring your ERPNext system stays current is crucial for tapping into the latest features, improvements, and security enhancements. In this guide, we'll steer you through the upgrade…

Read
Featured5 min read

How to Install ERPNext Version 15 in Ubuntu 22.04 - A step by Step Guide

In this article, I will take a step-by-step approach to configure our newly installed ubuntu 22.04 OS to set up an environment and install ERPNext version 15. Let’s get to work! Prerequisites The…

Read
Engineering Craft1 min read

How to solve the Integrity Error(1062) issue when installing a frappe app

If you've ever encountered the frustrating "module integrity issue" while installing a Frappe app, you're not alone. This error can often be a roadblock to getting your app up and running.…

Read
Frappe/ERPNext1 min read

Effective Error Reporting in Frappe Framework and ERPNext Development

Error reporting is a fundamental aspect of the development process when working with the Frappe Framework and ERPNext. As a developer, encountering errors is not a matter of "if" but "when." How you…

Read
Engineering Craft1 min read

PDF Printout Doesn't Show Header in Frappe/ERPNext

It is quite frustrating to have your printouts looking all well only to get broken when you try to render them into a PDF that can be downloaded. If you have a similar case in your ERPNext or Frappe…

Read
Technology1 min read

How to setup HTTP Timeout in Frappe

Update Bench Config bench config http_timeout <value> bench setup supervisor bench setup nginx Restart Services Kindly note that this needs to be done as root. If you are not the root user, add sudo…

Read
ERPNext for Business1 min read

How to create a Purchase Invoice in ERPNext

A purchase invoice is an invoice that is used in conjunction with a purchase order. It is used to indicate how much money the buyer owes to the seller. Purchase invoices are also commonly known as…

Read
Technology1 min read

ERPNext Installation Issue - ERROR: There was a problem while creating karani

When installing ERPNext, you may run into an issue that displays the message: ERROR: There was a problem while creating karani This error message is then followed by the following message: Do you…

Read
Frappe/ERPNext1 min read

Custom Buttons - Client Scripts in Frappe Framework and ERPNext

Client scripts are powerful! They give you the flexibility to control how you want your application to behave. With these pieces of code we can even alter how our application works currently. In this…

Read
Technology2 min read

Using Frappe / ERPNext with any DBaaS

Hosting your database files to a different server from the one hosting your software files is most of the time the best approach to ensuring safety and security of your data. This is because you can…

Read
Frappe/ERPNext5 min read

How to Install ERPNext Version 14 in Ubuntu 22.04 - A step by Step Guide

In this article, I will take a step-by-step approach to configure our newly installed ubuntu 22.04 OS to set up an environment and install ERPNext version 14. Let’s get to work! Prerequisites The…

Read
Technology2 min read

Unknown log format "main" - Nginx

This error can occur during installation of ERPNext as nginx: [emerg] unknown log format "main" in /etc/nginx/conf.d/frappe-bench.conf:101. This error can also occur when setting up nginx outside…

Read
Frappe/ERPNext1 min read

Adding Custom Fields to Existing DocTypes in ERPNext

This tutorial demonstrated how we can add custom fields to existing DocTypes in ERPNext and/or the Frappe Framework. In this , we will cover the following: Add custom fields to existing ERPNext…

Read
Technology1 min read

DocType POS Offer Detail not found

When you get the an error message that DocType POS Offer Detail not found, you are most likely missing POS Awesome app in your instance. All you need to do is get it installed.…

Read
Technology1 min read

How to install POS Awesome on ERPNext or Frappe

POS Awesome is an open-source Point of Sale for ERPNext using Vue.js and Vuetify. This video demonstrates how to install POS Awesome on ERPNext or Frappe instance.

Read
Technology2 min read

How To Remotely Host ERPNext Database

Good software design will emphasize the importance of separating the database from the software application. The server where the database is hosted needs an extra layer of protection as it contains…

Read
Frappe/ERPNext1 min read

Can ERPNext handle Process Manufacturing?

Process manufacturing is a type of production method that produces finished goods by combining ingredients or raw materials using a specific formula. ERPNext is not any less when handling process…

Read
Frappe/ERPNext1 min read

ERPNext Error After Install - 127.0.0.1 does not exist

Sometimes, even after a successful installation of ERPNext, the instance won't load on the browser. The instance starts well on the terminal but on accessing the browser, you get a message that the…

Read
Frappe/ERPNext1 min read

ERPNext Automated Installation Script

This script automates all the steps needed to have ERPNext properly installed and running on Ubuntu 20.04. The script automates the following: Setting up default settings Checking necessary…

Read
Featured1 min read

Multi-company setup in ERPNext/Frappe

Setting up a company in ERPNext or the Frappe Framework is relatively easy. However, setting up multi-company in ERPNext and restricting user access to specific companies can prove otherwise. In this…

Read
Featured1 min read

Assigning a Value to a Child Table Field in Frappe or ERPNext

When working with child tables in the Frappe Framework or ERPNext, some functionalities that work out of the box with other DocTypes that aren't child tables may prove to be a pain. In this tutorial,…

Read
Frappe/ERPNext7 min read

How to Manage Frappe/ERPNext Custom Code via GitHub

Your customisations belong in your own app, and that app is a git repository from the moment bench creates it. Here is the whole loop: local bench to GitHub to the server, including the half of your work that lives in the database and never reaches git on its own.

Read
Featured1 min read

Creating A Custom App In Frappe/ERPNext And Installing It On Your Instance

This lesson is part of the complete Frappe Framework and ERPNext developer training series. In this one, we will explore how to create a custom app in Frappe Framework and install it on our running…

Read
Featured1 min read

How To Override a Method in Frappe or ERPNext

When you are customizing an ERPNext instance, or you are building your own custom application using the Frappe Framework, there are some things you will find already done. Most of the time, these do…

Read
Featured1 min read

ERPNext / Frappe Filter and Auto-populate Child Table

Auto-populating a child table in Frappe and/or ERPNext can make your application look good and give your users a better experience with the software. In this piece, I will demonstrate the following:…

Read
Technology1 min read

Frappe / ERPNext Assets not Loading Properly

When you install ERPNext for the first time, it sometimes gets frustrating when the fields are not properly arranged as you would expect. I will share some of the commands I have found useful in this…

Read
Technology1 min read

Setup ERPNext for Production

When ERPNext is installed in development mode, you will have to restart the instance with the bench start command every time you want to access it. You can however start your instance when the server…

Read
Technology2 min read

Switch From Developer to Official Release Branch for Frappe and ERPNext

When you install ERPNext for the first time, you may realize that you are running the developer version of both Frappe and ERPNext. You cannot proceed with the developer branch, as things keep…

Read
Technology1 min read

Installing SSL Certificate on your ERPNext Instance

You will need to have SSL certificate installed on your instance to keep users of your system safe online. In Frappe Framework or ERPNext, this is a simple process. Prerequisites You need to have a…

Read
Technology1 min read

Fixtures and Custom Fields in Frappe and ERPNext

Fixtures in ERPNext and the Frappe Framework is a tool to help export Data and Settings. When you need to have data migrated to your custom apps, fixtures will come in handy to help you achieve this.…

Read
Technology1 min read

Setting up Multi-tenancy in ERPNext

In Software, multi-tenancy is an architecture in which a single instance of a software application serves multiple customers, who are called tenants. The application can be offered as a service or as…

Read
Featured2 min read

Why ERPNext is the best option for your Business

ERPNext is one of the fastest-growing ERP systems in the marketplace. It has listed in top ERP systems for 3 years in a row (2017, 2018, 2019) according to Gartner. What is ERPNext? ERPNext is an…

Read
Technology1 min read

How to Authenticate and Login to ERPNext With an API

The Login Service API provides endpoints to manage the User Session in Conversational Cloud, such as User Login, Application Login, Logout and Refresh. API authentication is the processes of…

Read
Frappe/ERPNext6 min read

Installing ERPNext on Ubuntu 16.04: What the Easy Install Script Does Not Tell You

The ERPNext install script works until it does not. Here are the four failures I hit on real servers, the MariaDB settings it needs, and how to finish a half-installed bench.

Read