Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

How to recognize touch events for DOM elements

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

Ionic auth with express and mongoose

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

How to make loops and special fields in OpenERP/Odoo ?

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

How to define class and attributes in OpenERP/Odoo ?

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’, ’

How to define the _sel_ function in OpenERP/Odoo ?

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

How to define Functional field in OpenERP/Odoo ?

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

How to define many2many field in OpenERP/Odoo ?

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

How to use default_get method in OpenERP/Odoo ?

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

How to adds a separator line in OpenERP/Odoo ?

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"/>

How to use _inherit and _name attributes together, in OpenERP/Odoo ?

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 = { '

1 105 408
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: