Skip to content

Instantly share code, notes, and snippets.

View rmehta's full-sized avatar

Rushabh Mehta rmehta

View GitHub Profile
@rmehta
rmehta / gist:d3b568e2793450fd0f86
Last active August 29, 2015 14:13
erpnext_redesign.md

ERPNext Redesign

If you have any doubt that design of everyday things is the most important cultural movement of our time, then you need to look up the most valuable company in the world today, which is ofcourse, Apple. We want our tools to work flawlessly and naturally. Open source projects are catching up too. Elementary OS promises to finally make the Linux Desktop accessible for everyone. Many open source web applications like Ghost CMS, Taiga and the upcoming Flarum have designers in their core team. If you want to take a better look, check out BeautifulOpen.

Taste

A couple of months ago, we decided that we need to refocus on design for our open source ERP project, ERPNext. ERPs are known for having the worst user designs and we wanted to change that. Usability in ERPNext was already better compared to many other products, but we knew we were far away from having

@rmehta
rmehta / stock_reco.js
Created February 17, 2015 07:13
Frappe Version 5 Client Side API
// button click "Get Items"
frappe.ui.form.on("Stock Reconciliation", "get_items", function(frm) {
// prompt user for warehouse
frappe.prompt({label:"Warehouse", fieldtype:"Link", options:"Warehouse", reqd: 1},
function(data) {
// get latest balance and valuation rate
frappe.call({
method:"erpnext.stock.doctype.stock_reconciliation.stock_reconciliation.get_items",
@rmehta
rmehta / v5_release.md
Last active August 29, 2015 14:17
Version 5 Release Notes

Version 5 Release Notes

Fresh New Look

  • Cleaner lines
  • Simpler Menus
  • Indicators

Item Variants

@rmehta
rmehta / grid_add_row_trigger.js
Created April 7, 2015 06:07
Frappe Custom Script. Trigger on add row
frappe.ui.form.on("Z Item", {
"set_total": function(frm) {
var grand_total = 0;
$.each(frm.doc.z_items, function(i, d) { grand_total += d.qty; });
frm.set_value("grand_total", grand_total);
},
"z_items_add": function(frm, ) {
frm.events.set_total(frm);
},
"qty": function(frm) {
@rmehta
rmehta / v4_add_row_trigger.js
Created April 7, 2015 12:16
Frappe Custom Script. Trigger on add row (version 4)
cur_frm.cscript.set_total = function(doc, dt, dn) {
var grand_total = 0;
$.each(doc.z_items, function(i, d) { grand_total += d.qty; });
cur_frm.set_value("grand_total", grand_total);
}
cur_frm.cscript.z_items_add = function(doc) {
cur_frm.cscript.set_total(doc);
}

What are your parameters to decide strategic / non-strategic code or apps when releasing to OSS? Assuming one would only release non-strategic stuff.

No we release everything! The premise of open source is to give away.

What we don't release is our cloud platform. We are also in process of building a non-open source app, unrelated to our core application ERPNext, which will complement the open source one,

When did you first release code under OSS?

2008

Concept Note for wnframework2

html/css is fast evolving and covering gaps in building of complex web apps. The key gaps that remain are

  1. persistent datastore for objects / content
  2. partial loading of code (require pattern) / ajax
  3. built-in app / site structure and navigation
  4. built-in authoring of structured content
  5. user authentication and session management
@rmehta
rmehta / erpnext-sample-validation-script.js
Created September 24, 2012 04:53
Sample Custom Script for Validation
// this function is called by erpnext
// in the browser before saving
cur_frm.cscript.custom_validate = function(doc) {
if(user=="user1@example.com" && doc.purpose!="Material Receipt") {
msgprint("You are only allowed Material Receipt");
validated = false;
}
}
@rmehta
rmehta / sales_order.json
Created December 6, 2012 04:06
Sample Sales Order
[
{
"doctype":"Sales Order",
"__islocal": 1,
"customer": "Customer 1",
"posting_date": "2012-02-20"
..
},
{
"doctype": "Sales Order Item",
@rmehta
rmehta / goi_open_source_initiative.md
Last active October 15, 2015 09:37
What can we expect from Govt of India's new Push into Open Source

What can we expect from Govt of India's new Push into Open Source

The government of India has recently announced a big push into Open Source as a part of its Digital Initiative. For a country of more than a billion people and thousands of government organizations, this seems like a big and long overdue move. This will no doubt give boost to the faltering Free and Open Source Software communities in India. On the face of it, this initiative should not be written off as yet another bureaucratic exercise into nothingness, because the program seems to be headed by an able administrator, RS Sharma, who was a part of the massive Universal ID (UID) project executed by the government of India that has issued bio-metric based IDs to [around 700 million Indians](http://en.wikipe