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
13f5bb1c
Commit
13f5bb1c
authored
Jul 30, 2019
by
Matthieu Fesselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: add permissions
parent
23f168ba
Pipeline
#4722
passed with stage
in 27 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
djangoldp_invoice/models.py
djangoldp_invoice/models.py
+14
-0
No files found.
djangoldp_invoice/models.py
View file @
13f5bb1c
...
...
@@ -40,6 +40,9 @@ class FreelanceInvoice(Model):
(
'control_freelance_invoice'
,
'Control'
),
)
rdf_type
=
'hd:freelanceinvoice'
anonymous_perms
=
[
'view'
]
authenticated_perms
=
[
'inherit'
,
'add'
]
owner_perms
=
[
'inherit'
,
'change'
,
'control'
,
'delete'
]
def
__str__
(
self
):
return
'{} ({} / {})'
.
format
(
self
.
freelanceFullname
,
self
.
identifier
,
self
.
title
)
...
...
@@ -85,6 +88,9 @@ class CustomerInvoice(Model):
(
'control_invoice'
,
'Control'
),
)
rdf_type
=
'hd:customerinvoice'
anonymous_perms
=
[
'view'
]
authenticated_perms
=
[
'inherit'
,
'add'
]
owner_perms
=
[
'inherit'
,
'change'
,
'control'
,
'delete'
]
def
__str__
(
self
):
return
'{} - {} ({})'
.
format
(
self
.
identifier
,
self
.
title
,
self
.
htAmount
())
...
...
@@ -104,6 +110,9 @@ class Batch(Model):
(
'view_batch'
,
'Read'
),
(
'control_batch'
,
'Control'
),
)
anonymous_perms
=
[
'view'
]
authenticated_perms
=
[
'inherit'
,
'add'
]
owner_perms
=
[
'inherit'
,
'change'
,
'control'
,
'delete'
]
def
__str__
(
self
):
return
'{} - {} ({} € HT)'
.
format
(
self
.
invoice
.
title
,
self
.
title
,
self
.
htAmount
())
...
...
@@ -122,5 +131,10 @@ class Task(Model):
creationDate
=
models
.
DateField
(
auto_now_add
=
True
)
modificationDate
=
models
.
DateField
(
auto_now
=
True
)
class
Meta
:
anonymous_perms
=
[
'view'
]
authenticated_perms
=
[
'inherit'
,
'add'
]
owner_perms
=
[
'inherit'
,
'change'
,
'control'
,
'delete'
]
def
__str__
(
self
):
return
'{} - {} ({} € HT)'
.
format
(
self
.
batch
.
title
,
self
.
title
,
self
.
htAmount
)
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