mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Addition of the ShoppingList view to know the item to buy
This commit is contained in:
@ -32,12 +32,12 @@
|
||||
<a href="{{ url('counter:admin', counter_id=c.id) }}">{% trans %}Edit{% endtrans %}</a> -
|
||||
<a href="{{ url('counter:stats', counter_id=c.id) }}">{% trans %}Stats{% endtrans %}</a> -
|
||||
{% endif %}
|
||||
{%if c.stock %}
|
||||
{% if c.stock %}
|
||||
<a href="{{ url('stock:items_list', stock_id=c.stock.id)}}">Stock</a> -
|
||||
<a href="{{ url('stock:shoppinglist_list', stock_id=c.stock.id)}}">{% trans %}Shopping lists{% endtrans %}</a> -
|
||||
{% else %}
|
||||
<a href="{{url('stock:new', counter_id=c.id)}}">{% trans %}Create new stock{% endtrans%}</a> -
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.is_owner(c) %}
|
||||
<a href="{{ url('counter:prop_admin', counter_id=c.id) }}">{% trans %}Props{% endtrans %}</a>
|
||||
{% endif %}
|
||||
|
@ -88,6 +88,11 @@ class CounterTabsMixin(TabedViewMixin):
|
||||
'slug': 'last_ops',
|
||||
'name': _("Last operations"),
|
||||
})
|
||||
tab_list.append({
|
||||
'url': reverse_lazy('stock:items_list', kwargs={'stock_id': self.object.stock.id}),
|
||||
'slug': 'stock_items_list',
|
||||
'name': _("Stock items list"),
|
||||
})
|
||||
return tab_list
|
||||
|
||||
class CounterMain(CounterTabsMixin, CanViewMixin, DetailView, ProcessFormView, FormMixin):
|
||||
|
Reference in New Issue
Block a user