feat: sort products in list
This commit is contained in:
parent
d41484e69a
commit
bfc503c5d3
3 changed files with 15 additions and 2 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,5 +1,18 @@
|
||||||
# Matemat Changelog
|
# Matemat Changelog
|
||||||
|
|
||||||
|
<!-- BEGIN RELEASE v0.3.12 -->
|
||||||
|
## Version 0.3.12
|
||||||
|
|
||||||
|
Sort products
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
<!-- BEGIN CHANGES 0.3.12 -->
|
||||||
|
- Sort products in the list
|
||||||
|
<!-- END CHANGES 0.3.12 -->
|
||||||
|
|
||||||
|
<!-- END RELEASE v0.3.12 -->
|
||||||
|
|
||||||
<!-- BEGIN RELEASE v0.3.11 -->
|
<!-- BEGIN RELEASE v0.3.11 -->
|
||||||
## Version 0.3.11
|
## Version 0.3.11
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
|
|
||||||
__version__ = '0.3.11'
|
__version__ = '0.3.12'
|
||||||
|
|
|
@ -368,7 +368,7 @@ class MatematDatabase(object):
|
||||||
with self.db.transaction(exclusive=False) as c:
|
with self.db.transaction(exclusive=False) as c:
|
||||||
for row in c.execute('''
|
for row in c.execute('''
|
||||||
SELECT product_id, name, price_member, price_non_member, custom_price, stock, stockable
|
SELECT product_id, name, price_member, price_non_member, custom_price, stock, stockable
|
||||||
FROM products
|
FROM products ORDER BY name
|
||||||
'''):
|
'''):
|
||||||
product_id, name, price_member, price_external, custom_price, stock, stockable = row
|
product_id, name, price_member, price_external, custom_price, stock, stockable = row
|
||||||
products.append(Product(product_id, name, price_member, price_external, custom_price, stockable, stock))
|
products.append(Product(product_id, name, price_member, price_external, custom_price, stockable, stock))
|
||||||
|
|
Loading…
Reference in a new issue