I tested the third scenario of guewen. It works, it's ok.
But you may prefer this solution :
class StockPicking(orm.Model): _inherit = 'stock.picking'
_columns = { 'new_field': fields.many2one( 'other.model', 'New field'), }
class StockPickingOut(orm.Model): _inherit = 'stock.picking.out'
def __init__(self, pool, cr): super(StockPickingOut, self).__init__(pool, cr) self._columns['new_field'] = self.pool['stock.picking']._columns['new_field']
I tested the third scenario of guewen. It works, it's ok.
But you may prefer this solution :
class StockPicking( orm.Model) :
_inherit = 'stock.picking'
_columns = {
'new_field' : fields.many2one(
'other. model',
'New field'),
}
class StockPickingOut (orm.Model) :
_inherit = 'stock.picking.out'
def __init__(self, pool, cr):
super( StockPickingOut , self)._ _init__ (pool, cr)
self._ columns[ 'new_field' ] = self.pool[ 'stock. picking' ]._columns[ 'new_field' ]