Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
C
cgscop_cotisation
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
Déploiement
Registre de paquets
Opération
Modules Terraform
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
Hervé Silvant - CGScop
cgscop_cotisation
Validations
c8c10a2f
Valider
c8c10a2f
rédigé
Il y a 4 ans
par
jordan
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[update] add journal and account in config cotiz cg
parent
ab38d2a3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
models/scop_cotisation.py
+9
-4
9 ajouts, 4 suppressions
models/scop_cotisation.py
avec
9 ajouts
et
4 suppressions
models/scop_cotisation.py
+
9
−
4
Voir le fichier @
c8c10a2f
...
@@ -70,7 +70,8 @@ class ScopCotisation(models.AbstractModel):
...
@@ -70,7 +70,8 @@ class ScopCotisation(models.AbstractModel):
# Global functions
# Global functions
# ------------------------------------------------------
# ------------------------------------------------------
def
create_contribution
(
self
,
product
,
partner
,
type_contribution
,
def
create_contribution
(
self
,
product
,
partner
,
type_contribution
,
liasse
=
None
,
amount
=
0
,
date
=
False
):
liasse
=
None
,
amount
=
0
,
date
=
False
,
journal_id
=
False
,
account_id
=
False
):
Invoice
=
self
.
env
[
'
account.invoice
'
]
Invoice
=
self
.
env
[
'
account.invoice
'
]
InvoiceLine
=
self
.
env
[
'
account.invoice.line
'
]
InvoiceLine
=
self
.
env
[
'
account.invoice.line
'
]
...
@@ -79,8 +80,12 @@ class ScopCotisation(models.AbstractModel):
...
@@ -79,8 +80,12 @@ class ScopCotisation(models.AbstractModel):
(
'
year
'
,
'
=
'
,
self
.
year
),
(
'
year
'
,
'
=
'
,
self
.
year
),
(
'
type_contribution_id
'
,
'
=
'
,
type_contribution
)
(
'
type_contribution_id
'
,
'
=
'
,
type_contribution
)
])
])
date_invoice
=
date
if
date
else
self
.
date_cotisation
if
not
exisiting_invoice
:
if
not
exisiting_invoice
:
date_invoice
=
date
if
date
else
self
.
date_cotisation
journal_id
=
self
.
company_id
.
contribution_journal_id
\
if
not
journal_id
else
journal_id
account_id
=
partner
.
property_account_receivable_id
\
if
not
account_id
else
account_id
member_invoice
=
Invoice
.
create
({
member_invoice
=
Invoice
.
create
({
'
partner_id
'
:
partner
.
id
,
'
partner_id
'
:
partner
.
id
,
'
liasse_fiscale_id
'
:
liasse
.
id
,
'
liasse_fiscale_id
'
:
liasse
.
id
,
...
@@ -88,9 +93,9 @@ class ScopCotisation(models.AbstractModel):
...
@@ -88,9 +93,9 @@ class ScopCotisation(models.AbstractModel):
'
year
'
:
self
.
year
,
'
year
'
:
self
.
year
,
'
is_contribution
'
:
True
,
'
is_contribution
'
:
True
,
'
type_contribution_id
'
:
type_contribution
,
'
type_contribution_id
'
:
type_contribution
,
'
journal_id
'
:
self
.
company_id
.
contribution_
journal_id
.
id
,
'
journal_id
'
:
journal_id
.
id
,
'
state
'
:
'
draft
'
,
'
state
'
:
'
draft
'
,
'
account_id
'
:
partner
.
property_account_receivable
_id
.
id
,
'
account_id
'
:
account
_id
.
id
,
'
payment_term_id
'
:
self
.
payment_term_id
.
id
,
'
payment_term_id
'
:
self
.
payment_term_id
.
id
,
'
payment_mode_id
'
:
partner
.
customer_payment_mode_id
.
id
,
'
payment_mode_id
'
:
partner
.
customer_payment_mode_id
.
id
,
'
date_invoice
'
:
date_invoice
,
'
date_invoice
'
:
date_invoice
,
...
...
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