Skip to content
Extraits de code Groupes Projets
Valider 11f68fa6 rédigé par Benjamin's avatar Benjamin
Parcourir les fichiers
parents 1781b09d 1388dad3
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -45,137 +45,13 @@ Modification du Header
----------------------
* `Configuration >> Paramètres généraux >> Editer l'entête de la page externe`
* Remplacer le header par défaut par le code suivant (et modifier le style css si besoin) :
.. code-block:: xml
<?xml version="1.0"?>
<t t-name="report.external_layout_header">
<div class="header">
<style type="text/css" >
.bg-color {
background-color: #00B495;
color: #fff;
}
.block-picto {
text-align: center; font-size: 11px; border-right: 1px solid #ccc;
}
.block-picto:last-child {
text-align: center; font-size: 11px; border-right: none;
}
.picto {
width: 30px; border-radius: 50%; display: inline-block;
}
.picto i {
padding: 8px; font-size: 14px;
}
.line-bottom {
border-bottom: 2px solid #00B495;
margin-top: 10px; margin-left:-50px; margin-right: -50px;
}
</style>
<div class="row">
<div class="col-xs-4">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 60px;width:auto;"/>
</div>
<div class="col-xs-8" style="margin-right: -15px;">
<div class="col-xs-4 block-picto">
<div style="margin-bottom: 5px;">
<span class="picto bg-color">
<i class="fa fa-map-marker"></i>
</span>
</div>
<div>
<span t-field="o.company_id.street" /><br/>
<span t-field="o.company_id.zip" /> <span t-field="o.company_id.city" />
</div>
</div>
<div class="col-xs-4 block-picto">
<div style="margin-bottom: 5px;">
<span class="picto bg-color">
<i class="fa fa-envelope"></i>
</span>
</div>
<div>
<span t-field="o.company_id.website" /><br/>
<span t-field="o.company_id.email" />
</div>
</div>
<div class="col-xs-4 block-picto">
<div style="margin-bottom: 5px;">
<span class="picto bg-color">
<i class="fa fa-user"></i>
</span>
</div>
<div>
<span t-field="o.user_id.login" /><br />
<span t-field="o.user_id.phone" />
</div>
</div>
</div>
</div>
<div class="line-bottom"/>
</div>
</t>
Modification du Footer
----------------------
* `Configuration >> Paramètres généraux >> Editer le pied de page de la page externe`
* Remplacer le footer par défaut par le code suivant :
.. code-block:: xml
<?xml version="1.0"?>
<t t-name="report.external_layout_footer">
<div class="footer">
<div class="footer-conditions">
Conformément à l'article L 441-6 du Code de commerce, des pénalités de retard sont dues à défaut de règlement le jour suivant la date de paiement qui figure sur la facture, le taux d'intérêt de ces pénalités de retard est de 3 fois le taux d'intérêt légal. Indemnités pour frais de recouvrement en cas de retard de paiement : 40€ sauf frais supplémentaires
</div>
<div class="text-center" style="border-top: 1px solid #eee; padding-top: 2px;">
<t t-if="not company.custom_footer" >
<t t-set="company" t-value="company.sudo()"/>
<span t-field="company.name"/>
<t t-if="company.company_type"> - <span t-field="company.company_type"/></t>
<t t-if="company.street"> | <span t-field="company.street"/>,</t>
<t t-if="company.zip"> <span t-field="company.zip"/></t>
<t t-if="company.city"> <span t-field="company.city"/></t>
<br />
<t t-if="company.siret"> SIRET : <span t-field="company.siret"/></t>
<t t-if="company.ape"> | Code APE : <span t-field="company.ape"/></t>
<t t-if="company.company_registry"> | R.C.S : <span t-field="company.company_registry"/></t>
<t t-if="company.vat"> | TVA Intracommunautaire : <span t-field="company.vat"/></t>
<br />
<t t-if="company.formation">Organisme de Formation enregistré sous le numéro <span t-field="company.formation"/>. Cet enregistrement ne vaut pas agrément de l’État<br /></t>
<t t-if="company.email">Contact : <span t-field="company.email"/></t>
<t t-if="company.phone"> | Téléphone : <span t-field="company.phone"/></t>
<t t-if="company.website"> | Site web : <span t-field="company.website"/></t>
</t>
<ul t-if="not company.custom_footer" class="list-inline" name="financial_infos">
<!-- <li t-if="company.vat">TIN: <span t-field="company.vat"/></li> -->
</ul>
<t t-if="company.custom_footer">
<span t-raw="company.rml_footer"/>
</t>
<ul class="list-inline">
<li>Page:</li>
<li><span class="page"/></li>
<li>/</li>
<li><span class="topage"/></li>
</ul>
</div>
</div>
</t>
Credits
=======
......@@ -184,6 +60,7 @@ Contributors
------------
* Benjamin Rivier <benjamin@le-filament.com>
* Rémi Cazenave <remi@le-filament.com>
Maintainer
......
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# © 2018 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import models
\ No newline at end of file
......@@ -18,5 +18,7 @@
'views/sale_config_settings.xml',
'templates/report_facture_lefilament.xml',
'templates/report_devis_lefilament.xml',
'templates/report_layout_header.xml',
'templates/report_layout_footer.xml',
],
}
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# © 2018 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import account_invoice
......
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# © 2018 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
......
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# © 2018 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
......
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# © 2018 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
......@@ -10,3 +10,11 @@ class LeFilamentCompany(models.Model):
formation = fields.Char('N° Organisme de formation')
company_type = fields.Char('Type de société')
@api.multi
def edit_external_header(self):
return self._prepare_report_view_action('lefilament_generic_reports.report_layout_header')
@api.multi
def edit_external_footer(self):
return self._prepare_report_view_action('lefilament_generic_reports.report_layout_header')
\ No newline at end of file
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# © 2018 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
......
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# © 2018 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
......
<?xml version="1.0"?>
<data noupdate="1">
<template id="report_layout_footer" inherit_id="account.external_layout_footer">
<xpath expr="//div" position="replace">
<div class="footer">
<div class="footer-conditions">
Conformément à l'article L 441-6 du Code de commerce, des pénalités de retard sont dues à défaut de règlement le jour suivant la date de paiement qui figure sur la facture, le taux d'intérêt de ces pénalités de retard est de 3 fois le taux d'intérêt légal. Indemnités pour frais de recouvrement en cas de retard de paiement : 40€ sauf frais supplémentaires
</div>
<div class="text-center" style="border-top: 1px solid #eee; padding-top: 2px;">
<t t-if="not company.custom_footer" >
<t t-set="company" t-value="company.sudo()"/>
<span t-field="company.name"/>
<t t-if="company.company_type"> - <span t-field="company.company_type"/></t>
<t t-if="company.street"> | <span t-field="company.street"/>,</t>
<t t-if="company.zip"> <span t-field="company.zip"/></t>
<t t-if="company.city"> <span t-field="company.city"/></t>
<br />
<t t-if="company.siret"> SIRET : <span t-field="company.siret"/></t>
<t t-if="company.ape"> | Code APE : <span t-field="company.ape"/></t>
<t t-if="company.company_registry"> | R.C.S : <span t-field="company.company_registry"/></t>
<t t-if="company.vat"> | TVA Intracommunautaire : <span t-field="company.vat"/></t>
<br />
<t t-if="company.formation">Organisme de Formation enregistré sous le numéro <span t-field="company.formation"/>. Cet enregistrement ne vaut pas agrément de l’État<br /></t>
<t t-if="company.email">Contact : <span t-field="company.email"/></t>
<t t-if="company.phone"> | Téléphone : <span t-field="company.phone"/></t>
<t t-if="company.website"> | Site web : <span t-field="company.website"/></t>
</t>
<ul t-if="not company.custom_footer" class="list-inline" name="financial_infos">
<t t-set="is_first" t-value="True"/>
<t t-foreach="company.bank_journal_ids" t-as="journal">
<t t-set="bank_acc" t-value="journal.bank_account_id"/>
<t t-if="journal.display_on_footer">
<li t-if="(is_first and company.vat) or (not is_first)">&amp;bull;</li>
<li><span t-esc="bank_acc.bank_name"/><t t-if="bank_acc.bank_bic"> (<span t-esc="bank_acc.bank_bic"/>)</t>: <span t-esc="bank_acc.acc_number"/></li>
<t t-set="is_first" t-value="False"/>
</t>
</t>
</ul>
<t t-if="company.custom_footer">
<span t-raw="company.rml_footer"/>
</t>
<ul class="list-inline">
<li>Page:</li>
<li><span class="page"/></li>
<li>/</li>
<li><span class="topage"/></li>
</ul>
</div>
</div>
</xpath>
</template>
</data>
\ No newline at end of file
<?xml version="1.0"?>
<data noupdate="1">
<template id="report_layout_header" inherit_id="report.external_layout_header">
<xpath expr="//div" position="replace">
<div class="header">
<style type="text/css" >
.bg-color {
background-color: #00B495;
color: #fff;
}
.block-picto {
text-align: center; font-size: 11px; border-right: 1px solid #ccc;
}
.block-picto:last-child {
text-align: center; font-size: 11px; border-right: none;
}
.picto {
width: 30px; border-radius: 50%; display: inline-block;
}
.picto i {
padding: 8px; font-size: 14px;
}
.line-bottom {
border-bottom: 2px solid #00B495;
margin-top: 10px; margin-left:-50px; margin-right: -50px;
}
</style>
<div class="row">
<div class="col-xs-4">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 60px;width:auto;"/>
</div>
<div class="col-xs-8" style="margin-right: -15px;">
<div class="col-xs-4 block-picto">
<div style="margin-bottom: 5px;">
<span class="picto bg-color">
<i class="fa fa-map-marker"></i>
</span>
</div>
<div>
<span t-field="o.company_id.street" /><br/>
<span t-field="o.company_id.zip" /> <span t-field="o.company_id.city" />
</div>
</div>
<div class="col-xs-4 block-picto">
<div style="margin-bottom: 5px;">
<span class="picto bg-color">
<i class="fa fa-envelope"></i>
</span>
</div>
<div>
<span t-field="o.company_id.website" /><br/>
<span t-field="o.company_id.email" />
</div>
</div>
<div class="col-xs-4 block-picto">
<div style="margin-bottom: 5px;">
<span class="picto bg-color">
<i class="fa fa-user"></i>
</span>
</div>
<div>
<span t-field="o.user_id.login" /><br />
<span t-field="o.user_id.phone" />
</div>
</div>
</div>
</div>
<div class="line-bottom"/>
</div>
</xpath>
</template>
</data>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter