Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3216 Переглядів

Hello, i try to import inventory lines with sql,

I can see the lines i imported on the inventory, but when i try to validate i have the following error :

...
File "/usr/lib/python2.7/dist-packages/openerp/addons/stock_account/stock_account.py", line 108, in _account_entry_move     location_from = move.location_id AttributeError: 'bool' object has no attribute 'location_id'

This is an exemple of line that provocs an error :

INSERT INTO stock_inventory_line (inventory_id, location_id, product_id,product_uom_id, theoretical_qty, product_qty)

VALUES (2475, 11, 27570, 1, -131950, 10000); 

It seems move is false, so doen't have a location_id

How can i solve it please ?

Аватар
Відмінити

It looks like you are trying to add value to an inventory adjustment. am I right?

Найкраща відповідь

Hi Thomas,

It is not referring to Boolean (not bool) fields but the fact (from the error message) recs has no value,So, I would suggest that you check any fields that has related attribute.

Аватар
Відмінити
Автор

It 's written location_from = move.location_ has an error, because bool has no location_id; so move is bool. And when i saw problems like this, in general it's FALSE. So the move is false, but what is this move ?

Related Posts Відповіді Переглядів Дія
1
квіт. 25
1790
3
жовт. 23
2758
2
квіт. 25
5729
2
черв. 21
4088
1
квіт. 21
1884