Blog

At toolkit we are always learning something new. In this section we share our thoughts and views as well as new technology challenges that have come our way. Tell us what you think!
Nov 4
Nov 4

Odoo Minimum Hardware Requirement

Requirements for running Odoo 9 Community and Enterprise are the same. For a 5 user site = 2 CPU server and 2 GB Ram For 20 user site = 4 CPU server and 8 GB Ram For 100+ user site = recommend splitting app and database servers, 2 x 8 CPU servers with 32 GB […]

  Read more
Oct 2
Oct 2

The Worst Server Setup Mistake You Can Make

There’s one server setup mistake you can make that will screw you up for years to come. It’ll haunt your business, your developers and your server admins, and be hugely expensive to fix. It’s surprisingly easy to make. The mistake? Setting the timezone to anything other than UTC Use UTC Use UTC. Use UTC. Use […]

  Read more
Oct 0
Oct 0

Reference a record in a table based on XML id name

There is a method called “get_object_reference” which gives you the database ID from xml ID. In this method you have to pass module name where xml record is created and xml ID of the record. Example: V7: self.pool.get(‘ir.model.data’).get_object_reference(cr, uid, ‘module_name’, ‘xml_id_of_record’)[1] V8: record_id = self.env.ref(‘module_name.xml_id_of_record’).id

  Read more
Jan 1
Jan 1

Openerp set default value of popup form from one2many field parent

Class definition (shop.py), please note the magic active_id class item(osv.osv): _name = “shop.item” _columns = { “item_id”: fields.many2one(“shop.cart”, “Cart”), } _defaults = { “item_id”: lambda self, cr, uid, c: c.get(‘item_id’, False), } class cart(osv.osv): _name = “shop.cart” _columns = { “item_ids”: one2many(“shop.item”, “item_id”, “Items”), } In the view definition for the one2many field (shop_view.xml) <field […]

  Read more
Dec 0
Dec 0

OpenERP function fields, and the store= parameter

One thing I could never quite get my head around was the store= parameter in OpenERP. OpenERP explains it like this: store Parameter It will calculate the field and store the result in the table. The field will be recalculated when certain fields are changed on other objects. It uses the following syntax: store = […]

  Read more
Aug 0
Aug 0

Create A Scheduler in OpenERP

Here are Steps you have to follow :Step 1 :          In view file simply write as under          <record model=”ir.cron” id=”resource_panelty_cron”>            <field name=”name”>Resource Panelty Count</field>            <field name=”interval_number”>1</field>            <field name=”interval_type”>minute</field>            […]

  Read more
Jul 3
Jul 3

Creating a Sequence in Odoo

Adding a sequence for records in OpenERP is very simple. For making a field a sequence type, we need to create new sequence or use existing sequence. For creating a sequence, we need to create two type of objects, one is “ir.sequence.type” and other “ir.sequence”. The example to create these records are given below.. <record […]

  Read more
Jul 0
Jul 0

Heirarchical Data in OpenERP

Heirarchical data in OpenERP can be found in account.account and product.category and warehouse category. This can usually be seen in tables where there is a parent_left and parent_right. To make this clear here are some explanation on how to go about this hierarchical mystery. The hierarchical structure is accomplished using the nested set model. Accrding to […]

  Read more
Jun 0
Jun 0

FIXED: ACCESS DENIED during backup in OpenERP v7

I got a message Access Denied during a backup in OpenERP 7   To solve this: Edit your openerp-server.conf file     Just add pg_path = /usr/pgsql-9.2/bin The path will depend where you installed your postgresql server

  Read more
Jun 1
Jun 1

Install OpenERP-Server and Postgresql on separate servers

The objective is to install OpenERP and PostgreSQL on separate machines and configure them so that OpenERP can connect to the PostgreSQL running on the remote machine. We will go step by step Here are the details of my environment. PostgreSQL will be installed on fedora running in a virual machine. OpenERP All-in-One (Server, Client […]

  Read more
May 3
May 3

ODOO many2many relation with attributes

#file: res.partner.py from osv import osv from osv import fields class res_partner_rel(osv.osv): _name = ‘res.partner.rel’ _columns = { ‘partner_left_id’ : fields.many2one(‘res.partner’), ‘partner_right_id’: fields.many2one(‘res.partner’,’Relationed Partner’), ‘property_left2right’: fields.char(‘Relation’,size=32), } class res_partner(osv.osv): _name = ‘res.partner’ _inherit = ‘res.partner’ _columns = { ‘m2m_right2left’ : fields.many2many(‘res.partner’,’res_partner_rel’,’partner_right_id’,’partner_left_id’), ‘m2m_left2right’ : fields.many2many(‘res.partner’,’res_partner_rel’,’partner_left_id’,’partner_right_id’), ‘o2m_left_ids’: fields.one2many(‘res.partner.rel’,’partner_left_id’), } < #file: partner_view.xml <?xml version=”1.0″ encoding=”UTF-8″?> <openerp> <data> […]

  Read more
May 0
May 0

Displaying images for SQL Reports

When creating SQL reports that need to pull images from OpenERP, simply selecting the column that holds the image is not enough. OpenERP stores images base64 encoded, so the decode function needs to be used in order to convert it to proper binary. However, one problem is that OpenERP sometimes injects characters into the base64 […]

  Read more
Apr 0
Apr 0

OpenERP Stock Icons

For those of you who wants to know where to find the complete listing of OpenERP icons you can check http://neynt.readthedocs.org/en/latest/stock.html Open folder with thumbnails web/7.0/addons/web/static/src/img/icons Render a html view: Locally you can build up a HTML view with a script like this (or use a remote website..): # this is just an ugly start… […]

  Read more
Apr 0
Apr 0

Adding additional fields using a custom module in OpenERP 7

My eyes, the goggles do nothing! Getting started on OpenERP can be a bit daunting, initially this behemoth can be really painful. However once you get familiar with the system everything is really easy. In this tutorial I’ll go through the steps involved in adding an additional field to an existing model and adding it […]

  Read more