Monday, October 5, 2009

Base, Ir_model_data , _update


AIM : To Use the context of screen/action to the record which is getting imported (the context passed by client).

Change:

1. _update() of ir_model_data class has a new arguement context in its signature.

def _update(self,cr, uid, model, module, values, xml_id=False, store=True, noupdate=False, mode='init', res_id=False):

Will appear as

def _update(self,cr, uid, model, module, values, xml_id=False, store=True, noupdate=False, mode='init', res_id=False, context=None):

This context will be passed to OpenERP methods create(),browse(),read(),write() used withing _update().
Context is very important factor that comes into picture specially during translation.



GTK,win_import,import_csv

AIM : To pass the local context of screen/action to the record which is getting imported.

Change:

1. __init__() of Win_import class has a new arguement local_context in its signature.

def __init__(self, model, fields, preload = [], parent=None):

will appear as:
def __init__(self, model, fields, preload = [], parent=None, local_context=None):

2. The import_csv() of win_import.py has a new arguement context in its signature.

def import_csv(csv_data, f, model, fields):

will appear as:
def import_csv(csv_data, f, model, fields, context=None):

Thanks,
Regards,

Er. Jay Vora,
Sr. Application Engineer.
Tiny ERP Pvt. Ltd.

Ahmedabad,Gujarat,India.

M : 91- 9879354457
E-Mail : jvo@tinyerp.com
(Not miles, just an e-mail away...)


Wednesday, July 8, 2009

New blog for api change.

Api change in purchase,purchase.order,inv_line_create

def inv_line_create(self, a, ol):

Replaced By

def inv_line_create(self, cr, uid, a, ol):

required cr,uid for pooling other objects in this method for implementing anglo-saxon accounting.

Tuesday, June 9, 2009

stock, stock.move, onchange_lot_id

def onchange_lot_id(self, cr, uid, context=None, prodlot_id=False,
product_qty=False, loc_id=False, context=None):

replaced by:

def onchange_lot_id(self, cr, uid, ids, prodlot_id=False, product_qty=False,
loc_id=False, context=None):

It was a bug introduced recently (not present in previous versions, I
think), the call in the view was correct.

--
Fabien

Monday, June 8, 2009

sale, sale.order, _product_id_change

The sale order method in version 5.0.1 as an extra parameter, flag=True.
This may cause problem in your module if you override the
_product_id_change method, without overriding the view.

--
Fabien Pinckaers