Comment 6 for bug 493657

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Xavier and Raphael,

I think,the CHECK of self.pool.get(Object) is quite fair.

As far as the creation of the custom field is concerned, when its created ;,it calls _auto_init() for that object. so the purpose of new field is served, Even the column is added too.
At this time, The object will be available in pool.
Example: By customization in GUI : in product.product; I am adding sale_order_id(many2one of Sale.order), When I press Save,it will add this column to product_product through _auto_init(). Work is Done! (self.pool dictionary will have sale.order)

Now, when I update the database and/or product module,POOL will not have the record of sale.order when its loading Product module. But But But, its a custom field, it does not need any update here at this point of time.So, its fine if we skip.

If someone argues that what if I have updated the custom field?Answer would be, If you update(EDIT) the custom field, we can call _auto_init() on write() if important field is updated.

Share your views please.

Thank you.