forked from brmlab/brmbar-github
brmbar v3 ItemEdit: Support for adding barcodes to items
This commit is contained in:
parent
4e1681cb94
commit
ffd0ca29c9
2 changed files with 25 additions and 4 deletions
|
@ -102,6 +102,10 @@ class ShopAdapter(QtCore.QObject):
|
|||
def itemList(self):
|
||||
return [ self.acct_inventory_map(a) for a in shop.account_list("inventory") ]
|
||||
|
||||
@QtCore.Slot('QVariant', 'QVariant', result='QVariant')
|
||||
def addBarcode(self, dbid, barcode):
|
||||
return brmbar.Account.load(db, id = dbid).add_barcode(barcode)
|
||||
|
||||
db = psycopg2.connect("dbname=brmbar")
|
||||
shop = brmbar.Shop.new_with_defaults(db)
|
||||
currency = shop.currency
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue