Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chris
repanier
Commits
9b4185bf
Commit
9b4185bf
authored
Mar 21, 2017
by
Patrick
Browse files
Send to low order to the staff
parent
8e2b25a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
repanier/email/email_order.py
View file @
9b4185bf
...
...
@@ -158,10 +158,10 @@ def email_order(permanence_id, all_producers=True, closed_deliveries_id=None, pr
).
only
(
"total_price_with_tax"
).
order_by
(
'?'
).
first
()
if
producer_invoice
is
not
None
\
and
producer_invoice
.
total_price_with_tax
<
producer
.
minimum_order_value
:
to
=
cc_email_staff
to
_email_producer
=
cc_email_staff
html_content
=
\
order_producer_mail_subject
+
'<br/><br/>'
+
html_content
cc
=
[]
cc
_email_staff
=
[]
order_producer_mail_subject
=
_
(
'/!\ Mail not send to our producer %s because the minimum order value has not been reached.'
)
%
long_profile_name
else
:
...
...
@@ -172,13 +172,12 @@ def email_order(permanence_id, all_producers=True, closed_deliveries_id=None, pr
to_email_producer
.
append
(
producer
.
email2
)
if
producer
.
email3
:
to_email_producer
.
append
(
producer
.
email3
)
cc
=
cc_email_staff
email
=
EmailMultiAlternatives
(
order_producer_mail_subject
,
strip_tags
(
html_content
),
from_email
=
sender_email
,
to
=
to_email_producer
,
cc
=
cc
cc
=
cc
_email_staff
)
if
REPANIER_SETTINGS_SEND_ORDER_MAIL_TO_PRODUCER
and
wb
is
not
None
:
if
REPANIER_SETTINGS_SEND_ABSTRACT_ORDER_MAIL_TO_PRODUCER
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment