Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Public contract registry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Public contract registry
Commits
cd6b51c5
Commit
cd6b51c5
authored
2 years ago
by
Tomáš Valenta
Browse files
Options
Downloads
Patches
Plain Diff
multiple representatives for each signer, migrations
parent
73cf3c6f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
contracts/migrations/0003_contractexternalsignerrepresentative_contractintent_and_more.py
+189
-0
189 additions, 0 deletions
...ctexternalsignerrepresentative_contractintent_and_more.py
contracts/models.py
+44
-28
44 additions, 28 deletions
contracts/models.py
with
234 additions
and
28 deletions
.gitignore
+
1
−
0
View file @
cd6b51c5
...
@@ -4,3 +4,4 @@ staticfiles
...
@@ -4,3 +4,4 @@ staticfiles
node_modules/*
node_modules/*
shared/static/*
shared/static/*
webpack-stats.json
webpack-stats.json
.venv
This diff is collapsed.
Click to expand it.
contracts/migrations/0003_contractexternalsignerrepresentative_contractintent_and_more.py
0 → 100644
+
189
−
0
View file @
cd6b51c5
# Generated by Django 4.1.4 on 2023-02-11 09:11
import
django.db.models.deletion
import
markdownx.models
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
"
contracts
"
,
"
0002_initial
"
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
"
ContractExternalSignerRepresentative
"
,
fields
=
[
(
"
id
"
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
"
ID
"
,
),
),
(
"
name
"
,
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Jméno
"
)),
(
"
role
"
,
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Funkce
"
)),
],
options
=
{
"
verbose_name
"
:
"
Zástupce druhé smluvní strany
"
,
"
verbose_name_plural
"
:
"
Zástupci druhé smluvní strany
"
,
},
),
migrations
.
CreateModel
(
name
=
"
ContractIntent
"
,
fields
=
[
(
"
id
"
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
"
ID
"
,
),
),
(
"
url
"
,
models
.
URLField
(
blank
=
True
,
max_length
=
256
,
null
=
True
,
verbose_name
=
"
Odkaz
"
),
),
],
options
=
{
"
verbose_name
"
:
"
Záměr
"
,
"
verbose_name_plural
"
:
"
Záměry
"
,
},
),
migrations
.
CreateModel
(
name
=
"
ContractLocalSignerRepresentative
"
,
fields
=
[
(
"
id
"
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
"
ID
"
,
),
),
(
"
name
"
,
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Jméno
"
)),
(
"
role
"
,
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Funkce
"
)),
],
options
=
{
"
verbose_name
"
:
"
Zástupce naší smluvní strany
"
,
"
verbose_name_plural
"
:
"
Zástupci naší smluvní strany
"
,
},
),
migrations
.
RemoveField
(
model_name
=
"
contract
"
,
name
=
"
intent_url
"
,
),
migrations
.
RemoveField
(
model_name
=
"
contractexternalsigner
"
,
name
=
"
representative_name
"
,
),
migrations
.
RemoveField
(
model_name
=
"
contractexternalsigner
"
,
name
=
"
representative_role
"
,
),
migrations
.
RemoveField
(
model_name
=
"
contractlocalsigner
"
,
name
=
"
representative_name
"
,
),
migrations
.
RemoveField
(
model_name
=
"
contractlocalsigner
"
,
name
=
"
representative_role
"
,
),
migrations
.
AddField
(
model_name
=
"
contract
"
,
name
=
"
notes
"
,
field
=
markdownx
.
models
.
MarkdownxField
(
blank
=
True
,
help_text
=
"
Poznámky jsou viditelné pro všechny, kteří mohou smlouvu spravovat.
"
,
null
=
True
,
verbose_name
=
"
Obsah
"
,
),
),
migrations
.
AlterField
(
model_name
=
"
contract
"
,
name
=
"
filing_area
"
,
field
=
models
.
ForeignKey
(
blank
=
True
,
help_text
=
"
Obsah není veřejně přístupný.
"
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"
filed_contracts
"
,
to
=
"
contracts.contractfilingarea
"
,
),
),
migrations
.
AlterField
(
model_name
=
"
contract
"
,
name
=
"
primary_contract
"
,
field
=
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"
subcontracts
"
,
to
=
"
contracts.contract
"
,
verbose_name
=
"
Hlavní smlouva
"
,
),
),
migrations
.
RemoveField
(
model_name
=
"
contract
"
,
name
=
"
subtype
"
,
),
migrations
.
AlterField
(
model_name
=
"
contractexternalsignature
"
,
name
=
"
signer
"
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"
signatures
"
,
to
=
"
contracts.contractexternalsigner
"
,
),
),
migrations
.
AlterField
(
model_name
=
"
contractlocalsignature
"
,
name
=
"
signer
"
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"
signatures
"
,
to
=
"
contracts.contractlocalsigner
"
,
),
),
migrations
.
DeleteModel
(
name
=
"
ContractNote
"
,
),
migrations
.
AddField
(
model_name
=
"
contractlocalsignerrepresentative
"
,
name
=
"
signer
"
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"
representatives
"
,
to
=
"
contracts.contractlocalsigner
"
,
),
),
migrations
.
AddField
(
model_name
=
"
contractintent
"
,
name
=
"
contract
"
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"
intents
"
,
to
=
"
contracts.contract
"
,
),
),
migrations
.
AddField
(
model_name
=
"
contractexternalsignerrepresentative
"
,
name
=
"
signer
"
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"
representatives
"
,
to
=
"
contracts.contractexternalsigner
"
,
),
),
migrations
.
AddField
(
model_name
=
"
contract
"
,
name
=
"
subtype
"
,
field
=
models
.
ManyToManyField
(
to
=
"
contracts.contractsubtype
"
),
),
]
This diff is collapsed.
Click to expand it.
contracts/models.py
+
44
−
28
View file @
cd6b51c5
...
@@ -51,20 +51,6 @@ class ContractExternalSigner(models.Model):
...
@@ -51,20 +51,6 @@ class ContractExternalSigner(models.Model):
verbose_name
=
"
Datum narození
"
,
verbose_name
=
"
Datum narození
"
,
)
# WARNING: Legal entity status dependent!
)
# WARNING: Legal entity status dependent!
representative_name
=
models
.
CharField
(
max_length
=
256
,
blank
=
True
,
null
=
True
,
verbose_name
=
"
Zástupce
"
,
)
representative_role
=
models
.
CharField
(
max_length
=
256
,
blank
=
True
,
null
=
True
,
verbose_name
=
"
Funkce zástupce
"
,
)
department
=
models
.
CharField
(
department
=
models
.
CharField
(
max_length
=
128
,
max_length
=
128
,
blank
=
True
,
blank
=
True
,
...
@@ -77,6 +63,28 @@ class ContractExternalSigner(models.Model):
...
@@ -77,6 +63,28 @@ class ContractExternalSigner(models.Model):
verbose_name_plural
=
"
Druhé smluvní strany
"
verbose_name_plural
=
"
Druhé smluvní strany
"
class
ContractExternalSignerRepresentative
(
models
.
Model
):
signer
=
models
.
ForeignKey
(
ContractExternalSigner
,
on_delete
=
models
.
CASCADE
,
related_name
=
"
representatives
"
,
)
name
=
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Jméno
"
,
)
role
=
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Funkce
"
,
)
class
Meta
:
verbose_name
=
"
Zástupce druhé smluvní strany
"
verbose_name_plural
=
"
Zástupci druhé smluvní strany
"
class
ContractExternalSignature
(
models
.
Model
):
class
ContractExternalSignature
(
models
.
Model
):
signer
=
models
.
ForeignKey
(
signer
=
models
.
ForeignKey
(
ContractExternalSigner
,
ContractExternalSigner
,
...
@@ -127,20 +135,6 @@ class ContractLocalSigner(models.Model):
...
@@ -127,20 +135,6 @@ class ContractLocalSigner(models.Model):
verbose_name
=
"
IČO
"
,
verbose_name
=
"
IČO
"
,
)
)
representative_name
=
models
.
CharField
(
max_length
=
256
,
blank
=
True
,
null
=
True
,
verbose_name
=
"
Zástupce
"
,
)
representative_role
=
models
.
CharField
(
max_length
=
256
,
blank
=
True
,
null
=
True
,
verbose_name
=
"
Funkce zástupce
"
,
)
department
=
models
.
CharField
(
department
=
models
.
CharField
(
max_length
=
128
,
max_length
=
128
,
blank
=
True
,
blank
=
True
,
...
@@ -159,6 +153,28 @@ class ContractLocalSigner(models.Model):
...
@@ -159,6 +153,28 @@ class ContractLocalSigner(models.Model):
verbose_name_plural
=
"
Naše smlouvní strany
"
verbose_name_plural
=
"
Naše smlouvní strany
"
class
ContractLocalSignerRepresentative
(
models
.
Model
):
signer
=
models
.
ForeignKey
(
ContractLocalSigner
,
on_delete
=
models
.
CASCADE
,
related_name
=
"
representatives
"
,
)
name
=
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Jméno
"
,
)
role
=
models
.
CharField
(
max_length
=
256
,
verbose_name
=
"
Funkce
"
,
)
class
Meta
:
verbose_name
=
"
Zástupce naší smluvní strany
"
verbose_name_plural
=
"
Zástupci naší smluvní strany
"
class
ContractLocalSignature
(
models
.
Model
):
class
ContractLocalSignature
(
models
.
Model
):
signer
=
models
.
ForeignKey
(
signer
=
models
.
ForeignKey
(
ContractLocalSigner
,
ContractLocalSigner
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment