diff --git a/loko/mobile/views.py b/loko/mobile/views.py index e1a0360..1b067a2 100644 --- a/loko/mobile/views.py +++ b/loko/mobile/views.py @@ -965,7 +965,7 @@ def stock_purchase_order_detail_mobile(request, pk): def stock_preparation_order_detail_mobile(request, pk): """Mobile detail page for a preparation order (bon de préparation).""" from django.shortcuts import get_object_or_404 - from stock.models import PreparationOrder, Stock + from stock.models import PreparationOrder, Stock, ProductCategory from stock.permissions import get_user_accessible_warehouses from common.models import UserConfig @@ -1120,6 +1120,7 @@ def stock_preparation_order_detail_mobile(request, pk): 'preparation_order': preparation_order, 'items_with_stock': items_with_stock, 'other_items': other_items_with_info, + 'categories': list(ProductCategory.objects.order_by('name_fr').values('id', 'code', 'name_fr')), 'can_manage': can_manage, 'can_edit': can_edit, 'can_cancel': can_cancel, diff --git a/loko/stock/templates/stock/_edit_preparation_order_modal.html b/loko/stock/templates/stock/_edit_preparation_order_modal.html new file mode 100644 index 0000000..69c8b7e --- /dev/null +++ b/loko/stock/templates/stock/_edit_preparation_order_modal.html @@ -0,0 +1,677 @@ +{% load i18n stock_custom_filters %} + +{% if can_edit %} + + + +
+ + +{% endif %} diff --git a/loko/stock/templates/stock/mobile/stock_preparation_order_detail_mobile.html b/loko/stock/templates/stock/mobile/stock_preparation_order_detail_mobile.html index 3856451..347d895 100644 --- a/loko/stock/templates/stock/mobile/stock_preparation_order_detail_mobile.html +++ b/loko/stock/templates/stock/mobile/stock_preparation_order_detail_mobile.html @@ -260,9 +260,16 @@ {% if items_with_stock %} -