Skip to content
Extraits de code Groupes Projets
Valider 6af0d867 rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[init] v1 module

parent
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
.*
*.pyc
!.gitignore
Ce diff est replié.
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
=====================
3A Dentaire - Website
=====================
Description
===========
Ce module hérite du module **website** et ajoute les fonctionnalités suivantes pour 3A Dentaire :
* modification du header (css)
* ajout d'une image configurables par site web dans le header
* modification du footer (css)
Credits
=======
Contributors
------------
* Benjamin Rivier <benjamin@le-filament.com>
Maintainer
----------
.. image:: https://le-filament.com/images/logo-lefilament.png
:alt: Le Filament
:target: https://le-filament.com
This module is maintained by Le Filament
\ No newline at end of file
# -*- coding: utf-8 -*-
from . import models
# -*- coding: utf-8 -*-
# © 2017 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': '3A Dentaire - Website',
'summary': "Adpatation layout 3A Dentaire",
'version': '12.3.1.0',
'license': 'AGPL-3',
'author': 'LE FILAMENT',
'category': 'Theme',
'depends': [
'portal',
'website',
],
'contributors': [
'Benjamin Rivier <benjamin@le-filament.com>',
],
'website': 'http://www.le-filament.com',
'data': [
'template/layout_template.xml',
'views/res_config.xml',
],
'images': [
'static/description/cover.png'
],
'qweb': [
'static/src/xml/*.xml',
],
}
\ No newline at end of file
# -*- coding: utf-8 -*-
from . import website
from . import res_config
# -*- coding: utf-8 -*-
# © 2019 Le Filament (http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class DentaireWebsiteConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
header_image = fields.Binary(
related='website_id.header_image',
readonly=False)
# -*- coding: utf-8 -*-
# © 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class DentaireWebsite(models.Model):
_inherit = 'website'
header_image = fields.Binary(
string='Image Menu (après logo)',
help="Cette image sera placée à droite du logo dans le menu")
static/description/icon.png

8,95 ko

/******************************
/** HEADER
/******************************/
#wrapwrap header {
border-bottom: 1px solid #f3f3f3;
}
#wrapwrap .o_header_affix {
background-color: #fff;
}
#top_menu .nav-item {
padding: 20px 12px;
color: #444;
line-height: 20px;
font-size: 14px;
text-transform: uppercase;
}
.navbar-brand {
height: 80px;
line-height: 80px;
}
header .navbar-brand.logo img {
height: 100%;
}
.navbar ul.nav > li.divider {
height: auto;
}
.navbar-toggler {
border: 1px solid #444;
}
/************************************
/** FOOTER
*************************************/
#footer{
border-top: 1px solid #f3f3f3 !important;
background-color: #fff;
}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_frontend" inherit_id="website.assets_frontend" name="Account Manager">
<xpath expr="." position="inside">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700" rel="stylesheet" />
<link rel='stylesheet' href='/3adentaire_website/static/src/css/3adentaire_frontend.css'/>
</xpath>
</template>
<template id="assets_frontend_3a" inherit_id="portal.frontend_layout" name="Main Frontend Layout 3A Dentaire">
<xpath expr="//header/nav" position="attributes">
<attribute name="class">navbar navbar-expand-md</attribute>
</xpath>
<xpath expr="//a[hasclass('logo')]" position="inside">
<t t-if="website.header_image">
<img t-attf-src="data:image/*;base64,{{website.header_image}}" style="margin-left: 5px;"/>
</t>
</xpath>
</template>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="3a_view_website_config_settings" model="ir.ui.view">
<field name="name">Website settings 3a</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='domain_setting']/div/div[hasclass('content-group')]" position="inside">
<div class="row">
<label class="col-lg-3 o_light_label" for="header_image" />
<field name="header_image" widget="image" class="w-25 mt-2"/>
</div>
</xpath>
</field>
</record>
</odoo>
\ 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