diff --git a/__init__.py b/__init__.py index c93cb1c09e67bb484d828f7d405f6f59b0fa88dc..78d66364da95e5c929d7950b04c52cfebc5b1178 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,4 @@ # Copyright 2022 Le Filament (https://le-filament.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) -from . import models +# from . import models diff --git a/__manifest__.py b/__manifest__.py index b1a1ad16c089d8b044ee4b2b0baa0d772bc9b331..0ce3b3162f8ae4f2d0089d2e9f127a60711a93c5 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -3,18 +3,22 @@ "summary": "Gestion portail", "author": "Le Filament", "website": "https://le-filament.com", - "version": "14.0.1.0.1", + "version": "16.0.1.0.1", "license": "AGPL-3", - "depends": ["base", "portal", "acc_enedis_api"], + "depends": ["base", "portal"], "data": [ # "security/ir.model.access.csv", # datas - "data/mail_data.xml", + # "data/mail_data.xml", # views + # templates + "templates/portal_layout.xml", + "templates/home.xml", + "templates/login.xml", # views menu - "views/res_partner_views.xml", - "views/res_config_views.xml", - "data/menu_data.xml", + # "views/res_partner_views.xml", + # "views/res_config_views.xml", + # "data/menu_data.xml", # wizard ], "qweb": [ @@ -22,4 +26,12 @@ ], "installable": True, "auto_install": False, + "assets": { + "web.assets_frontend": [ + "acc_portal/static/src/css/acc_style.scss", + ], + "web._assets_frontend_helpers": [ + "acc_portal/static/src/css/acc_bootstrap_override.scss", + ] + }, } diff --git a/static/src/css/acc_bootstrap_override.scss b/static/src/css/acc_bootstrap_override.scss new file mode 100644 index 0000000000000000000000000000000000000000..3926dfccd69c4962c9d54ef3f28959bc5db46e08 --- /dev/null +++ b/static/src/css/acc_bootstrap_override.scss @@ -0,0 +1,59 @@ +/************************** +Fonts +***************************/ +/* Fonts */ +@font-face { + font-family: "overpass"; + src: local("overpass"), url(../fonts/overpass/overpass-regular.otf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: "overpass"; + src: local("overpass"), url(../fonts/overpass/overpass-italic.otf) format("truetype"); + font-style: italic; +} +@font-face { + font-family: "overpass"; + src: local("overpass"), url(../fonts/overpass/overpass-bold.otf) format("truetype"); + font-weight: 700; + font-style: bold; +} +@font-face { + font-family: "overpass"; + src: local("overpass"), url(../fonts/overpass/overpass-light.otf) format("truetype"); + font-weight: 300; +} +@font-face { + font-family: "overpass"; + src: local("overpass"), url(../fonts/overpass/overpass-extralight.otf) format("truetype"); + font-weight: 100; +} + +/* Custom variables */ +$red-dark: #95073e; +$red: #ff0000; +$yellow: #ffe600; + +/************************** +Override bootstrap +***************************/ + +$font-family-sans-serif: "overpass", sans-serif; +$line-height-base: 1.5; + +/* Base color */ +$base-color: #2e323a; +$base-color-light: rgba(24, 28, 33, .06); + +/* General overrides */ +$body-bg: #ECF0F3; +$body-color: #4a4a4a; +$theme-colors: ( + primary: $red-dark, +); + +// $link: $blue; +// $link-visited: $purple; +// $light-border: 1px solid $base-color-light; +// $hr-height: 1px; diff --git a/static/src/css/acc_style.scss b/static/src/css/acc_style.scss new file mode 100644 index 0000000000000000000000000000000000000000..580c6620405096bcb7165dd4a84f4879a785f435 --- /dev/null +++ b/static/src/css/acc_style.scss @@ -0,0 +1,21 @@ +/************************** +Commons +***************************/ +.hero-acc { + color: #fff; + padding: 3rem 3rem; +} +.footer-content { + padding: 3rem 3rem; +} +/************************** +Login +***************************/ +.login-block { + height: 100vh; +} +.login-content { + padding-left: 15px; + padding-right: 15px; + max-width: 400px; +} diff --git a/static/src/fonts/overpass/overpass-bold-italic.otf b/static/src/fonts/overpass/overpass-bold-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..f4929aee6b7d62bf8327192c90491964e6116f72 Binary files /dev/null and b/static/src/fonts/overpass/overpass-bold-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-bold.otf b/static/src/fonts/overpass/overpass-bold.otf new file mode 100644 index 0000000000000000000000000000000000000000..962a5d7628df54752943bc65a97c9aa656b7f6de Binary files /dev/null and b/static/src/fonts/overpass/overpass-bold.otf differ diff --git a/static/src/fonts/overpass/overpass-extrabold-italic.otf b/static/src/fonts/overpass/overpass-extrabold-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..eafd74c7dbf0b4c08f47bb2e79512156d2dba7c3 Binary files /dev/null and b/static/src/fonts/overpass/overpass-extrabold-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-extrabold.otf b/static/src/fonts/overpass/overpass-extrabold.otf new file mode 100644 index 0000000000000000000000000000000000000000..9ee3b318710b74d9d2d0916833ee797eefd93e1a Binary files /dev/null and b/static/src/fonts/overpass/overpass-extrabold.otf differ diff --git a/static/src/fonts/overpass/overpass-extralight-italic.otf b/static/src/fonts/overpass/overpass-extralight-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..e10e16f5ccb2f39e1ab1d00dd35af5c7da903187 Binary files /dev/null and b/static/src/fonts/overpass/overpass-extralight-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-extralight.otf b/static/src/fonts/overpass/overpass-extralight.otf new file mode 100644 index 0000000000000000000000000000000000000000..91c96830d57b1b413dc10f8977362acb538332ee Binary files /dev/null and b/static/src/fonts/overpass/overpass-extralight.otf differ diff --git a/static/src/fonts/overpass/overpass-heavy-italic.otf b/static/src/fonts/overpass/overpass-heavy-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..f360b2d941b4b0ae0ab85447630f4e0264067756 Binary files /dev/null and b/static/src/fonts/overpass/overpass-heavy-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-heavy.otf b/static/src/fonts/overpass/overpass-heavy.otf new file mode 100644 index 0000000000000000000000000000000000000000..bb11d6d1a2f79872fde6395b806c0e673fad2f53 Binary files /dev/null and b/static/src/fonts/overpass/overpass-heavy.otf differ diff --git a/static/src/fonts/overpass/overpass-italic.otf b/static/src/fonts/overpass/overpass-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..19224a86dc1d636bfd9aa978d4c776a2718590cf Binary files /dev/null and b/static/src/fonts/overpass/overpass-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-light-italic.otf b/static/src/fonts/overpass/overpass-light-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..8cef017aa719074636a0b41c05dfc7044b68e2ed Binary files /dev/null and b/static/src/fonts/overpass/overpass-light-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-light.otf b/static/src/fonts/overpass/overpass-light.otf new file mode 100644 index 0000000000000000000000000000000000000000..b060651a442a5e7fbe9425c4a7f0990b8ec6636d Binary files /dev/null and b/static/src/fonts/overpass/overpass-light.otf differ diff --git a/static/src/fonts/overpass/overpass-regular.otf b/static/src/fonts/overpass/overpass-regular.otf new file mode 100644 index 0000000000000000000000000000000000000000..3a7c095fab33942b0597fcbd57fbfec815c9a2c5 Binary files /dev/null and b/static/src/fonts/overpass/overpass-regular.otf differ diff --git a/static/src/fonts/overpass/overpass-semibold-italic.otf b/static/src/fonts/overpass/overpass-semibold-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..75fbd505ffd6cb78110f7d4fed9b268cb3beb291 Binary files /dev/null and b/static/src/fonts/overpass/overpass-semibold-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-semibold.otf b/static/src/fonts/overpass/overpass-semibold.otf new file mode 100644 index 0000000000000000000000000000000000000000..176fb43ce14a23251c04318345785f99bf52f2c3 Binary files /dev/null and b/static/src/fonts/overpass/overpass-semibold.otf differ diff --git a/static/src/fonts/overpass/overpass-thin-italic.otf b/static/src/fonts/overpass/overpass-thin-italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..3ef362b71ac593050809ba07f6de7fe99979d5c0 Binary files /dev/null and b/static/src/fonts/overpass/overpass-thin-italic.otf differ diff --git a/static/src/fonts/overpass/overpass-thin.otf b/static/src/fonts/overpass/overpass-thin.otf new file mode 100644 index 0000000000000000000000000000000000000000..21e32b22a6f159b66605c8b105cd6e83520d69b6 Binary files /dev/null and b/static/src/fonts/overpass/overpass-thin.otf differ diff --git a/static/src/img/img-photovoltaique.jpg b/static/src/img/img-photovoltaique.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a8453d32d7153f1608d40d818e27e88d18e85ac7 Binary files /dev/null and b/static/src/img/img-photovoltaique.jpg differ diff --git a/static/src/img/logo-elocoop.png b/static/src/img/logo-elocoop.png new file mode 100644 index 0000000000000000000000000000000000000000..725857b4809d7bc12c72a0cd599cea9106caa021 Binary files /dev/null and b/static/src/img/logo-elocoop.png differ diff --git a/templates/home.xml b/templates/home.xml new file mode 100644 index 0000000000000000000000000000000000000000..5dbd9ff5caf67420fc3d76121074578c28e8cc37 --- /dev/null +++ b/templates/home.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <!-- Features template --> + <template id="portal_my_home" inherit_id="portal.portal_my_home" name="ACC Portal Layout"> + <xpath expr="//div[hasclass('o_portal_my_home')]" position="before"> + <t t-set="my_details" t-value="False"/> + </xpath> + </template> +</odoo> diff --git a/templates/login.xml b/templates/login.xml new file mode 100644 index 0000000000000000000000000000000000000000..289aec47d4c2627dde2c1a3a00d0d60e98d2a804 --- /dev/null +++ b/templates/login.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <!-- Features template --> + <template id="login_layout" inherit_id="web.login_layout" name="ACC Login Layout" priority="10"> + <xpath expr="//div[hasclass('container')]" position="replace"> + <div class="container-fluid"> + <div class="row"> + <div class="col-6 bg-white login-block d-flex justify-content-center"> + <div class="login-content align-self-center"> + <t t-out="0"/> + </div> + </div> + <div class="col-6 login-block d-flex justify-content-center"> + <div class="login-content align-self-center"> + <img class="img-fluid p-5" src="/acc_portal/static/src/img/logo-elocoop.png" /> + <p>Solution numérique pour la gestion d’opérations d’autoconsommation collective et de communautés d’énergie renouvelable.</p> + </div> + </div> + </div> + </div> + </xpath> + </template> +</odoo> diff --git a/templates/portal_layout.xml b/templates/portal_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..470fec2e1a61e314c6b08bd04d5f0d8ae5f1919a --- /dev/null +++ b/templates/portal_layout.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <!-- inherit frontend layout --> + <template id="frontend_layout" inherit_id="web.frontend_layout" name="ACC Frontend Layout"> + <!-- navbar = container-fluid --> + <xpath expr="//nav/div[hasclass('container')]" position="attributes"> + <attribute name="class">container-fluid</attribute> + </xpath> + <!-- page title + subtitle --> + <xpath expr="//nav" position="after"> + <div class="container-fluid"> + <div class="row bg-primary hero-acc"> + <div class="col-12"> + <h1 class="display-6"> + <t t-if="page_title"> + <t t-out="page_title" /> + </t> + <t t-else=""> + <t t-out="page_name" /> + </t> + </h1> + <t t-if="page_title"> + <p class="lead"><t t-out="page_subtitle" /></p> + </t> + </div> + </div> + </div> + </xpath> + <!-- footer --> + <xpath expr="//div[hasclass('o_footer_copyright')]" position="attributes"> + <attribute name="style">display: none;</attribute> + </xpath> + <xpath expr="//div[@id='footer']" position="inside"> + <div class="text-center"> + <p class="footer-content"> + <strong>Elocoop</strong> est propulsé par <a href="https://www.enercoop.fr/nos-cooperatives/midi-pyrenees/notre-cooperative" target="_blank" title="Enercoop Midi Pyrénées">Enercoop Midi-Pyrénées</a> afin de faciliter l’autoconsommation collective d’électricité renouvelable | <a href="/mentions-legales">Mentions légales</a> + </p> + </div> + </xpath> + </template> + +</odoo>