Commit 0ac69b43 authored by Patrick's avatar Patrick

Remove dead comments

parent 312d02a6
......@@ -232,10 +232,6 @@ class CustomerWithUserDataForm(UserDataForm):
class CustomerWithUserDataAdmin(ImportExportMixin, admin.ModelAdmin):
# http://stackoverflow.com/questions/17919361/how-can-i-add-a-button-into-django-admin-change-list-view-page
# class Media:
# js = ('js/is_order_confirm_send.js', )
form = CustomerWithUserDataForm
resource_class = CustomerResource
list_display = (
......@@ -244,7 +240,7 @@ class CustomerWithUserDataAdmin(ImportExportMixin, admin.ModelAdmin):
search_fields = ('short_basket_name', 'long_basket_name', 'user__email', 'email2')
list_per_page = 16
list_max_show_all = 16
list_filter = ('is_active', 'may_order', 'valid_email') # 'delivery_point')
list_filter = ('is_active', 'may_order', 'valid_email')
def has_delete_permission(self, request, customer=None):
if request.user.groups.filter(
......
......@@ -66,7 +66,6 @@ class PermanenceBoardInline(ForeignKeyCacheMixin, admin.TabularInline):
class DeliveryBoardInline(ForeignKeyCacheMixin, TranslatableTabularInline):
model = DeliveryBoard
ordering = ("id",)
# ordering = ("delivery_date", "delivery_point__tree_id", "delivery_point__lft",)
fields = ['delivery_date', 'delivery_comment', 'delivery_point', 'status', ]
extra = 0
readonly_fields = ['status', ]
......
......@@ -40,7 +40,6 @@ class CustomerPurchaseSendInlineForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(CustomerPurchaseSendInlineForm, self).__init__(*args, **kwargs)
# if self.instance.id is not None:
purchase = self.instance
self.fields["previous_purchase_price"].initial = purchase.purchase_price
self.fields["previous_offer_item"].initial = purchase.offer_item
......
......@@ -66,7 +66,6 @@ class OfferItemPurchaseSendInlineForm(forms.ModelForm):
self.fields["customer"].widget.can_delete_related = False
if self.instance.offer_item.order_unit not in [PRODUCT_ORDER_UNIT_KG, PRODUCT_ORDER_UNIT_PC_KG]:
self.fields["purchase_price"].widget.attrs['readonly'] = True
# self.fields["purchase_price"].disabled = True
class Meta:
widgets = {
......@@ -183,10 +182,6 @@ class OfferItemSendDataForm(forms.ModelForm):
# Important : linked with vvvv
return offer_item
# class Meta:
# model = OfferItem
# fields = "__all__"
class OfferItemSendAdmin(admin.ModelAdmin):
form = OfferItemSendDataForm
......@@ -207,7 +202,6 @@ class OfferItemSendAdmin(admin.ModelAdmin):
list_max_show_all = 16
# Important : Do not order by 'translations__order_sort_order'
# because in this case, when searching on the long_name, records may be duplicated in the admin result list.
# ordering = ('translations__long_name',) #, 'translations__order_sort_order',)
ordering = ('translations__long_name',)
readonly_fields = ('get_html_producer_qty_stock_invoiced', 'get_vat_level')
......
......@@ -71,7 +71,6 @@ class RepanierCustomBackend(ModelBackend):
raise forms.ValidationError(
_(
"Because you tried to log in too many time without success, you must now first reset your password."),
# _("Too many attempt."),
code='attempt',
)
else:
......@@ -79,7 +78,6 @@ class RepanierCustomBackend(ModelBackend):
raise forms.ValidationError(
_(
"Because you tried to log in too many time without success, you must now first reset your password."),
# _("Too many attempt."),
code='attempt',
)
else:
......
......@@ -53,15 +53,6 @@ class PermanenceMenu(Menu):
for permanence in Permanence.objects.filter(status=PERMANENCE_OPENED) \
.only("id", "permanence_date", "with_delivery_point") \
.order_by('permanence_date'):
# if permanence.with_delivery_point:
# for delivery in DeliveryBoard.objects.filter(permanence_id=permanence.id).order_by("id"):
# displayed_permanence_counter += 1
# if first_pass and separator:
# submenu_id = self.append_separator(nodes, master_id, submenu_id)
# first_pass = False
# separator = True
# submenu_id = self.append_delivery(is_anonymous, permanence, delivery, nodes, master_id, submenu_id)
# else:
displayed_permanence_counter += 1
if first_pass and separator:
submenu_id = self.append_separator(nodes, master_id, submenu_id)
......
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from django.db.models import F
from repanier.const import *
from repanier.models import LUT_DepartmentForCustomer, LUT_PermanenceRole, LUT_ProductionMode, Product, Permanence
class Command(BaseCommand):
args = '<none>'
help = 'Fill order unit field and migrate non fr to fr'
def handle(self, *args, **options):
LUT_DepartmentForCustomer.objects.all().update(
short_name_fr=F('short_name'),
description_fr=F('description')
)
LUT_PermanenceRole.objects.all().update(
short_name_fr=F('short_name'),
description_fr=F('description')
)
LUT_ProductionMode.objects.all().update(
short_name_fr=F('short_name'),
description_fr=F('description')
)
for product in Product.objects.all():
product.long_name_fr = product.long_name
product.offer_description_fr = product.offer_description
product.production_mode_1N = product.production_mode
if product.order_unit in [
PRODUCT_ORDER_UNIT_NAMED_LT,
PRODUCT_ORDER_UNIT_NAMED_PC,
PRODUCT_ORDER_UNIT_NAMED_KG
]:
product.wrapped = True
else:
product.wrapped = False
if product.order_unit==PRODUCT_ORDER_UNIT_LOOSE_PC:
product.order_unit=PRODUCT_ORDER_UNIT_PC
elif product.order_unit==PRODUCT_ORDER_UNIT_LOOSE_KG:
product.order_unit=PRODUCT_ORDER_UNIT_KG
elif product.order_unit==PRODUCT_ORDER_UNIT_LOOSE_PC_KG:
product.order_unit=PRODUCT_ORDER_UNIT_PC_KG
elif product.order_unit==PRODUCT_ORDER_UNIT_NAMED_LT:
product.order_unit=PRODUCT_ORDER_UNIT_LT
elif product.order_unit==PRODUCT_ORDER_UNIT_LOOSE_BT_LT:
product.order_unit=PRODUCT_ORDER_UNIT_PC_PRICE_LT
elif product.order_unit==PRODUCT_ORDER_UNIT_NAMED_PC:
product.order_unit=PRODUCT_ORDER_UNIT_PC
elif product.order_unit==PRODUCT_ORDER_UNIT_NAMED_KG:
product.order_unit=PRODUCT_ORDER_UNIT_KG
elif product.order_unit==PRODUCT_ORDER_UNIT_NAMED_PC_KG:
product.order_unit=PRODUCT_ORDER_UNIT_PC_KG
product.save()
Permanence.objects.all().update(
short_name_fr=F('short_name'),
offer_description_fr=F('offer_description'),
invoice_description_fr=F('invoice_description'))
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from django.utils import translation
from repanier.const import *
from repanier.models import LUT_DepartmentForCustomer, LUT_PermanenceRole, LUT_ProductionMode, Product, Permanence
class Command(BaseCommand):
args = '<none>'
help = 'Fill translation'
def handle(self, *args, **options):
LUT_DepartmentForCustomer.objects.rebuild()
LUT_PermanenceRole.objects.rebuild()
LUT_ProductionMode.objects.rebuild()
translation.activate('fr')
for obj in LUT_DepartmentForCustomer.objects.all():
if obj.short_name_fr is not None:
obj.short_name=obj.short_name_fr
if obj.description_fr is not None:
obj.description=obj.description_fr
obj.save()
for obj in LUT_PermanenceRole.objects.all():
if obj.short_name_fr is not None:
obj.short_name=obj.short_name_fr
if obj.description_fr is not None:
obj.description=obj.description_fr
obj.save()
for obj in LUT_ProductionMode.objects.all():
if obj.short_name_fr is not None:
obj.short_name=obj.short_name_fr
if obj.description_fr is not None:
obj.description=obj.description_fr
obj.save()
for product in Product.objects.all():
product.production_mode.add(product.production_mode_1N_id)
if product.long_name_fr is not None:
product.long_name = product.long_name_fr
if product.offer_description_fr is not None:
product.offer_description = product.offer_description_fr
product.save()
for obj in Permanence.objects.all():
if obj.short_name_fr is not None:
obj.short_name=obj.short_name_fr
if obj.offer_description_fr is not None:
obj.offer_description=obj.offer_description_fr
if obj.invoice_description_fr is not None:
obj.invoice_description=obj.invoice_description_fr
obj.save()
This diff is collapsed.
# -*- coding: utf-8 -*-
import uuid
from django.conf import settings
from django.contrib.contenttypes.management import update_all_contenttypes
from django.contrib.auth.models import Permission
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.management import create_permissions
from django.db.models import get_models, get_app
from django.db.models import F
from django.template.loader import render_to_string
from django.utils import translation
from repanier.const import *
from repanier.models import LUT_DepartmentForCustomer, LUT_PermanenceRole, LUT_ProductionMode, Product, Permanence, \
OfferItem, Purchase, Producer, BankAccount, ProducerInvoice, CustomerInvoice, PermanenceBoard
from repanier.tools import recalculate_order_amount
class Command(BaseCommand):
args = '<none>'
help = 'Fill translation'
def handle(self, *args, **options):
cur_language = translation.get_language()
for permanence in Permanence.objects.all().order_by():
recalculate_order_amount(
permanence_id=permanence.id,
permanence_status=permanence.status,
send_to_producer=True,
migrate=True
)
for language in settings.PARLER_LANGUAGES[settings.SITE_ID]:
translation.activate(language["code"])
i = 0
for offer_item in OfferItem.objects.filter(
permanence_id=permanence.id,
translations__language_code=language["code"]
).order_by().order_by(
"department_for_customer__tree_id",
"department_for_customer__lft",
"translations__long_name",
"order_average_weight",
"producer__short_profile_name"
):
offer_item.order_sort_order = i
offer_item.save_translations()
i += 1
translation.activate(cur_language)
update_all_contenttypes()
create_permissions(get_app("repanier"), get_models(), options.get('verbosity', 0))
# -*- coding: utf-8 -*-
import uuid
from django.conf import settings
from django.contrib.contenttypes.management import update_all_contenttypes
from django.contrib.auth.models import Permission
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.management import create_permissions
from django.db.models import get_models, get_app
from django.db.models import F
from django.template.loader import render_to_string
from django.utils import translation
from repanier.const import *
from repanier.models import LUT_DepartmentForCustomer, LUT_PermanenceRole, LUT_ProductionMode, Product, Permanence, \
OfferItem, Purchase, Producer, BankAccount, ProducerInvoice, CustomerInvoice, PermanenceBoard
from repanier.tools import recalculate_order_amount
class Command(BaseCommand):
args = '<none>'
help = 'Recalculate Producer Invoice'
def handle(self, *args, **options):
for permanence in Permanence.objects.filter(status=PERMANENCE_SEND).order_by():
print('--------------------------')
print permanence
recalculate_order_amount(
permanence_id=permanence.id,
permanence_status=permanence.status,
migrate=True
)
# INSERT INTO repanier_offeritem_translation(language_code, cache_part_a, cache_part_b, master_id, cache_part_c, long_name, order_sort_order, cache_part_e)
# SELECT 'en', cache_part_a, cache_part_b, master_id, cache_part_c, long_name, order_sort_order, cache_part_e
# FROM repanier_offeritem_translation WHERE language_code = 'fr';
#
# INSERT INTO repanier_offeritem_translation(language_code, cache_part_a, cache_part_b, master_id, cache_part_c, long_name, order_sort_order, cache_part_e)
# SELECT 'nl', cache_part_a, cache_part_b, master_id, cache_part_c, long_name, order_sort_order, cache_part_e
# FROM repanier_offeritem_translation WHERE language_code = 'fr';
......@@ -88,13 +88,6 @@ class BoxContent(models.Model):
get_calculated_customer_content_price.short_description = (_("customer content price"))
get_calculated_customer_content_price.allow_tags = False
# def get_calculated_content_deposit(self):
# workaround for a display problem with Money field in the admin list_display
# return self.calculated_content_deposit
#
# get_calculated_content_deposit.short_description = (_("content deposit"))
# get_calculated_content_deposit.allow_tags = False
class Meta:
verbose_name = _("box content")
verbose_name_plural = _("boxes content")
......
......@@ -55,7 +55,6 @@ class Customer(models.Model):
phone1 = models.CharField(
_("phone1"),
max_length=25,
# validators=[MinLengthValidator(2)],
null=True, blank=True, default=EMPTY_STRING)
phone2 = models.CharField(
_("phone2"), max_length=25, null=True, blank=True, default=EMPTY_STRING)
......
......@@ -97,8 +97,3 @@ class DeliveryBoard(TranslatableModel):
class Meta:
verbose_name = _("delivery board")
verbose_name_plural = _("deliveries board")
# ordering = ("id",)
# unique_together = ("permanence", "delivery_point", "delivery_date",)
# index_together = [
# ["permanence", "delivery_point", "delivery_date"],
# ]
......@@ -34,9 +34,6 @@ class LUT_ProductionMode(MPTTModel, TranslatableModel):
short_name=models.CharField(_("short_name"), max_length=50, db_index=True, unique=True, default=EMPTY_STRING),
description=HTMLField(_("description"), blank=True, default=EMPTY_STRING),
)
# picture = FilerImageField(
# verbose_name=_("picture"), related_name="production_mode_picture",
# null=True, blank=True)
picture2 = AjaxPictureField(
verbose_name=_("picture"),
null=True, blank=True,
......@@ -142,10 +139,6 @@ class LUT_PermanenceRole(MPTTModel, TranslatableModel):
short_name=models.CharField(_("short_name"), max_length=50, db_index=True, unique=True, default=EMPTY_STRING),
description=HTMLField(_("description"), blank=True, default=EMPTY_STRING),
)
# delivery_points = models.ManyToManyField(
# LUT_DeliveryPoint,
# verbose_name=_("delivery points"),
# blank=True)
is_counted_as_participation = models.BooleanField(_("is_counted_as_participation"), default=True)
customers_may_register = models.BooleanField(_("customers_may_register"), default=True)
......
......@@ -31,7 +31,6 @@ class OfferItem(TranslatableModel):
default=EMPTY_STRING, blank=True, null=True),
cache_part_a=HTMLField(default=EMPTY_STRING, blank=True),
cache_part_b=HTMLField(default=EMPTY_STRING, blank=True),
# cache_part_c=HTMLField(default=EMPTY_STRING, blank=True),
cache_part_e=HTMLField(default=EMPTY_STRING, blank=True),
order_sort_order=models.IntegerField(
_("customer sort order for optimization"),
......@@ -99,10 +98,6 @@ class OfferItem(TranslatableModel):
customer_vat = ModelMoneyField(
_("vat"),
default=DECIMAL_ZERO, max_digits=8, decimal_places=4)
# compensation = ModelMoneyField(
# _("compensation"),
# help_text=_("compensation to add to the customer unit price"),
# default=DECIMAL_ZERO, max_digits=8, decimal_places=4)
unit_deposit = ModelMoneyField(
_("deposit"),
help_text=_('deposit to add to the unit price'),
......@@ -274,32 +269,8 @@ class OfferItem(TranslatableModel):
else:
return self.producer_unit_price - self.producer_vat
# def get_customer_unit_price(self):
# # workaround for a display problem with Money field in the admin list_display
# return self.customer_unit_price
#
# get_customer_unit_price.short_description = (_("customer unit price"))
# get_customer_unit_price.allow_tags = False
# def get_producer_unit_price(self):
# # workaround for a display problem with Money field in the admin list_display
# return self.producer_unit_price
#
# get_producer_unit_price.short_description = (_("producer unit price"))
# get_producer_unit_price.allow_tags = False
# def get_unit_deposit(self):
# # workaround for a display problem with Money field in the admin list_display
# return self.unit_deposit
#
# get_unit_deposit.short_description = (_("deposit"))
# get_unit_deposit.allow_tags = False
def get_unit_price(self, customer_price=True):
if customer_price:
# if with_compensation:
# unit_price = self.customer_unit_price + self.compensation
# else:
unit_price = self.customer_unit_price
else:
unit_price = self.producer_unit_price
......@@ -313,24 +284,11 @@ class OfferItem(TranslatableModel):
else:
return "%s" % (unit_price,)
# @property
# def unit_price_with_compensation(self):
# return self.get_unit_price(with_compensation=True)
# @property
# def unit_price_with_vat(self, customer_price=True):
# return self.get_unit_price(with_compensation=False, customer_price=True)
def get_reference_price(self, customer_price=True):
if self.order_average_weight > DECIMAL_ZERO and self.order_average_weight != DECIMAL_ONE:
if self.order_unit in [PRODUCT_ORDER_UNIT_PC_PRICE_KG, PRODUCT_ORDER_UNIT_PC_PRICE_LT,
PRODUCT_ORDER_UNIT_PC_PRICE_PC]:
if customer_price:
# if with_compensation:
# reference_price = (
# self.customer_unit_price.amount + self.compensation.amount) \
# / self.order_average_weight
# else:
reference_price = self.customer_unit_price.amount / self.order_average_weight
else:
reference_price = self.producer_unit_price.amount / self.order_average_weight
......@@ -347,14 +305,6 @@ class OfferItem(TranslatableModel):
else:
return EMPTY_STRING
# @property
# def reference_price_with_compensation(self):
# return self.get_reference_price(with_compensation=True)
# @property
# def reference_price_with_vat(self):
# return self.get_reference_price()
@property
def email_offer_price_with_vat(self):
offer_price = self.get_reference_price()
......
......@@ -27,10 +27,8 @@ class PermanenceBoard(models.Model):
class Meta:
verbose_name = _("permanence board")
verbose_name_plural = _("permanences board")
# ordering = ("permanence", "permanence_role", "customer",)
unique_together = ("permanence", "permanence_role", "customer",)
index_together = [
# ["permanence", "permanence_role", "customer"],
["permanence_date", "permanence", "permanence_role"],
]
......
......@@ -44,7 +44,6 @@ class Producer(models.Model):
phone1 = models.CharField(
_("phone1"),
max_length=25,
# validators=[MinLengthValidator(2)],
null=True, blank=True, default=EMPTY_STRING)
phone2 = models.CharField(
_("phone2"), max_length=25, null=True, blank=True, default=EMPTY_STRING)
......@@ -114,13 +113,6 @@ class Producer(models.Model):
get_products.short_description = (_("link to his products"))
get_products.allow_tags = True
# def get_initial_balance(self):
# # workaround for a display problem with Money field in the admin
# return self.initial_balance
#
# get_initial_balance.short_description = (_("initial balance"))
# get_initial_balance.allow_tags = False
def get_admin_date_balance(self):
if self.id is not None:
bank_account = bankaccount.BankAccount.objects.filter(
......
......@@ -243,11 +243,7 @@ class Product(TranslatableModel):
class Meta:
verbose_name = _("product")
verbose_name_plural = _("products")
# ordering = ("producer", "long_name",)
unique_together = ("producer", "reference",)
# index_together = [
# ["producer", "reference"],
# ]
@receiver(pre_save, sender=Product)
......
......@@ -59,27 +59,12 @@ class Staff(TranslatableModel):
class Meta:
verbose_name = _("staff member")
verbose_name_plural = _("staff members")
# ordering = ("long_name",)
@receiver(pre_save, sender=Staff)
def staff_pre_save(sender, **kwargs):
staff = kwargs["instance"]
staff.login_attempt_counter = DECIMAL_ZERO
# if staff.is_contributor:
# staff.is_reply_to_order_email = False
# staff.is_reply_to_invoice_email = False
# staff.is_webmaster = False
# # Do not kill yourself
# if not staff.user.groups.filter(name=COORDINATION_GROUP).exists():
# staff.is_coordinator = False
# if staff.is_webmaster:
# staff.is_reply_to_order_email = False
# staff.is_reply_to_invoice_email = False
# staff.is_contributor = False
# # Do not kill yourself
# if not staff.user.groups.filter(name=COORDINATION_GROUP).exists():
# staff.is_coordinator = False
@receiver(post_save, sender=Staff)
......
......@@ -48,7 +48,6 @@ def ajax_picture(request, upload_to=None, form_class=FileForm, size=SIZE_XS):
file_name, extension = os.path.splitext(file_.name)
safe_name = '{0}{1}'.format(slugify(file_name), extension)
# name = os.path.join(upload_to or "tmp", str(request.user.id), safe_name)
name = os.path.join(upload_to or "tmp", safe_name)
if default_storage.exists(name):
......
......@@ -2,7 +2,6 @@
<link href="{% static "easy_select2/vendor/select2/css/select2.min.css" %}" type="text/css" media="screen" rel="stylesheet" />
<link href="{% static "easy_select2/css/easy_select2.css" %}" type="text/css" media="screen" rel="stylesheet" />
<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
{#<script type="text/javascript" src="/static_001/easy_select2/vendor/jquery/jquery.min.js"></script>#}
<script type="text/javascript" src="{% static "easy_select2/js/init.js" %}"></script>
<script type="text/javascript" src="{% static "easy_select2/js/easy_select2.js" %}"></script>
<script type="text/javascript" src="{% static "easy_select2/js/lookup_override.1.8.js" %}"></script>
......
......@@ -2,7 +2,6 @@
<link href="{% static "easy_select2/vendor/select2/css/select2.min.css" %}" type="text/css" media="screen" rel="stylesheet" />
<link href="{% static "easy_select2/css/easy_select2.css" %}" type="text/css" media="screen" rel="stylesheet" />
<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
{#<script type="text/javascript" src="/static_001/easy_select2/vendor/jquery/jquery.min.js"></script>#}
<script type="text/javascript" src="{% static "easy_select2/js/init.js" %}"></script>
<script type="text/javascript" src="{% static "easy_select2/js/easy_select2.js" %}"></script>
<script type="text/javascript" src="{% static "easy_select2/js/lookup_override.1.8.js" %}"></script>
......
......@@ -24,12 +24,6 @@
{# just a plain link to some external image #}
<img class="img-responsive img-rounded" {% if instance.alignment %}style = "float: {{ instance.alignment }}; margin: 10px;"{% endif %} alt="{% if instance.alt %}{{ instance.alt }}{% endif %}" src="{{ instance.image_url }}"{% if size.0 %} width="{{ size.0 }}"{% endif %}{% if size.1 %} height="{{ size.1 }}"{% endif %}{% if instance.caption %} title="{{ instance.caption }}"{% endif %} />
{% endif %}
<!--{% if instance.caption or instance.description %}-->
<!--<span class="filer_image_info">-->
<!--{% if instance.caption %}<span class="title">{{ instance.caption }}</span>{% endif %}-->
<!--{% if instance.description %}<span class="desc">{{ instance.description }}</span>{% endif %}-->
<!--</span>-->
<!--{% endif %}-->
{% if link %}</a>{% endif %}
{% endspaceless %}
{% load menu_tags %}
{% for child in children %}
{% if child.level >= 1 and child.level < 4 %}
{# {% if child.selected or child.ancestor %}#}
<li class="{% if child.ancestor %}ancestor{% endif %}{% if child.sibling %}sibling{% endif %}{% if child.descendant %}descendant{% endif %}">
<a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}" {% if child.selected %} class="bs-docs-sidebar-active"{% endif %}>{{ child.get_menu_title }}</a>
</li>
{% if child.children %}
<ul class="nav nav-stacked">{% show_menu from_level to_level extra_inactive extra_active template "" "" child %}</ul>
{% endif %}
{# {% endif %}#}
{# {% elif child.level == 2 or child.level == 3 %}#}
{# <li class="{% if child.ancestor %}ancestor{% endif %}{% if child.sibling %}sibling{% endif %}{% if child.descendant %}descendant{% endif %}">#}
{# <a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}" {% if child.selected %} class="bs-docs-sidebar-active"{% endif %}>{{ child.get_menu_title }}</a>#}
{# </li>#}
{# {% if child.children %}#}
{# <ul class="nav nav-stacked">{% show_menu from_level to_level extra_inactive extra_active template "" "" child %}</ul>#}
{# {% endif %}#}
{% elif child.level == 4 %}
<li class="{% if child.ancestor %}ancestor{% endif %}{% if child.sibling %}sibling{% endif %}{% if child.descendant %}descendant{% endif %}">
<a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}" {% if child.selected %} class="bs-docs-sidebar-active"{% endif %}>{{ child.get_menu_title }}</a>
......
{% extends "admin/base_site.html" %}
{% load cms_tags menu_tags compress i18n l10n crispy_forms_tags %}
{% block content %}
{# {% addtoblock "jshead" %}<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>{% endaddtoblock %}#}
{# <script type="text/javascript">if (typeof CMS === 'undefined') {#}
{# CMS.$ = $#}
{# }</script>#}
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/custom.css">
<h4>{{ sub_title }}</h4>
......@@ -13,7 +9,6 @@
<h6>{{ permanence }}</h6>
<div class="submit-row">
{# {% if email_will_be_sent %}<button type="submit" name="test" value="test">{% trans "Test email" %}</button>{% endif %}#}
<button type="submit" name="cancel" value="cancel"><h6>{% trans "No, cancel the action" %}</h6></button>
<button type="submit" name="apply" value="apply" class="default"><h6>{% trans "Yes, I'm sure" %}</h6></button>
</div>
......
{% extends "admin/base_site.html" %}
{% load cms_tags menu_tags compress i18n l10n crispy_forms_tags %}
{% block content %}
{# {% addtoblock "jshead" %}<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>{% endaddtoblock %}#}
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/custom.css">
<h4>{{ sub_title }}</h4>
......
......@@ -22,16 +22,6 @@
.form-group input[type="checkbox"]:checked + .btn-group > label span:last-child {
display: none;
}
/* Credit to bootsnipp.com for the css for the color graph */
{#.colorgraph {#}
{# height: 5px;#}
{# border-top: 0;#}
{# background: #c4e17f;#}
{# border-radius: 5px;#}
{# background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);#}
{# background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);#}
{# background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);#}
{# background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);#}
.colorgraph {
height: 5px;
border-top: 0;
......
......@@ -42,14 +42,6 @@
<button type="submit" name="apply" value="apply" class="default"><h6>{% trans "Yes, I'm sure" %}</h6></button>
</div>
{% if permanence.with_delivery_point %}
{# <fieldset class="module aligned ">#}
{# <div class="form-row">#}
{# {% for delivery in deliveries %}#}
{# <h6><input type="checkbox" name="deliveries" value="{{ delivery.id|unlocalize }}"{% if forloop.first %} checked{% endif %}/>&nbsp;&nbsp;{{ delivery }}</h6>#}
{# {% endfor %}#}
{# </div>#}
{# </fieldset>#}
<fieldset class="module aligned ">
<div class="form-row">
<div class="[ form-group ]">
......
{% extends "admin/base_site.html" %}
{% load cms_tags menu_tags compress i18n l10n crispy_forms_tags %}
{% block content %}
{# {% addtoblock "jshead" %}<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>{% endaddtoblock %}#}
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/custom.css">
<h4>{{ sub_title }}</h4>
......
{% extends "admin/base_site.html" %}
{% load cms_tags menu_tags compress i18n l10n crispy_forms_tags %}
{% block content %}
{# {% addtoblock "jshead" %}<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>{% endaddtoblock %}#}
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/custom.css">
<style type="text/css">
......@@ -44,21 +43,6 @@
<button type="submit" name="apply" value="apply" class="default"><h6>{% trans "Yes, I'm sure and I have already encoded the customer's provisions into the bank account" %}</h6></button>
{{ producer_invoiced_formset.management_form }}
</div>
{# <fieldset class="module aligned ">#}
{# {{ producer_invoiced_formset.management_form }}#}
{# <div class="form-row">#}
{# {% for f_form in producer_invoiced_formset %}#}
{# <div class="input-group">#}
{# <h6><input id="id_form-{{ forloop.counter0 }}-selected" name="form-{{ forloop.counter0 }}-selected" type="checkbox" checked/>#}
{# &nbsp;&nbsp;{{ f_form.short_profile_name.value }} {% trans ", balance claimed by the supplier : " %}#}
{# {{ f_form.to_be_invoiced_balance }}#}
{# {% if f_form.producer_price_are_wo_vat %}{% trans "wo tax" %}{% else %}{% trans "w tax" %}{% endif %}#}
{# {% trans ", invoice reference : " %} {{ f_form.invoice_reference }}</h6>#}
{# <input type="hidden" id="id_form-{{ forloop.counter0 }}-short_profile_name" name="form-{{ forloop.counter0 }}-short_profile_name" value="{{ f_form.short_profile_name.value }}"/>#}
{# </div>#}
{# {% endfor %}#}
{# </div>#}
{# </fieldset>#}
<fieldset class="module aligned ">
<div class="form-row">
<div class="[ form-group ]">
......@@ -71,12 +55,9 @@
{% endfor %}