mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 05:14:00 +02:00
Search functionality added to Stock Management.
This commit is contained in:
parent
fb6eadf031
commit
ba4d8686f6
3 changed files with 94 additions and 9 deletions
|
@ -120,9 +120,9 @@ class ShopAdapter(QtCore.QObject):
|
|||
db.commit()
|
||||
return alist
|
||||
|
||||
@QtCore.Slot(result='QVariant')
|
||||
def itemList(self):
|
||||
alist = [ self.acct_inventory_map(a) for a in shop.account_list("inventory") ]
|
||||
@QtCore.Slot('QVariant', result='QVariant')
|
||||
def itemList(self, query):
|
||||
alist = [ self.acct_inventory_map(a) for a in shop.account_list("inventory", like_str="%%"+query+"%%") ]
|
||||
db.commit()
|
||||
return alist
|
||||
|
||||
|
@ -188,5 +188,5 @@ ctx.setContextProperty('shop', ShopAdapter())
|
|||
|
||||
view.setSource('brmbar-gui-qt4/main.qml')
|
||||
|
||||
view.showFullScreen()
|
||||
view.show()
|
||||
app.exec_()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue