Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
C
cgscop_cotisation_cg
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_cotisation_cg
Validations
f1fccb7f
Valider
f1fccb7f
rédigé
28 avr. 2021
par
Benjamin - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[add] bordereau regul
parent
eca9b41e
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
models/account_invoice.py
+38
-0
38 ajouts, 0 suppression
models/account_invoice.py
report/report_scop_bordereau.xml
+11
-3
11 ajouts, 3 suppressions
report/report_scop_bordereau.xml
views/scop_bordereau_cg.xml
+23
-4
23 ajouts, 4 suppressions
views/scop_bordereau_cg.xml
avec
72 ajouts
et
7 suppressions
models/account_invoice.py
+
38
−
0
Voir le fichier @
f1fccb7f
...
...
@@ -35,6 +35,44 @@ class ScopAccountInvoiceCG(models.Model):
round_to_closest_multiple
(
i
.
amount_cg_calculated
*
prorata
,
i
.
nb_quarter
)
# ------------------------------------------------------
# Override parent
# ------------------------------------------------------
@api.multi
def
set_scop_contribution
(
self
):
contrib_id
=
super
(
ScopAccountInvoiceCG
,
self
).
set_scop_contribution
()
if
self
.
cotisation_cg_id
:
i
=
4
-
self
.
nb_quarter
schedule
=
{
'
quarter_1
'
:
self
.
cotisation_cg_id
.
trimester_1
,
'
quarter_2
'
:
self
.
cotisation_cg_id
.
trimester_2
,
'
quarter_3
'
:
self
.
cotisation_cg_id
.
trimester_3
,
'
quarter_4
'
:
self
.
cotisation_cg_id
.
trimester_4
,
}
while
i
!=
0
:
key
=
'
quarter_
'
+
str
(
i
)
schedule
.
pop
(
key
,
None
)
i
-=
1
contrib_id
.
update
(
schedule
)
return
contrib_id
def
set_scop_contribution_hook
(
self
,
contrib_id
):
"""
Compute contribution line amount if bordereau regul
:param contrib_id:
:return:
"""
super
(
ScopAccountInvoiceCG
,
self
).
set_scop_contribution_hook
(
contrib_id
)
if
self
.
bordereau_id
:
invoice_ids
=
self
.
bordereau_id
.
invoice_ids
.
filtered
(
lambda
i
:
i
.
type_contribution_id
==
contrib_id
.
type_id
)
contrib_id
.
update
({
'
amount_calculated
'
:
sum
(
invoice_ids
.
mapped
(
'
amount_total_signed
'
)),
'
amount_called
'
:
sum
(
invoice_ids
.
mapped
(
'
amount_total_signed
'
)),
})
return
contrib_id
# ------------------------------------------------------
# Global functions
# ------------------------------------------------------
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
report/report_scop_bordereau.xml
+
11
−
3
Voir le fichier @
f1fccb7f
...
...
@@ -21,7 +21,7 @@
<p>
N° adhérent :
<t
t-esc=
"str(o.partner_id.member_number_int)"
/><br/>
Union régionale :
<span
t-field=
"o.partner_ur_id.name"
/><br/>
N° Bordereau :
<span
t-field=
"o.name"
/>
N° Bordereau :
<span
t-field=
"o.name"
/>
<t
t-if=
"o.is_regul"
>
-
<span
t-field=
"o.version"
/></t>
</p>
</div>
</div>
...
...
@@ -35,6 +35,14 @@
<t
t-if=
"o.partner_id.cedex"
>
<span
t-field=
"o.partner_id.cedex"
/></t>
</div>
</div>
<t
t-if=
"o.is_regul"
>
<div
class=
"row"
>
<div
class=
"col-12"
style=
"test-align: justify;"
>
Une régularisation du bordereau initial a été effectuée pour le motif suivant :
<span
t-field=
"o.comment_regul"
/><br/>
Date de régularisation :
<span
t-field=
"o.date_regul"
/>
</div>
</div>
</t>
<div
class=
"row mb16"
>
<div
class=
"col-12"
style=
"font-style: italic; test-align: justify;"
>
Les cotisations sont calculées annuellement en début d’année sur la base du dernier exercice connu. Le versement se fait par quart tous les trimestres. Merci de retourner ce bordereau à la CG Scop avec le règlement correspondant
...
...
@@ -52,8 +60,8 @@
<t
t-set=
"amount_line"
t-value=
"o.get_contribution_type()"
/>
<table
class=
"table table-sm"
style=
"border: none;"
>
<tr
t-foreach=
"amount_line"
t-as=
"line"
style=
"border-bottom: 1px solid #ccc;"
>
<td
style=
"border: none; background: inherit; color: inherit;"
><t
t-esc=
"line.get('type_contribution
')
"
/></td>
<td
class=
"text-right"
style=
"border: none; background: inherit; color: inherit;"
><t
t-esc=
"line.get('amount')"
t-options=
"{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"
/></td>
<td
style=
"border: none; background: inherit; color: inherit;"
><t
t-esc=
"line.get('type_contribution
_id')[1]
"
/></td>
<td
class=
"text-right"
style=
"border: none; background: inherit; color: inherit;"
><t
t-esc=
"line.get('amount
_total_signed
')"
t-options=
"{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"
/></td>
</tr>
</table>
</p>
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/scop_bordereau_cg.xml
+
23
−
4
Voir le fichier @
f1fccb7f
...
...
@@ -16,17 +16,31 @@
<button
name=
"print_bordereau"
string=
"Imprimer"
type=
"object"
states=
"validated,paid"
/>
<button
name=
"action_send_email"
string=
"Envoyer par mail"
type=
"object"
states=
"validated"
/>
<button
name=
"update_cotiz_and_lines"
class=
"btn-info"
string=
"Mettre à jour les cotisations"
type=
"object"
states=
"new"
/>
<button
name=
"%(cgscop_cotisation_cg.scop_cotisation_regul_wizard_act_window)d"
class=
"btn-warning"
string=
"Effectuer une Régularisation"
type=
"action"
states=
"validated,paid"
/>
</header>
<sheet>
<div
class=
"oe_title"
>
<h1>
<field
name=
"name"
placeholder=
"Title"
/>
<field
name=
"name"
/>
<span
class=
"o_field_char o_field_widget"
attrs=
"{'invisible': [('version', '=', 1)]}"
>
-
</span>
<field
name=
"version"
attrs=
"{'invisible': [('version', '=', 1)]}"
/>
</h1>
</div>
<h4>
Adhérent :
<field
name=
"partner_id"
/>
<br/>
UR :
<field
name=
"partner_ur_id"
readonly=
"True"
options=
"{'no_open': True}"
/>
</h4>
<field
name=
"is_regul"
invisible=
"1"
/>
<div
class=
"alert alert-warning"
role=
"alert"
attrs=
"{'invisible': [('is_regul', '!=', True)]}"
>
<group>
<field
name=
"date_regul"
/>
<field
name=
"comment_regul"
/>
</group>
</div>
<group>
<group>
<field
name=
"base_cotisation_cg"
/>
...
...
@@ -47,18 +61,21 @@
<field
name=
"invoice_ids"
widget=
"one2many"
>
<tree
edit=
"false"
create=
"false"
delete=
"false"
>
<field
name=
"type_contribution_id"
/>
<field
name=
"date_due"
/>
<field
name=
"date_invoice"
/>
<field
name=
"name"
/>
<field
name=
"amount_total_signed"
string=
"Montant total"
sum=
"Total"
/>
<field
name=
"residual"
string=
"Montant dû"
sum=
"Total"
/>
<field
name=
"residual
_signed
"
string=
"Montant dû"
sum=
"Total"
/>
<field
name=
"state"
/>
<button
name=
"view_cotiz"
string=
"Afficher"
type=
"object"
icon=
"fa-pencil-square-o"
/>
</tree>
<form>
<group>
<field
name=
"type_contribution_id"
/>
<field
name=
"date_due"
/>
<field
name=
"date_invoice"
/>
<field
name=
"name"
/>
<field
name=
"amount_cg_calculated"
/>
<field
name=
"amount_total_signed"
/>
<field
name=
"residual_signed"
/>
<field
name=
"nb_quarter"
/>
<field
name=
"state"
/>
</group>
...
...
@@ -124,7 +141,9 @@
<field
name=
"model"
>
scop.bordereau
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
decoration-info=
"state == 'new'"
create=
"false"
string=
"Bordereaux"
>
<field
name=
"member_number"
/>
<field
name=
"partner_id"
/>
<field
name=
"partner_ur_id"
/>
<field
name=
"year"
/>
<field
name=
"state"
/>
<field
name=
"type_assiette_retenu"
/>
...
...
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