Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Djangoldp Invoice
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Startin blox
djangoldp-packages
Djangoldp Invoice
Commits
c1d6c5be
Commit
c1d6c5be
authored
Mar 14, 2019
by
Jean-Baptiste
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: remove unecessary urls.py
parent
25140792
Pipeline
#2676
passed with stage
in 27 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
21 deletions
+6
-21
djangoldp_invoice/models.py
djangoldp_invoice/models.py
+6
-0
djangoldp_invoice/urls.py
djangoldp_invoice/urls.py
+0
-21
No files found.
djangoldp_invoice/models.py
View file @
c1d6c5be
...
...
@@ -34,6 +34,7 @@ class FreelanceInvoice(Model):
invoicingDate
=
models
.
DateField
(
default
=
datetime
.
date
.
today
)
class
Meta
:
container_path
=
"freelance-invoices/"
permissions
=
(
(
'view_freelance_invoice'
,
'Read'
),
(
'control_freelance_invoice'
,
'Control'
),
...
...
@@ -71,6 +72,10 @@ class CustomerInvoice(Model):
class
Meta
:
depth
=
2
container_path
=
"customer-invoices/"
nested_fields
=
[
"batches"
,
"project"
,
"customer"
],
serializer_fields
=
[
"@id"
,
"identifier"
,
"title"
,
"state"
,
"htAmount"
,
"tvaRate"
,
"invoicingDate"
,
"tvaAmount"
,
"ttcAmount"
,
"batches"
,
"project"
,
"customer"
]
permissions
=
(
(
'view_invoice'
,
'Read'
),
(
'control_invoice'
,
'Control'
),
...
...
@@ -88,6 +93,7 @@ class Batch(Model):
modificationDate
=
models
.
DateField
(
auto_now
=
True
)
class
Meta
:
nested_fields
=
[
"tasks"
],
serializer_fields
=
[
'@id'
,
'invoice'
,
'title'
,
'htAmount'
,
'tasks'
]
permissions
=
(
(
'view_batch'
,
'Read'
),
...
...
djangoldp_invoice/urls.py
deleted
100644 → 0
View file @
25140792
from
django.conf.urls
import
url
,
include
from
django.conf
import
settings
from
djangoldp.views
import
LDPViewSet
from
.models
import
CustomerInvoice
from
.models
import
FreelanceInvoice
from
.models
import
Batch
from
.models
import
Task
urlpatterns
=
[
url
(
r'^freelance-invoices/'
,
LDPViewSet
.
urls
(
model
=
FreelanceInvoice
)),
url
(
r'^customer-invoices/'
,
LDPViewSet
.
urls
(
model
=
CustomerInvoice
,
nested_fields
=
[
"batches"
,
"project"
,
"customer"
],
fields
=
[
"@id"
,
"identifier"
,
"title"
,
"state"
,
"htAmount"
,
"tvaRate"
,
"invoicingDate"
,
"tvaAmount"
,
"ttcAmount"
,
"batches"
,
"project"
,
"customer"
]
)),
url
(
r'^batches/'
,
LDPViewSet
.
urls
(
model
=
Batch
,
nested_fields
=
[
"tasks"
],
fields
=
[
"@id"
,
"title"
,
"htAmount"
,
"tasks"
]
)),
url
(
r'^tasks/'
,
LDPViewSet
.
urls
(
model
=
Task
)),
]
\ No newline at end of file
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