Skip to content

Instantly share code, notes, and snippets.

View rmehta's full-sized avatar

Rushabh Mehta rmehta

View GitHub Profile

1. Can you tell us a bit about the company?

We started in 2008 and initially provided custom web app development services, but at heart we were always a product company. In 2010, we finally discovered this and shifted our strategy, we went from a team of 18 to 5 and concentrated on the product. We also started our SAAS offering in 2010 and branded as ERPNext. Since then our focus has been on the product and improving its quality, usability etc. Since last year, we have managed to get some traction and we have now more than 250 paid customers, both SAAS (75%) and open source production support (25%). Also 75% of our revenues come from outside India.

Apart from the product, we have also published an open source web app framework in Python called Frappe (Framework + Apps). It is a full stack Python and JS framework. The unique part of the framework is that unlink other frameworks that either concetrate on server side or client side, Frappe has both parts to it. Also has

<!--
Sample Print Format for ERPNext
Please use at your own discretion
For suggestions and contributions:
https://github.com/frappe/erpnext-print-templates
Freely usable under MIT license
-->
<!-- Style Settings -->
@rmehta
rmehta / fixed_delivery_date.js
Created July 16, 2014 08:31
Allow fixed delivery dates: ERPNext Custom Script Example
cur_frm.cscript.custom_validate = function(doc) {
var date = doc.delivery_date.split("-")[2];
if(["15", "30"].indexOf(date)===-1) {
msgprint("Delivery date must be on 15th or 30th of the month");
throw "Wrong Delivery Date";
}
return false;
}
@rmehta
rmehta / calc_total.js
Created July 6, 2014 07:01
Calcualate Total Quantity: ERPNext Custom Script Example
cur_frm.cscript.custom_validate = function() {
var sum = 0;
$.each(doc.entries, function(i, d) { sum += d.qty });
cur_frm.set_value(doc, "total_qty", sum);
}
@rmehta
rmehta / import_jobs.py
Last active August 29, 2015 14:02
Import Jobs From CSV
import csv
NAME = 2
EMAIL = 3
INTRODUCTION = 4
THOUGHTS_ON_COMPANY = 5
LIKES = 6
LINKS = 7
PHONE = 8
# Usage:
# Make sure all files are in current folder
# Run `python convert.py`
#
# Output:
# Output file in `out.csv`
# Ignored rows in `ignored.csv`
cols = ['Voter`s Slip', 'AC Number', 'Part Number', 'Section Number', 'SerialNo. in Part ',
'Name in English', ' Name in Hindi', 'Relation FirstName in English', 'Relation FirstName in Hindi',
@rmehta
rmehta / gitall.py
Last active July 19, 2017 12:23
Git all
#!/usr/bin/env python2.7
import sys, os
import subprocess, commands
def main():
git = commands.getoutput('which git')
args = sys.argv[1:]
for folder in os.listdir("."):
if os.path.exists(os.path.join(folder, ".git")):
cwd = os.path.abspath(folder)
@rmehta
rmehta / convert.py
Created March 16, 2014 09:48
Extract Voter information from Maharashtra Electoral Rolls (PDF)
# PDF to CSV Converter for Mah Electoral roles
# Usage:
# 1. Place all pdf folders in "source"
# 2. Set "target" to be the folder where you want output files exported
# Note: inner directory structure will be maintained.
from pdfminer.pdfinterp import PDFResourceManager, process_pdf
from pdfminer.converter import HTMLConverter
from pdfminer.layout import LAParams
from cStringIO import StringIO
cur_frm.cscript.custom_validate = function(doc) {
var items = wn.model.get("Delivery Note Item", {parent: doc.name})
var items_against_sales_order = $.map(items, function(d) { return d.against_sales_order ? d : null })
if(items.length > items_against_sales_order.length && user_roles.indexOf(["Allowed Role"])===-1) {
wn.msgprint("Please make against sales order");
throw "Not allowed";
}
}
def custom_validate(self):
webnotes.msgprint('I got called')
company_count = 1
if company_count >=0 :
webnotes.msgprint('Error: Test')
raise Exception