Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
autrement_dit_partner
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
Autrement Dit
autrement_dit_partner
Validations
dc49c439
Valider
dc49c439
rédigé
12 mars 2019
par
Juliana
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Modifs libellé Prix HT/TTC + change nom dans devis
parent
4de56ae8
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
models/__init__.py
+2
-1
2 ajouts, 1 suppression
models/__init__.py
models/product.py
+14
-0
14 ajouts, 0 suppression
models/product.py
report/report_account.xml
+122
-0
122 ajouts, 0 suppression
report/report_account.xml
report/report_sale.xml
+6
-6
6 ajouts, 6 suppressions
report/report_sale.xml
avec
144 ajouts
et
7 suppressions
models/__init__.py
+
2
−
1
Voir le fichier @
dc49c439
from
.
import
res_partner
from
.
import
sale
from
.
import
account_invoice
from
.
import
product
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
models/product.py
0 → 100644
+
14
−
0
Voir le fichier @
dc49c439
# © 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
odoo
import
models
,
fields
,
api
class
AutrementProductProduct
(
models
.
Model
):
_inherit
=
"
product.product
"
def
get_product_multiline_description_sale
(
self
):
res
=
super
(
AutrementProductProduct
,
self
).
get_product_multiline_description_sale
()
name
=
self
.
name
if
self
.
description_sale
:
name
+=
'
\n
'
+
self
.
description_sale
return
name
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
report/report_account.xml
+
122
−
0
Voir le fichier @
dc49c439
...
...
@@ -10,6 +10,128 @@
</t>
</xpath>
<xpath
expr=
"//table[@name='invoice_line_table']"
position=
"replace"
>
<table
class=
"table table-sm o_main_table"
name=
"invoice_line_table"
>
<thead>
<tr>
<t
t-set=
"colspan"
t-value=
"6"
/>
<th
class=
"text-left"
><span>
Description
</span></th>
<th
class=
"d-none text-left"
><span>
Document source
</span></th>
<th
class=
"text-right"
><span>
Quantité
</span></th>
<th
t-attf-class=
"text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
><span>
Prix unitaire HT
</span></th>
<th
t-if=
"display_discount"
t-attf-class=
"text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
>
<span>
Réduc.(%)
</span>
<t
t-set=
"colspan"
t-value=
"colspan+1"
/>
</th>
<th
t-attf-class=
"text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
><span>
Taxes
</span></th>
<th
class=
"text-right"
>
<span
groups=
"account.group_show_line_subtotals_tax_excluded"
>
Montant HT
</span>
<span
groups=
"account.group_show_line_subtotals_tax_included"
>
Total TTC
</span>
</th>
</tr>
</thead>
<tbody
class=
"invoice_tbody"
>
<t
t-set=
"current_subtotal"
t-value=
"0"
/>
<t
t-foreach=
"o.invoice_line_ids"
t-as=
"line"
>
<t
t-set=
"current_subtotal"
t-value=
"current_subtotal + line.price_subtotal"
groups=
"account.group_show_line_subtotals_tax_excluded"
/>
<t
t-set=
"current_subtotal"
t-value=
"current_subtotal + line.price_total"
groups=
"account.group_show_line_subtotals_tax_included"
/>
<tr
t-att-class=
"'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''"
>
<t
t-if=
"not line.display_type"
name=
"account_invoice_line_accountable"
>
<td
name=
"account_invoice_line_name"
><span
t-field=
"line.name"
/></td>
<td
class=
"d-none"
><span
t-field=
"line.origin"
/></td>
<td
class=
"text-right"
>
<span
t-field=
"line.quantity"
/>
<span
t-field=
"line.uom_id"
groups=
"uom.group_uom"
/>
</td>
<td
t-attf-class=
"text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
>
<span
t-field=
"line.price_unit"
t-options=
'{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
<td
t-if=
"display_discount"
t-attf-class=
"text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
>
<span
t-field=
"line.discount"
/>
</td>
<td
t-attf-class=
"text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
>
<span
t-esc=
"', '.join(map(lambda x: (x.description or x.name), line.invoice_line_tax_ids))"
/>
</td>
<td
class=
"text-right o_price_total"
>
<span
t-field=
"line.price_subtotal"
groups=
"account.group_show_line_subtotals_tax_excluded"
/>
<span
t-field=
"line.price_total"
groups=
"account.group_show_line_subtotals_tax_included"
/>
</td>
</t>
<t
t-if=
"line.display_type == 'line_section'"
>
<td
t-att-colspan=
"colspan"
>
<span
t-field=
"line.name"
/>
</td>
<t
t-set=
"current_section"
t-value=
"line"
/>
<t
t-set=
"current_subtotal"
t-value=
"0"
/>
</t>
<t
t-if=
"line.display_type == 'line_note'"
>
<td
t-att-colspan=
"colspan"
>
<span
t-field=
"line.name"
/>
</td>
</t>
</tr>
<t
t-if=
"current_section and (line_last or o.invoice_line_ids[line_index+1].display_type == 'line_section')"
>
<tr
class=
"is-subtotal text-right"
>
<td
t-att-colspan=
"colspan"
>
<strong
class=
"mr16"
>
Sous-total HT
</strong>
<span
t-esc=
"current_subtotal"
t-options=
'{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
</tr>
</t>
</t>
</tbody>
</table>
</xpath>
<xpath
expr=
"//div[@id='total']"
position=
"replace"
>
<div
id=
"total"
class=
"row"
>
<div
t-attf-class=
"#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto"
>
<table
class=
"table table-sm"
>
<tr
class=
"border-black o_subtotal"
style=
""
>
<td><strong>
Sous-total HT
</strong></td>
<td
class=
"text-right"
>
<span
t-field=
"o.amount_untaxed"
/>
</td>
</tr>
<t
t-foreach=
"o.amount_by_group"
t-as=
"amount_by_group"
>
<tr
style=
""
>
<t
t-if=
"len(o.tax_line_ids) == 1 and o.amount_untaxed == amount_by_group[2]"
>
<td><span
t-esc=
"amount_by_group[0]"
/></td>
<td
class=
"text-right o_price_total"
>
<span
t-esc=
"amount_by_group[3]"
/>
</td>
</t>
<t
t-else=
""
>
<td>
<span
t-esc=
"amount_by_group[0]"
/>
<span>
&
nbsp;
<span>
on
</span>
<t
t-esc=
"amount_by_group[4]"
/>
</span>
</td>
<td
class=
"text-right o_price_total"
>
<span
t-esc=
"amount_by_group[3]"
/>
</td>
</t>
</tr>
</t>
<tr
class=
"border-black o_total"
>
<td><strong>
Total TTC
</strong></td>
<td
class=
"text-right"
>
<span
t-field=
"o.amount_total"
/>
</td>
</tr>
</table>
</div>
</div>
</xpath>
</template>
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
report/report_sale.xml
+
6
−
6
Voir le fichier @
dc49c439
...
...
@@ -57,15 +57,15 @@
<t
t-set=
"colspan"
t-value=
"5"
/>
<th
class=
"text-left"
>
Description
</th>
<th
class=
"text-right"
>
Quantité
</th>
<th
class=
"text-right"
>
Prix unitaire
</th>
<th
class=
"text-right"
>
Prix unitaire
HT
</th>
<th
t-if=
"display_discount"
class=
"text-right"
groups=
"sale.group_discount_per_so_line"
>
<span>
Réduc.(%)
</span>
<t
t-set=
"colspan"
t-value=
"colspan+1"
/>
</th>
<th
class=
"text-right"
>
Taxes
</th>
<th
class=
"text-right"
>
<t
groups=
"account.group_show_line_subtotals_tax_excluded"
>
Montant
</t>
<t
groups=
"account.group_show_line_subtotals_tax_included"
>
Sous-total
</t>
<t
groups=
"account.group_show_line_subtotals_tax_excluded"
>
Montant
HT
</t>
<t
groups=
"account.group_show_line_subtotals_tax_included"
>
Sous-total
HT
</t>
</th>
</tr>
</thead>
...
...
@@ -116,7 +116,7 @@
<t
t-if=
"current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section')"
>
<tr
class=
"is-subtotal text-right"
>
<td
t-att-colspan=
"colspan"
>
<strong
class=
"mr16"
>
Sous-total
</strong>
<strong
class=
"mr16"
>
Sous-total
HT
</strong>
<span
t-esc=
"current_subtotal"
t-options=
'{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'
...
...
@@ -133,7 +133,7 @@
<div
t-attf-class=
"#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto"
>
<table
class=
"table table-sm"
>
<tr
class=
"border-black o_subtotal"
style=
""
>
<td><strong>
Sous-total
</strong></td>
<td><strong>
Sous-total
HT
</strong></td>
<td
class=
"text-right"
>
<span
t-field=
"doc.amount_untaxed"
/>
</td>
...
...
@@ -162,7 +162,7 @@
</tr>
</t>
<tr
class=
"border-black o_total"
>
<td><strong>
Total
</strong></td>
<td><strong>
Total
TTC
</strong></td>
<td
class=
"text-right"
>
<span
t-field=
"doc.amount_total"
/>
</td>
...
...
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