Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
C
cgscop_partner_multi_relation
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Le Filament
Confédération Générale des SCOP
cgscop_partner_multi_relation
Validations
4808a047
Valider
4808a047
rédigé
Il y a 2 ans
par
Benjamin - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[add] action button to view other partner
parent
9f9a0764
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
.pre-commit-config.yaml
+10
-12
10 ajouts, 12 suppressions
.pre-commit-config.yaml
models/res_partner_relation_all.py
+14
-0
14 ajouts, 0 suppression
models/res_partner_relation_all.py
views/res_partner_relation_all.xml
+7
-0
7 ajouts, 0 suppression
views/res_partner_relation_all.xml
avec
31 ajouts
et
12 suppressions
.pre-commit-config.yaml
+
10
−
12
Voir le fichier @
4808a047
...
...
@@ -6,8 +6,6 @@ exclude: |
^setup/|/static/description/index\.html$|
# We don't want to mess with tool-generated files
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
# Maybe reactivate this when all README files include prettier ignore tags?
^README\.md$|
# Library files can have extraneous formatting (even minimized)
/static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying
...
...
@@ -28,7 +26,7 @@ repos:
language
:
fail
files
:
"
\\
.rej$"
-
repo
:
https://github.com/oca/maintainer-tools
rev
:
ab1d7f6
rev
:
7d8a9f9ad73db0976fb03cbee43d953bc29b89e9
hooks
:
# update the NOT INSTALLABLE ADDONS section above
-
id
:
oca-update-pre-commit-excluded-addons
...
...
@@ -46,11 +44,11 @@ repos:
-
--remove-duplicate-keys
-
--remove-unused-variables
-
repo
:
https://github.com/psf/black
rev
:
2
0.8b1
rev
:
2
2.3.0
hooks
:
-
id
:
black
-
repo
:
https://github.com/pre-commit/mirrors-prettier
rev
:
v2.
1
.2
rev
:
v2.
6
.2
hooks
:
-
id
:
prettier
name
:
prettier (with plugin-xml)
...
...
@@ -61,7 +59,7 @@ repos:
-
--plugin=@prettier/plugin-xml
files
:
\.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
-
repo
:
https://github.com/pre-commit/mirrors-eslint
rev
:
v
7.
8.1
rev
:
v8.1
5.0
hooks
:
-
id
:
eslint
verbose
:
true
...
...
@@ -69,7 +67,7 @@ repos:
-
--color
-
--fix
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v
3
.2.0
rev
:
v
4
.2.0
hooks
:
-
id
:
trailing-whitespace
# exclude autogenerated files
...
...
@@ -91,12 +89,12 @@ repos:
-
id
:
mixed-line-ending
args
:
[
"
--fix=lf"
]
-
repo
:
https://github.com/asottile/pyupgrade
rev
:
v2.
7.2
rev
:
v2.
32.1
hooks
:
-
id
:
pyupgrade
args
:
[
"
--keep-percent-format"
]
-
repo
:
https://github.com/PyCQA/isort
rev
:
5.
5
.1
rev
:
5.
10
.1
hooks
:
-
id
:
isort
name
:
isort except __init__.py
...
...
@@ -104,13 +102,13 @@ repos:
-
--settings=.
exclude
:
/__init__\.py$
-
repo
:
https://gitlab.com/PyCQA/flake8
rev
:
3.
8.3
rev
:
3.
9.2
hooks
:
-
id
:
flake8
name
:
flake8
additional_dependencies
:
[
"
flake8-bugbear==20.1.4"
]
-
repo
:
https://github.com/PyCQA/pylint
rev
:
pylint-2.5.3
rev
:
v2.11.1
hooks
:
-
id
:
pylint
name
:
pylint with optional checks
...
...
@@ -119,7 +117,7 @@ repos:
-
--exit-zero
verbose
:
true
additional_dependencies
:
&pylint_deps
-
pylint-odoo==
3.
5.0
-
pylint-odoo==5.0
.5
-
id
:
pylint
name
:
pylint with mandatory checks
args
:
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
models/res_partner_relation_all.py
+
14
−
0
Voir le fichier @
4808a047
...
...
@@ -28,6 +28,20 @@ class ScopResPartnerRelationAll(models.AbstractModel):
readonly
=
True
,
)
# ------------------------------------------------------
# Actions buttons
# ------------------------------------------------------
def
action_view_other_partner
(
self
):
self
.
ensure_one
()
return
{
"
type
"
:
"
ir.actions.act_window
"
,
"
view_type
"
:
"
form
"
,
"
view_mode
"
:
"
form
"
,
"
res_model
"
:
"
res.partner
"
,
"
views
"
:
[(
False
,
"
form
"
)],
"
res_id
"
:
self
.
other_partner_id
.
id
,
}
# ------------------------------------------------------
# Override functions
# ------------------------------------------------------
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/res_partner_relation_all.xml
+
7
−
0
Voir le fichier @
4808a047
...
...
@@ -27,6 +27,13 @@
<field
name=
"other_partner_id"
position=
"attributes"
>
<attribute
name=
"context"
>
{'search_default_my_ur': 1}
</attribute>
</field>
<field
name=
"other_partner_id"
position=
"after"
>
<button
name=
"action_view_other_partner"
type=
"object"
string=
"Voir le partenaire"
/>
</field>
<field
name=
"other_partner_id"
position=
"after"
>
<field
name=
"other_partner_subtype_id"
/>
</field>
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter