Comment 8 for bug 1169998

Revision history for this message
David BEAL (ak) (davidbeal) wrote :

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']