0
votes

I am overriding the stock.move function action_done(). but i get an error stated below:

TypeError: cannot convert dictionary update sequence element #0 to a sequence

My codes are below:

Original function in stock.move:

def action_done(self, cr, uid, ids, context=None):
    context = context or {}
    .....

My overriding function:

@api.model
def action_done(self):
    super(StockMove, self).action_done()

I tried by passing self._cr and self._uid with context=None, but i get error as "Multiple Values for context" Also, tried to replicate the whole signature as it is, it gives the error " TypeError: cannot convert dictionary update sequence element #0 to a sequence "

Moreover the line which calls the function is in odoo core stock.py as below inside do_transfer function:

self.pool.get('stock.move').action_done(cr, uid, todo_move_ids, context=notrack_context)

Please Help me.

Thanks,

1

1 Answers

0
votes

You need to make an old_api call directly. There's a built in decorator for that already:

@api.v7
def action_done(self, cr, uid, ids, context=None):
    super(StockMove, self).action_done(cr, uid, ids, context=notrack_content)

but you'll have to make sure you're passing in the right ids for the todo_move_ids argument