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

Search In

How to use search_read in OpenERP(Odoo)?

A search_read function is now available. It will do a search and return a list of dict. In below code i have explain search_read self.search_read([], ['name']) [{'id': 3, 'name': u'Administrator'}, {'id': 7, 'name': u'Agrolait'}, {'id': 43, 'name':

How to use api returns in OpenERP(Odoo)?

Api unity of returned value will return a RecordSet of specified model based on original returned value: In below code i have explain api_returns @api.returns('res.partner') def afun(self): ... return x # a RecordSet Note- And if an old API functi

How to use api.onchange in OpenERP(Odoo)?

Api.onchange will trigger the call to the decorated function if any of the fields specified in the decorator is changed in the form: In below code you can use in your .py file. @api.onchange('fieldx') def do_stuff(self): if self.fieldx == x: self.fi

How to use cursor in OpenERP(Odoo)?

When we are using cursor we should use current environment cursor: like below code. self.env.cr except if we need to use threads,we use like below code. Environment.manage(): env = Environment(cr, uid, context) Note- Environment.manage() indica

How to make print a report in OpenERP(Odoo)?

If you want to make print a report in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file: - def _get_invoice_id(self, uid, datas): ... return {’ids’: [...]} ... ’actions’: [_get_invoice_id], ’result’: {’type’:’print’,

How to read records in OpenERP/Odoo ?

In record data is accessible via the read() method, which takes a list of ids (as returned by search()) and optionally a list of fields to fetch. ids = models.execute_kw(db, uid, password, 'res.partner', 'search', [[['is_company', '=', True]

How to use defaults function in OpenERP(Odoo)?

In defaults function first we have to go in .py file (python file) After that we have to decide where we want defaults function and then give attribute defaults function to that field. See below python code in .py file for reference : -class hr_empl

How to serving static files in Odoo/OpenERP ?

Odoo directly serves all static files in running modules. This may not be ideal when it comes to performances. And static files should generally be served by a static HTTP server. Odoo static files live in each module's static/ folder, so static fil

How to Access old API in Odoo ?

If you want to access old api to new api you have to move on migration method and By default, using new API you have to work on a new RecordSet class instance by yourself. But old context and model are still available in old api. means you have to mo

How to modify javascript function in point of sale in odoo 9

To modify javascript in Odoo-9 follow the below steps Go to point of sale module ->static file->src->js->screens.js For example you can use the below code in screens.js file. function openerp_pos_screens(instance, module){ //module is i

1 32 38
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: