Skip to content

Instantly share code, notes, and snippets.

View dpr-odoo's full-sized avatar

Dharmang Soni dpr-odoo

View GitHub Profile
@dpr-odoo
dpr-odoo / JavaFieldReflection.java
Created June 24, 2014 03:16
Java Field Reflection - Getting non-null fields value using reflection
/**
* Java Field Reflection
* Getting non-null members (fields) value from parent class using Java Reflection
*
* @author Dharmang Soni <dpr@odoo.com>
*/
package com.reflection;
import java.lang.reflect.Field;
import android.app.AlertDialog;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ScrollView;
@dpr-odoo
dpr-odoo / odoo_connector.py
Created September 24, 2015 09:24
Odoo Python Connector (JSON RPC)
import httplib2,random, json
odoo_url = 'SERVER_URL'
class OdooConnector:
context = {}
http = False
cookies = ''
def __init__(self):
@dpr-odoo
dpr-odoo / touchListSwipe.js
Created August 5, 2019 09:54
Touch Swipe with List Actions
(function () {
$.fn.listSwipe = function (options) {
var settings = $.extend({
itemSelector: '>', // The item in the list that has the side actions
itemActionWidth: 80, // In pixels
leftAction: true, // Whether there is an action on the left
rightAction: true, // Whether there is an action on the right
snapThreshold: 0.8, // Percent threshold for snapping to position on touch end
snapDuration: 200, // Snap animation duration
closeOnOpen: true, // Close other item actions if a new one is moved