Loosing context in some methods
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP R&D Addons Team 2 |
Bug Description
Hello,
In mrp module we have some methods which don't pass the context. For example force_production:
def force_productio
""" Assigns products.
@param *args: Arguments
@return: True
"""
pick_obj = self.pool.
##### !!! FIXME: here context isn't passed, but force_assign method in stock.picking has the attribute 'context'!!! #####
return True
That way, if we need to inherit force_assign method of stock.picking, we also must inherit all the methods which don't pass the context to force_assign and I think this is very bad practice, because if context would be passed everywhere, we wouldn't have these problems and it would be clear, perfect way to inherit only one method that we really need to inherit.
description: | updated |
description: | updated |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2) |
importance: | Undecided → Low |
status: | New → Confirmed |