Commit ec9ea709 authored by Patrick's avatar Patrick
Browse files

A purchase/order may exists without delivery point

parent 4e7b25e7
......@@ -175,9 +175,9 @@ class Purchase(models.Model):
get_permanence_display.allow_tags = False
def get_delivery_display(self):
if self.customer_invoice is not None:
if self.customer_invoice is not None and is not None:
return None
get_delivery_display.short_description = (_("delivery point"))
get_delivery_display.allow_tags = False
......@@ -1221,7 +1221,7 @@ def my_order_confirmation(permanence, customer_invoice, is_basket=False,
if is_basket:
if customer_invoice.status == PERMANENCE_OPENED:
if is None:
if permanence.with_delivery_point and is None:
btn_disabled = "disabled"
msg_confirmation1 = '<font color="red">%s</font><br/>' % _("An unconfirmed order will be canceled.")
msg_confirmation2 = '<span class="glyphicon glyphicon-floppy-disk"></span>&nbsp;&nbsp;%s' % _("Confirm this order and receive an email containing its summary.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment