Hello,
I'm having so much issues with this code now. Here is my function :
def get_available_view_value(self):
print ("I am inside method")
try:
if self.unavailable: (line 89)
print ("False commence")
self.unavailable=False
Print ("False value")
else:
self.unavailable=True
print ("True Value")
except Exception as e:
print ("exception raised")
error_message = _('Exception in getting available view value. Error Message is: ')+e.message
_logger.exception(error_message+' error is %s ',e)
Here are my logs :
I am inside method
exception raised
2016-07-13 14:39:54,245 11135 ERROR odoo openerp.addons.wms_stock.models.stock_location: Exception in getting available view value. Error Message is: error is ('ValueError', 'Expected singleton: stock.location(17, 19)')
Traceback (most recent call last):
File "/home/xyz/git/odoo-210/odoo/staples-addons/wms_stock/models/stock_location.py", line 89, in get_available_view_value
if self.unavailable:
File "/home/xyz/git/odoo-210/odoo/openerp/fields.py", line 825, in __get__
record.ensure_one()
File "/home/xyz/git/odoo-210/odoo/openerp/models.py", line 5307, in ensure_one
raise except_orm("ValueError", "Expected singleton: %s" % self)
except_orm: ('ValueError', 'Expected singleton: stock.location(17, 19)')
I have no idea how to solve this. Can anyone help ? Thanks in advance