Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
C
cgscop_account
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_account
Validations
0bb11f2d
Valider
0bb11f2d
rédigé
8 févr. 2022
par
jordan
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[update] add field source to deal with multiple modules for report invoice
parent
04ae1637
Branches
Branches contenant la validation
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é
report/account_invoice_all.py
+7
-1
7 ajouts, 1 suppression
report/account_invoice_all.py
avec
7 ajouts
et
1 suppression
report/account_invoice_all.py
+
7
−
1
Voir le fichier @
0bb11f2d
...
@@ -27,6 +27,10 @@ class AccountInvoiceReport(models.Model):
...
@@ -27,6 +27,10 @@ class AccountInvoiceReport(models.Model):
(
'
paid
'
,
'
Payée
'
),
(
'
paid
'
,
'
Payée
'
),
(
'
cancel
'
,
'
Annulée
'
)
(
'
cancel
'
,
'
Annulée
'
)
],
string
=
'
Statut
'
,
readonly
=
True
)
],
string
=
'
Statut
'
,
readonly
=
True
)
source
=
fields
.
Selection
(
string
=
'
Source
'
,
selection
=
[(
'
odoo
'
,
'
Odoo
'
)],
required
=
True
,)
date_due
=
fields
.
Date
(
string
=
'
Date échéance
'
,
readonly
=
True
)
date_due
=
fields
.
Date
(
string
=
'
Date échéance
'
,
readonly
=
True
)
residual_company_signed
=
fields
.
Float
(
string
=
'
Montant dû
'
,
readonly
=
True
)
residual_company_signed
=
fields
.
Float
(
string
=
'
Montant dû
'
,
readonly
=
True
)
amount_total_signed
=
fields
.
Float
(
string
=
'
Total TTC
'
,
readonly
=
True
)
amount_total_signed
=
fields
.
Float
(
string
=
'
Total TTC
'
,
readonly
=
True
)
...
@@ -52,6 +56,7 @@ class AccountInvoiceReport(models.Model):
...
@@ -52,6 +56,7 @@ class AccountInvoiceReport(models.Model):
select_str
=
"""
select_str
=
"""
SELECT
SELECT
ROW_NUMBER() OVER(ORDER BY c.date_invoice, c.partner_id) AS id,
ROW_NUMBER() OVER(ORDER BY c.date_invoice, c.partner_id) AS id,
c.source,
c.invoice_id,
c.invoice_id,
c.date_invoice,
c.date_invoice,
c.date_due,
c.date_due,
...
@@ -72,6 +77,7 @@ class AccountInvoiceReport(models.Model):
...
@@ -72,6 +77,7 @@ class AccountInvoiceReport(models.Model):
def
_subquery
(
self
):
def
_subquery
(
self
):
select_str
=
"""
select_str
=
"""
(SELECT
(SELECT
'
odoo
'
as source,
id AS invoice_id,
id AS invoice_id,
date_invoice,
date_invoice,
date_due,
date_due,
...
@@ -107,7 +113,7 @@ class AccountInvoiceReport(models.Model):
...
@@ -107,7 +113,7 @@ class AccountInvoiceReport(models.Model):
@api.multi
@api.multi
def
_compute_lines
(
self
):
def
_compute_lines
(
self
):
for
inv
in
self
:
for
inv
in
self
:
if
inv
.
invoice_id
:
if
inv
.
source
==
'
odoo
'
and
inv
.
invoice_id
:
inv
.
lines
=
"
<table class=
'
table table-hover table-striped table-sm
'
>
"
\
inv
.
lines
=
"
<table class=
'
table table-hover table-striped table-sm
'
>
"
\
"
<thead class=
'
thead-light
'
><tr><th>Description</th><th>Quantité</th><th>P.U</th>
"
\
"
<thead class=
'
thead-light
'
><tr><th>Description</th><th>Quantité</th><th>P.U</th>
"
\
"
<th>Total HT</th><th>Total TTC</th></tr></thead><tbody>
"
+
\
"
<th>Total HT</th><th>Total TTC</th></tr></thead><tbody>
"
+
\
...
...
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