Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
985a2f4a
Commit
985a2f4a
authored
Jan 20, 2019
by
Hugo LEVY-FALK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Choix de l'envoi du reçu par mail
parent
f43b9859
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
1 deletion
+33
-1
cotisations/models.py
cotisations/models.py
+5
-1
preferences/migrations/0061_cotisationsoption_send_voucher_mail.py
...es/migrations/0061_cotisationsoption_send_voucher_mail.py
+20
-0
preferences/models.py
preferences/models.py
+4
-0
preferences/templates/preferences/display_preferences.html
preferences/templates/preferences/display_preferences.html
+4
-0
No files found.
cotisations/models.py
View file @
985a2f4a
...
...
@@ -46,6 +46,7 @@ from django.urls import reverse
from
django.shortcuts
import
redirect
from
django.contrib
import
messages
from
preferences.models
import
CotisationsOption
from
machines.models
import
regen
from
re2o.field_permissions
import
FieldPermissionModelMixin
from
re2o.mixins
import
AclMixin
,
RevMixin
...
...
@@ -255,7 +256,10 @@ class Facture(BaseInvoice):
super
(
Facture
,
self
).
save
(
*
args
,
**
kwargs
)
if
not
self
.
__original_valid
and
self
.
valid
:
send_mail_invoice
(
self
)
if
self
.
is_subscription
()
and
not
self
.
__original_control
and
self
.
control
:
if
self
.
is_subscription
()
\
and
not
self
.
__original_control
\
and
self
.
control
\
and
CotisationsOption
.
get_cached_value
(
'send_voucher_mail'
):
send_mail_voucher
(
self
)
def
__str__
(
self
):
...
...
preferences/migrations/0061_cotisationsoption_send_voucher_mail.py
0 → 100644
View file @
985a2f4a
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2019-01-20 18:03
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'preferences'
,
'0060_assooption_pres_name'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'cotisationsoption'
,
name
=
'send_voucher_mail'
,
field
=
models
.
BooleanField
(
default
=
False
,
verbose_name
=
'Send voucher by email when the invoice is controlled.'
),
),
]
preferences/models.py
View file @
985a2f4a
...
...
@@ -729,3 +729,7 @@ class CotisationsOption(AclMixin, PreferencesModel):
on_delete
=
models
.
PROTECT
,
default
=
default_voucher
,
)
send_voucher_mail
=
models
.
BooleanField
(
verbose_name
=
_
(
"Send voucher by email when the invoice is controlled."
),
default
=
False
,
)
preferences/templates/preferences/display_preferences.html
View file @
985a2f4a
...
...
@@ -361,6 +361,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i
class=
"fa fa-edit"
></i>
</a>
<table
class=
"table table-striped"
>
<tr>
<th>
{% trans "Send voucher by email" %}
</th>
<td>
{{ cotisationsoptions.send_voucher_mail | tick }}
</th>
</tr>
<tr>
<th>
{% trans "Invoices' template" %}
</th>
<td>
{{ cotisationsoptions.invoice_template }}
</td>
...
...
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