Odoo Help


This community 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.


TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Akhilesh Gupta
on 10/6/15, 12:20 AM 1,761 views


When I'm creating new warehouse, getting an error

File "/home/apagen/workspace/odoo/openerp/models.py", line 4191, in _create

cr.execute('update '+self._table+' set parent_left=%s,parent_right=%s where id=%s', (pleft+1, pleft+2, id_new))

TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

I need help asap.


Akhil P Sivan

--Akhil P Sivan--
| 5 3 6
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 10/6/15, 1:11 AM


Does your db contain demo data? I think your db might be corrupted. Can you check with a fresh db? The "pleft" is not supposed to be empty, but due to some reason (eg: corrupted db) it is becoming null.

You can try to fix by using OCA shell addon  and run the following:

1. Install the addon

2. Run odoo by command: 

python odoo.py shell -d <dbname>

3. In the interactive shell run the following statements:

self.env['stock.warehouse']._parent_store_compute()       //This should return True

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 10/6/15, 12:20 AM
Seen: 1761 times
Last updated: 10/6/15, 1:26 AM