Odoo Help


AttributeError: 'NoneType' object has no attribute 'state'

on 8/20/14, 12:13 PM 1,752 views


im trying to create and process a new move traceability in warehouse, after creating it i can´t process the same move

my code is some thing like that:

create new move

id=self.pool.get('stock.move').create(cr, uid, values, context=context)

processing the move with the same id

super(stock_move, self).action_done(cr,uid,ids,context=context)

but i get an error:

AttributeError: 'NoneType' object has no attribute 'state'

any help, thx in advance

On 8/21/14, 3:29 AM

if not values:


if not context:


process the move with

move_id=self.pool.get('stock.move').create(cr, uid, values, context=context)

super(stock_move, self).action_done(cr,uid,[move_id],context=context)



thank you very very much :)

on 8/21/14, 3:46 AM
Mariusz Mizgier
On 8/21/14, 2:39 AM

From your code you call action_done for ids and you get id as a newly created move.

yes Mariusz, i can create a new move, and i have her id, but i want to process completly my move but i can´t, i give an error. any idea how solve that?

on 8/21/14, 3:02 AM

As I wrote earlier - from your code new move is bound to the variable id, but you want to process the same id calling action_done with ids - change your line of code like: super(stock_move, self).action_done(cr, uid, id, context=context) That way it should work just fine.

Currenda Sp. z o.o., Mariusz Mizgier
on 8/21/14, 3:13 AM

not working :(, with new error: Iteration is not allowed on browse_record

on 8/21/14, 3:40 AM
On 8/21/14, 2:35 AM

any one here..?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/20/14, 12:13 PM
Seen: 1752 times
Last updated: 3/16/15, 8:10 AM