
Search In
Hammer.js is a open-source library used for identifying touch gesture, mouse events and pointer Events. It is a standalone library .
link for downloading library
http://hammerjs.github.io/dist/hammer.min.js
Below is the code snippet to use the hamm
Hi! I'm trying to develop an application.But i'm a little bit confused about auth.I've seen more examples from github but their code are realy difficult and it's very hard to understand it .I need if it's possible,a small working example to understan
If you want to make loops and special fields in OpenERP use below code -
def get_totals(self, cr, uid, ids):
countries = {}
for sale in self.browse(cr, uid, ids):
country = sale.partner_invoice_id.country
countries.setdefault(country, 0.0)
countr
If you want to define class and attributes in OpenERP use below code -
from osv import osv, fields
class travel_hostel(osv.osv):
_name = ’travel.hostel’
_inherit = ’res.partner’
_columns = {
’rooms_id’: fields.one2many(’travel.room’, ’hostel_id’, ’
If you want to make the _sel_ function in OpenERP use below code -
def _sel_func(self, cr, uid, context={}):
obj = self.pool.get(’Test.relation.model’)
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, [’Demo’, ’id’], context)
res = [(r[’id
If you want to define Functional field in OpenERP use below code -
class Demo1 (osv.osv):
_name = ’Demo1’
_description = ’Contract’
_columns = {
’name’ : fields.char(’Contract Name’, size=30, required=True),
’employee_id’ : fields.many2one(’employee
If you want to define many2many field in OpenERP use like below code -
class test (osv.osv):
_inherit='sale.order.line'
_columns={
'product1_cat':fields.char('product academy'),
'product&_cat':fields.many2one('produc
If you want to use default_get method in OpenERP use below code -
self.pool.get(’sale.order.line’).default_get(cr, uid, [’product_id’,’product_uom_id’])
Note- If you want to migrating the module from OpenERP-7 to OpenERP-8(Odoo),then we have to us
To add a separator line separator string is used, below us the way to do this.
Go to .xml file and use the below code .
<separator string="Session" colspan="4"/>
<field name="session" nolabel="1">
<tree>
<field name="name"/>
If you want to use _inherit and _name attributes together in OpenERP use below code -
class sale_order(osv.osv):
_name = "sale.order"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_description = "Sales Order"
_track = {
'
