Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
ac31c182
Commit
ac31c182
authored
Dec 20, 2016
by
Skia
🤘
Browse files
Merge branch 'companiesManagement' into 'master'
Management for companies added See merge request
!35
parents
397778af
c372b221
Pipeline
#554
passed with stage
in 2 minutes and 30 seconds
Changes
6
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
accounting/templates/accounting/co_list.jinja
0 → 100644
View file @
ac31c182
{%
extends
"core/base.jinja"
%}
{%
block
title
%}
{%
trans
%}
Company list
{%
endtrans
%}
{%
endblock
%}
{%
block
content
%}
<p><a
href=
"
{{
url
(
'accounting:co_new'
)
}}
"
>
{%
trans
%}
Create new company
{%
endtrans
%}
</a></p>
</br>
<table>
<thead>
<tr>
<td>
{%
trans
%}
Companies
{%
endtrans
%}
</td>
</tr>
</thead>
<tbody>
{%
for
o
in
object_list
%}
<tr>
<td><a
href=
"
{{
url
(
'accounting:co_edit'
,
co_id
=
o.id
)
}}
"
>
{{
o.get_display_name
()
}}
</a></td>
</tr>
{%
endfor
%}
</tbody>
</table>
{%
endblock
%}
accounting/templates/accounting/journal_details.jinja
View file @
ac31c182
...
...
@@ -15,6 +15,7 @@
<h2>
{%
trans
%}
General journal:
{%
endtrans
%}
{{
object.name
}}
</h2>
<p><a
href=
"
{{
url
(
'accounting:label_new'
)
}}
?parent=
{{
object.club_account.id
}}
"
>
{%
trans
%}
New label
{%
endtrans
%}
</a></p>
<p><a
href=
"
{{
url
(
'accounting:label_list'
,
clubaccount_id
=
object.club_account.id
)
}}
"
>
{%
trans
%}
Label list
{%
endtrans
%}
</a></p>
<p><a
href=
"
{{
url
(
'accounting:co_list'
)
}}
"
>
{%
trans
%}
Company list
{%
endtrans
%}
</a></p>
<p><strong>
{%
trans
%}
Amount:
{%
endtrans
%}
</strong>
{{
object.amount
}}
€ -
<strong>
{%
trans
%}
Effective amount:
{%
endtrans
%}
</strong>
{{
object.effective_amount
}}
€
</p>
{%
if
object.closed
%}
...
...
accounting/urls.py
View file @
ac31c182
...
...
@@ -31,6 +31,7 @@ urlpatterns = [
url
(
r
'^operation/(?P<op_id>[0-9]+)$'
,
OperationEditView
.
as_view
(),
name
=
'op_edit'
),
url
(
r
'^operation/(?P<op_id>[0-9]+)/pdf$'
,
OperationPDFView
.
as_view
(),
name
=
'op_pdf'
),
# Companies
url
(
r
'^company/list$'
,
CompanyListView
.
as_view
(),
name
=
'co_list'
),
url
(
r
'^company/create$'
,
CompanyCreateView
.
as_view
(),
name
=
'co_new'
),
url
(
r
'^company/(?P<co_id>[0-9]+)$'
,
CompanyEditView
.
as_view
(),
name
=
'co_edit'
),
# Labels
...
...
accounting/views.py
View file @
ac31c182
...
...
@@ -446,6 +446,10 @@ class OperationPDFView(CanViewMixin, DetailView):
# Company views
class
CompanyListView
(
CanViewMixin
,
ListView
):
model
=
Company
template_name
=
'accounting/co_list.jinja'
class
CompanyCreateView
(
CanCreateMixin
,
CreateView
):
"""
Create a company
...
...
@@ -453,6 +457,8 @@ class CompanyCreateView(CanCreateMixin, CreateView):
model
=
Company
fields
=
[
'name'
]
template_name
=
'core/create.jinja'
success_url
=
reverse_lazy
(
'accounting:co_list'
)
class
CompanyEditView
(
CanCreateMixin
,
UpdateView
):
"""
...
...
@@ -462,6 +468,7 @@ class CompanyEditView(CanCreateMixin, UpdateView):
pk_url_kwarg
=
"co_id"
fields
=
[
'name'
]
template_name
=
'core/edit.jinja'
success_url
=
reverse_lazy
(
'accounting:co_list'
)
# Label views
...
...
core/templates/core/user_tools.jinja
View file @
ac31c182
...
...
@@ -47,6 +47,7 @@
{%
if
user.is_in_group
(
settings.SITH_GROUP_ACCOUNTING_ADMIN_ID
)
or
user.is_root
%}
<li><a
href=
"
{{
url
(
'accounting:refound_account'
)
}}
"
>
{%
trans
%}
Refound Account
{%
endtrans
%}
</a></li>
<li><a
href=
"
{{
url
(
'accounting:bank_list'
)
}}
"
>
{%
trans
%}
General accounting
{%
endtrans
%}
</a></li>
<li><a
href=
"
{{
url
(
'accounting:co_list'
)
}}
"
>
{%
trans
%}
Company list
{%
endtrans
%}
</a></li>
{%
endif
%}
{%
for
m
in
user.memberships.
filter
(
end_date
=
None
)
.
filter
(
role__gte
=
7
)
.
all
()
-
%}
{%
-
for
b
in
m.club.bank_accounts.all
()
%}
...
...
locale/fr/LC_MESSAGES/django.po
View file @
ac31c182
This diff is collapsed.
Click to expand it.
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