Stored procedure helpers. Order repo and model. More SQLService updates.

* A generic stored procedure helper added, and support for calling them.
* Order and OrderItem tables added, including helpers and calls to SP for creation and updates.
* Minor updates to other repositories.
This commit is contained in:
Marcus Lindvall 2019-08-30 12:09:10 +02:00
parent b77a7069ce
commit 0af38e286e
9 changed files with 730 additions and 138 deletions

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from pyjeeves.models.raw import PriceList as PriceListModel
from pyjeeves.models import db
from sqlalchemy.orm.exc import NoResultFound
from pyjeeves import logging
@ -15,7 +16,7 @@ class PriceList():
def get(price_list_no):
""" Query a price list by number """
try:
return PriceListModel.query.filter_by(
return db.raw.query(PriceListModel).filter_by(
PrisLista=price_list_no
).one()
except NoResultFound: