forked from brmlab/brmbar-github
brmbarv3 ItemEdit: Fix missing support for renaming items
This commit is contained in:
parent
278a869ba3
commit
b11cd6c338
2 changed files with 7 additions and 0 deletions
|
@ -109,6 +109,8 @@ class ShopAdapter(QtCore.QObject):
|
|||
@QtCore.Slot('QVariant', 'QVariant', result='QVariant')
|
||||
def saveItem(self, dbid, invmap):
|
||||
acct = brmbar.Account.load(db, id = dbid)
|
||||
if (acct.name != invmap["name"]):
|
||||
acct.rename(invmap["name"])
|
||||
buy, sell = acct.currency.rates(currency)
|
||||
if (sell != invmap["price"]):
|
||||
acct.currency.update_sell_rate(currency, invmap["price"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue