Odoo Help

0

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

By
Akhilesh Gupta
on 10/6/15, 12:20 AM 3,955 views

Hi,

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.

I have resolved this issue after waste lot of time. I found two fields that was blank in stock.location i.e. parent_left and parent_right. Value of both field matter on the all operations related to inventory. Now My existing database working fine after set the values of these fields.

Akhilesh Gupta
on 1/24/17, 5:37 AM
0
Akhil P Sivan
On 10/6/15, 1:11 AM

Hi,

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
self.env.cr.commit()

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.

Register

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)

Stats

Asked: 10/6/15, 12:20 AM
Seen: 3955 times
Last updated: 6/23/17, 5:12 PM