Disabled default and inefective computation of the stock sumary

This commit is contained in:
niekt0 2015-01-31 21:09:52 +01:00
parent 4604cd36c3
commit 5de7bf7458

View file

@ -118,6 +118,7 @@ class Shop:
def credit_negbalance_str(self): def credit_negbalance_str(self):
return self.currency.str(-self.credit_balance()) return self.currency.str(-self.credit_balance())
# XXX causing extra heavy delay ( thousands of extra SQL queries ), disabled
def inventory_balance(self): def inventory_balance(self):
balance = 0 balance = 0
# Each inventory account has its own currency, # Each inventory account has its own currency,
@ -132,8 +133,11 @@ class Shop:
# statement that will... ugh, accounting is hard! # statement that will... ugh, accounting is hard!
balance += inv.balance() * inv.currency.rates(self.currency)[0] balance += inv.balance() * inv.currency.rates(self.currency)[0]
return balance return balance
# XXX bypass hack
def inventory_balance_str(self): def inventory_balance_str(self):
return self.currency.str(self.inventory_balance()) return "XXX"
# return self.currency.str(self.inventory_balance())
def account_list(self, acctype, like_str="%%"): def account_list(self, acctype, like_str="%%"):
"""list all accounts (people or items, as per acctype)""" """list all accounts (people or items, as per acctype)"""