[FIX] stock_account: _should_be_valued doesn't return bool
_should_be_valued should always return a bool. Currently, when it's False, it returns False. However, when it's True, it returns self.company_id. After this fix, it returns True instead of self.company_id. closes odoo/odoo#120182 X-original-commit: 44430635936dd33b291d9d8514cef9b0013507e5 Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
@@ -27,4 +27,4 @@ class StockLocation(models.Model):
|
||||
be considered when valuating the stock of a company.
|
||||
"""
|
||||
self.ensure_one()
|
||||
return self.usage == 'internal' or (self.usage == 'transit' and self.company_id)
|
||||
return self.usage == 'internal' or bool(self.usage == 'transit' and self.company_id)
|
||||
|
||||
Reference in New Issue
Block a user