Fix: Recipe edit never showed is_sold as it was not part of the json

This commit is contained in:
tanshu 2016-03-15 16:13:40 +05:30
parent 99439b63e8
commit bf79638d4b
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ def recipe_info(id, request):
recipe = DBSession.query(Recipe).filter(Recipe.id == id).one()
info = {'RecipeID': recipe.id,
'Product': {'ProductID': recipe.product_id, 'Name': recipe.product.name, 'Units': recipe.product.units,
'SalePrice': recipe.product.sale_price},
'SalePrice': recipe.product.sale_price, 'IsSold': recipe.product.is_sold},
'Quantity': recipe.quantity, 'SalePrice': recipe.sale_price, 'CostPrice': recipe.cost_price,
'ValidFrom': recipe.valid_from.strftime('%d-%b-%Y'), 'ValidTo': recipe.valid_to.strftime('%d-%b-%Y'),
'RecipeItems': []}