Code review comment for lp:~camptocamp/stock-logistic-flows/6.1-add-mrp_open_lot_attributes-lep

Revision history for this message
camptocamp-business-robot (camptocamp-business-robot) wrote :

Please use:
from openerp.osv import orm, fields

and instanciate the classes with:
class x_y_z(orm.Model):
class a_b_c(orm.TransientModel):

The other form is deprecated.

In osv.py:
"
# deprecated - for backward compatibility.
osv = Model
osv_memory = TransientModel
osv_abstract = AbstractModel # ;-)
"

I'm not found of the extends fields_view_get approach but in this case it is probably less code to maintain than redefining views or doing a function field to be used by attrs so it is OK for me.

Opinion:
Adding sub function in open_lot will make it more readable and easier to override.

review: Needs Fixing (no test, code review)

« Back to merge proposal