Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
adefpat_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
Adefpat
adefpat_project
Commits
aa923c56
Commit
aa923c56
authored
4 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[update] table rec_name
parent
65b0f53f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/project.py
+27
-21
27 additions, 21 deletions
models/project.py
static/src/js/project.js
+12
-17
12 additions, 17 deletions
static/src/js/project.js
with
39 additions
and
38 deletions
models/project.py
+
27
−
21
View file @
aa923c56
...
...
@@ -69,8 +69,9 @@ class Project(models.Model):
domain
=
[
(
'
active
'
,
'
=
'
,
True
),
(
'
is_company
'
,
'
=
'
,
True
),
'
|
'
,
(
'
type_structure_id
'
,
'
=
'
,
'
ComCom
'
),
(
'
type_structure_id
'
,
'
=
'
,
'
PETR/PNR
'
)],
'
|
'
,
(
'
type_structure_id.name
'
,
'
=
'
,
'
ComCom
'
),
(
'
type_structure_id.name
'
,
'
=
'
,
'
PETR/PNR
'
)],
on_delete
=
'
restrict
'
)
departement_ids
=
fields
.
Many2many
(
comodel_name
=
'
res.partner
'
,
...
...
@@ -155,8 +156,6 @@ class Project(models.Model):
string
=
"
Type de convention de financement
"
)
date_ca
=
fields
.
Date
(
"
Date de CA
"
)
date_demarrage
=
fields
.
Date
(
"
Date de démarrage prévisionnel
"
)
# list_photos_ids = fields.One2many('images')
# documents_ids = fields.One2many('ir.attachment', "Documents")
# Champs étape "Instruction" => Onglet Dossier
contexte
=
fields
.
Text
(
"
Contexte projet
"
)
...
...
@@ -291,7 +290,6 @@ class Project(models.Model):
'
res.partner.membres.project
'
,
'
project_id
'
,
string
=
"
Membres
"
)
# documents_gap_ids = fields.One2many('ir.attachment', string="Documents GAP")
modalite_gap
=
fields
.
Text
(
"
Modalités GAP
"
)
reunion_ids
=
fields
.
One2many
(
'
adefpat.reunion.gap
'
,
...
...
@@ -411,16 +409,23 @@ class AdefpatTypeConvention(models.Model):
_name
=
'
adefpat.type.convention
'
_description
=
'
Liste type de convention
'
name
=
fields
.
Char
(
"
Convention
"
)
name
=
fields
.
Char
(
string
=
"
Convention
"
,
required
=
True
,
)
date_end_validity
=
fields
.
Date
(
"
Date de fin de validité
"
)
class
AdefpatReunionGAP
(
models
.
Model
):
_name
=
'
adefpat.reunion.gap
'
_description
=
'
Réunions GAP
'
_rec_name
=
'
date
'
# document_ids = fields.One2many('ir.attachment', string="Documents")
date
=
fields
.
Date
(
"
Date du GAP
"
)
date
=
fields
.
Date
(
string
=
"
Date du GAP
"
,
required
=
True
,
)
project_id
=
fields
.
Many2one
(
'
project.project
'
,
string
=
'
Projet
'
,
...
...
@@ -437,6 +442,7 @@ class AdefpatMembresProjets(models.Model):
domain
=
[
(
'
active
'
,
'
=
'
,
True
),
(
'
is_company
'
,
'
=
'
,
False
)],
required
=
True
,
on_delete
=
'
restrict
'
)
lastname
=
fields
.
Char
(
related
=
'
partner_id.lastname
'
,
...
...
@@ -471,6 +477,7 @@ class AdefpatMembresProjets(models.Model):
class
AdefpatConsultantsProjets
(
models
.
Model
):
_name
=
'
res.partner.consultants.project
'
_description
=
'
Consultants
'
_rec_name
=
'
name
'
partner_id
=
fields
.
Many2one
(
'
res.partner
'
,
...
...
@@ -481,7 +488,9 @@ class AdefpatConsultantsProjets(models.Model):
(
'
is_consultant_form
'
,
'
=
'
,
True
),
'
|
'
,
(
'
reference
'
,
'
=
'
,
'
reference
'
),
(
'
reference
'
,
'
=
'
,
'
prereference
'
)],
required
=
True
,
on_delete
=
'
restrict
'
)
name
=
fields
.
Char
(
related
=
'
partner_id.name
'
)
lastname
=
fields
.
Char
(
related
=
'
partner_id.lastname
'
,
string
=
"
Nom
"
,
...
...
@@ -516,21 +525,16 @@ class AdefpatConsultantsProjets(models.Model):
class
AdefpatPorteursProjets
(
models
.
Model
):
_name
=
'
res.partner.porteur.project
'
_description
=
'
Porteurs de projets
'
_rec_name
=
'
name
'
porteur_id
=
fields
.
Many2one
(
'
res.partner
'
,
string
=
'
Porteur de projet
'
,
domain
=
[
(
'
active
'
,
'
=
'
,
True
),
(
'
is_company
'
,
'
=
'
,
False
)],
on_delete
=
'
restrict
'
)
partner_id
=
fields
.
Many2one
(
'
res.partner
'
,
string
=
'
Porteur de projet
'
,
domain
=
[
(
'
active
'
,
'
=
'
,
True
),
(
'
is_company
'
,
'
=
'
,
False
)],
on_delete
=
'
restrict
'
)
domain
=
[(
'
is_company
'
,
'
=
'
,
False
)],
required
=
True
,
on_delete
=
'
restrict
'
)
name
=
fields
.
Char
(
related
=
'
porteur_id.name
'
)
lastname
=
fields
.
Char
(
related
=
'
porteur_id.lastname
'
,
string
=
"
Nom
"
,
...
...
@@ -575,7 +579,7 @@ class AdefpatStatut(models.Model):
_name
=
'
adefpat.project.statut
'
_description
=
'
Statut
'
name
=
fields
.
Char
(
"
Statut
"
)
name
=
fields
.
Char
(
"
Statut
"
,
required
=
True
,
)
class
AdefpatFinancement
(
models
.
Model
):
...
...
@@ -587,7 +591,9 @@ class AdefpatFinancement(models.Model):
string
=
'
Facturation
'
,
domain
=
[
(
'
active
'
,
'
=
'
,
True
)],
on_delete
=
'
restrict
'
)
required
=
True
,
on_delete
=
'
restrict
'
)
montant
=
fields
.
Float
(
"
Montant
"
)
project_id
=
fields
.
Many2one
(
'
project.project
'
,
...
...
@@ -599,7 +605,7 @@ class AdefpatCout(models.Model):
_name
=
'
adefpat.project.cout
'
_description
=
'
Coûts
'
module
=
fields
.
Char
(
"
Nom du module
"
)
module
=
fields
.
Char
(
"
Nom du module
"
,
required
=
True
,
)
partner_id
=
fields
.
Many2one
(
'
res.partner
'
,
string
=
'
Consultant
'
,
...
...
This diff is collapsed.
Click to expand it.
static/src/js/project.js
+
12
−
17
View file @
aa923c56
odoo
.
define
(
'
new_module
_project.update_kanban
'
,
function
(
require
)
{
odoo
.
define
(
'
adefpat
_project.update_kanban
'
,
function
(
require
)
{
'
use strict
'
;
var
KanbanRecord
=
require
(
'
web_kanban.Record
'
);
var
QWeb
=
core
.
qweb
;
var
_t
=
core
.
_t
;
KanbanRecord
.
include
({
_openRecord
:
function
()
{
if
(
this
.
modelName
===
'
project.project
'
)
{
this
.
$
(
'
.o_kanban_card_manage_section a
'
).
first
().
click
();
}
else
{
this
.
_super
.
apply
(
this
,
arguments
);
}
},
});
var
KanbanRecord
=
require
(
'
web_kanban.Record
'
);
KanbanRecord
.
include
({
_openRecord
:
function
()
{
if
(
this
.
modelName
===
'
project.project
'
)
{
this
.
$
(
'
.o_kanban_card_manage_section a
'
).
first
().
click
();
}
else
{
this
.
_super
.
apply
(
this
,
arguments
);
}
},
});
});
\ No newline at end of file
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