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
26ccca87
Commit
26ccca87
authored
Feb 08, 2019
by
Matthieu Fesselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: package component
#5
parent
7adefac3
Pipeline
#2126
passed with stage
in 27 seconds
Changes
17
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
79 additions
and
23 deletions
+79
-23
.gitlab-ci.yml
.gitlab-ci.yml
+30
-0
README.md
README.md
+2
-2
djangoldp_invoice/__init__.py
djangoldp_invoice/__init__.py
+2
-0
djangoldp_invoice/admin.py
djangoldp_invoice/admin.py
+2
-2
djangoldp_invoice/apps.py
djangoldp_invoice/apps.py
+1
-1
djangoldp_invoice/migrations/0001_initial.py
djangoldp_invoice/migrations/0001_initial.py
+3
-3
djangoldp_invoice/migrations/0002_auto_20181206_1856.py
djangoldp_invoice/migrations/0002_auto_20181206_1856.py
+3
-3
djangoldp_invoice/migrations/0003_auto_20190114_1630.py
djangoldp_invoice/migrations/0003_auto_20190114_1630.py
+2
-2
djangoldp_invoice/migrations/0004_auto_20190117_0215.py
djangoldp_invoice/migrations/0004_auto_20190117_0215.py
+3
-3
djangoldp_invoice/migrations/__init__.py
djangoldp_invoice/migrations/__init__.py
+0
-0
djangoldp_invoice/models.py
djangoldp_invoice/models.py
+2
-2
djangoldp_invoice/tests.py
djangoldp_invoice/tests.py
+0
-0
djangoldp_invoice/urls.py
djangoldp_invoice/urls.py
+2
-2
migrations/__init__.py
migrations/__init__.py
+0
-0
setup.cfg
setup.cfg
+22
-0
setup.py
setup.py
+5
-0
views.py
views.py
+0
-3
No files found.
.gitlab-ci.yml
0 → 100644
View file @
26ccca87
---
image
:
python:3.6
stages
:
-
test
-
release
test
:
stage
:
test
script
:
-
echo 'Make your tests here !'
except
:
-
master
tags
:
-
sib
publish
:
stage
:
release
before_script
:
-
git config user.name "${GITLAB_USER_NAME}"
-
git config user.email "${GITLAB_USER_EMAIL}"
-
git remote set-url origin "https://gitlab-ci-token:${GL_TOKEN}@git.happy-dev.fr/${CI_PROJECT_PATH}.git"
-
pip install git+https://github.com/plup/python-semantic-release
-
pip install sib-commit-parser
script
:
-
semantic-release publish
only
:
-
master
tags
:
-
sib
README.md
View file @
26ccca87
...
...
@@ -5,9 +5,9 @@ It aims at enabling people with little development skills to serve their own dat
# Models
## C
lient
Invoice
## C
ustomer
Invoice
An invoice generated by , for one of its c
lient
.
An invoice generated by , for one of its c
ustomer
.
## FreelanceInvoice
...
...
djangoldp_invoice/__init__.py
0 → 100644
View file @
26ccca87
__version__
=
'0.0.0'
name
=
"djangoldp_invoice"
admin.py
→
djangoldp_invoice/
admin.py
View file @
26ccca87
from
django.contrib
import
admin
from
guardian.admin
import
GuardedModelAdmin
from
.models
import
C
lient
Invoice
from
.models
import
C
ustomer
Invoice
from
.models
import
FreelanceInvoice
from
.models
import
Batch
from
.models
import
Task
admin
.
site
.
register
(
C
lient
Invoice
)
admin
.
site
.
register
(
C
ustomer
Invoice
)
admin
.
site
.
register
(
FreelanceInvoice
)
admin
.
site
.
register
(
Batch
)
admin
.
site
.
register
(
Task
)
apps.py
→
djangoldp_invoice/
apps.py
View file @
26ccca87
...
...
@@ -2,4 +2,4 @@ from django.apps import AppConfig
class
DjangoldpInvoicesConfig
(
AppConfig
):
name
=
'djangoldp_invoice
s
'
name
=
'djangoldp_invoice'
migrations/0001_initial.py
→
djangoldp_invoice/
migrations/0001_initial.py
View file @
26ccca87
...
...
@@ -29,7 +29,7 @@ class Migration(migrations.Migration):
},
),
migrations
.
CreateModel
(
name
=
'C
lient
Invoice'
,
name
=
'C
ustomer
Invoice'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'identifier'
,
models
.
CharField
(
max_length
=
255
)),
...
...
@@ -71,7 +71,7 @@ class Migration(migrations.Migration):
(
'htAmount'
,
models
.
DecimalField
(
decimal_places
=
2
,
max_digits
=
11
)),
(
'creationDate'
,
models
.
DateField
(
auto_now_add
=
True
)),
(
'modificationDate'
,
models
.
DateField
(
auto_now
=
True
)),
(
'batch'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'djangoldp_invoice
s
.Batch'
)),
(
'batch'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'djangoldp_invoice.Batch'
)),
],
options
=
{
'permissions'
:
((
'view_batch'
,
'Read'
),
(
'control_batch'
,
'Control'
)),
...
...
@@ -80,6 +80,6 @@ class Migration(migrations.Migration):
migrations
.
AddField
(
model_name
=
'batch'
,
name
=
'invoice'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'djangoldp_invoice
s.Client
Invoice'
),
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'djangoldp_invoice
.Customer
Invoice'
),
),
]
migrations/0002_auto_20181206_1856.py
→
djangoldp_invoice/
migrations/0002_auto_20181206_1856.py
View file @
26ccca87
...
...
@@ -9,18 +9,18 @@ import django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'djangoldp_invoice
s
'
,
'0001_initial'
),
(
'djangoldp_invoice'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'batch'
,
name
=
'invoice'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'batches'
,
to
=
'djangoldp_invoice
s.Client
Invoice'
),
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'batches'
,
to
=
'djangoldp_invoice
.Customer
Invoice'
),
),
migrations
.
AlterField
(
model_name
=
'task'
,
name
=
'batch'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'tasks'
,
to
=
'djangoldp_invoice
s
.Batch'
),
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'tasks'
,
to
=
'djangoldp_invoice.Batch'
),
),
]
migrations/0003_auto_20190114_1630.py
→
djangoldp_invoice/
migrations/0003_auto_20190114_1630.py
View file @
26ccca87
...
...
@@ -8,7 +8,7 @@ from django.db import migrations, models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'djangoldp_invoice
s
'
,
'0002_auto_20181206_1856'
),
(
'djangoldp_invoice'
,
'0002_auto_20181206_1856'
),
]
operations
=
[
...
...
@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
name
=
'htAmount'
,
),
migrations
.
RemoveField
(
model_name
=
'c
lient
invoice'
,
model_name
=
'c
ustomer
invoice'
,
name
=
'htAmount'
,
),
migrations
.
AlterField
(
...
...
migrations/0004_auto_20190117_0215.py
→
djangoldp_invoice/
migrations/0004_auto_20190117_0215.py
View file @
26ccca87
...
...
@@ -10,17 +10,17 @@ class Migration(migrations.Migration):
dependencies
=
[
(
'djangoldp_project'
,
'0002_move_jabber'
),
(
'djangoldp_invoice
s
'
,
'0003_auto_20190114_1630'
),
(
'djangoldp_invoice'
,
'0003_auto_20190114_1630'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'c
lient
invoice'
,
model_name
=
'c
ustomer
invoice'
,
name
=
'customer'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
DO_NOTHING
,
to
=
'djangoldp_project.Customer'
),
),
migrations
.
AddField
(
model_name
=
'c
lient
invoice'
,
model_name
=
'c
ustomer
invoice'
,
name
=
'project'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
DO_NOTHING
,
to
=
'djangoldp_project.Project'
),
),
...
...
__init__.py
→
djangoldp_invoice/migrations/
__init__.py
View file @
26ccca87
File moved
models.py
→
djangoldp_invoice/
models.py
View file @
26ccca87
...
...
@@ -41,7 +41,7 @@ class FreelanceInvoice(models.Model):
class
C
lient
Invoice
(
models
.
Model
):
class
C
ustomer
Invoice
(
models
.
Model
):
customer
=
models
.
ForeignKey
(
Customer
,
on_delete
=
models
.
DO_NOTHING
,
null
=
True
)
project
=
models
.
ForeignKey
(
Project
,
on_delete
=
models
.
DO_NOTHING
,
null
=
True
)
STATES
=
(
...
...
@@ -76,7 +76,7 @@ class ClientInvoice(models.Model):
# Lot =========================================================
class
Batch
(
models
.
Model
):
invoice
=
models
.
ForeignKey
(
C
lient
Invoice
,
on_delete
=
models
.
CASCADE
,
related_name
=
'batches'
)
invoice
=
models
.
ForeignKey
(
C
ustomer
Invoice
,
on_delete
=
models
.
CASCADE
,
related_name
=
'batches'
)
title
=
models
.
CharField
(
max_length
=
255
)
creationDate
=
models
.
DateField
(
auto_now_add
=
True
)
modificationDate
=
models
.
DateField
(
auto_now
=
True
)
...
...
tests.py
→
djangoldp_invoice/
tests.py
View file @
26ccca87
File moved
urls.py
→
djangoldp_invoice/
urls.py
View file @
26ccca87
from
django.conf.urls
import
url
,
include
from
django.conf
import
settings
from
djangoldp.views
import
LDPViewSet
from
.models
import
C
lient
Invoice
from
.models
import
C
ustomer
Invoice
from
.models
import
FreelanceInvoice
from
.models
import
Batch
from
.models
import
Task
urlpatterns
=
[
url
(
r'^freelance-invoices/'
,
LDPViewSet
.
urls
(
model
=
FreelanceInvoice
)),
url
(
r'^c
lient-invoices/'
,
LDPViewSet
.
urls
(
model
=
ClientInvoice
,
url
(
r'^c
ustomer-invoices/'
,
LDPViewSet
.
urls
(
model
=
CustomerInvoice
,
nested_fields
=
[
"batches"
,
"project"
,
"customer"
],
fields
=
[
"@id"
,
"identifier"
,
"title"
,
"state"
,
"htAmount"
,
"tvaRate"
,
"invoicingDate"
,
"tvaAmount"
,
"ttcAmount"
,
"batches"
,
"project"
,
"customer"
]
...
...
migrations/__init__.py
deleted
100644 → 0
View file @
7adefac3
setup.cfg
0 → 100644
View file @
26ccca87
[metadata]
name = djangoldp_invoice
version = attr: djangoldp_invoice.__version__
url = https://git.happy-dev.fr/startinblox/djangoldp-packages/djangoldp_invoices
author = Startin'blox
author_email = claire@happy-dev.fr
description = djangoldp package for invoicing data models
license = MIT
[options]
packages = find:
install_requires =
djangoldp~=0.5
[options.extras_require]
dev =
factory_boy>=2.11.0
[semantic_release]
version_source = tag
version_variable = djangoldp_invoice/__init__.py:__version__
commit_parser = commit_parser.parse
setup.py
0 → 100644
View file @
26ccca87
#!/usr/bin/env python
from
setuptools
import
setup
setup
()
views.py
deleted
100644 → 0
View file @
7adefac3
from
django.shortcuts
import
render
# Create your views here.
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