Community mailing list archives

community@mail.odoo.com

Functional overriding

by
mudoko
- 02/24/2016 04:09:53

 Hi guys am trying to overide a fumctional field in stocks(stocks_quant) _calc_inventory_value, as follows:


class mrp_extend(models.Model):

    _inherit = 'mrp.bom'

    def _calc_inventory_values(self, cr, uid, ids, name, attr, context=None):

       RS=super(stock_quant, self)

                res=RS._calc_inventory_value(cr, uid, ids, name,attr, context=None)

                return res


and the functional field is:

 _columns = { 'inventory_value': fields.function(_calc_inventory_values, string="Inventory Value", type='float', readonly=True),}



But am getting 'TypeError: super(type, obj): obj must be an instance or subtype of type' any help kindly.


Laballieds,

Nairobi:gate 256, Nairobi.

P.O.Box - 45855 -00100, Nairobi.

Tel:+254 721449067

Email petypi@gmail.com

Mobile: +254 721449067

Website www.softlinkoptions.com