diff --git a/doc/_extensions/flectra_ext/layout.html b/doc/_extensions/flectra_ext/layout.html index d8c4ce0b..1a1d3f14 100644 --- a/doc/_extensions/flectra_ext/layout.html +++ b/doc/_extensions/flectra_ext/layout.html @@ -9,21 +9,22 @@ {% set classes = [] %} {% if pagename == master_doc %} - {% set classes = classes + ['index'] %} +{% set classes = classes + ['index'] %} {% endif %} {% if 'code-column' in meta %} - {% set classes = classes + ['has_code_col'] %} +{% set classes = classes + ['has_code_col'] %} {% endif %} {%- block doctype -%} - + {%- endblock -%} {%- block htmltitle -%} - - - - {{ super() }} + + + +{{ super() }} {%- endblock -%} {%- block sidebar1 -%}{%- endblock -%} @@ -32,8 +33,8 @@ {%- block relbar2 -%}{%- endblock -%} {%- block footer -%} - {%- if google_analytics_key -%} - - {%- endif -%} + + +{%- endif -%} {%- endblock -%} {%- block header -%} -
+
- -
    - -
+ +
    + +
-
+
{%- endblock -%} {%- block content -%} -
+
{% if meta['banner'] %} {% set has_banner = 'has_banner' %} {% endif %}
- -
-

{{ meta.get('main-title', title) }}

-
+ +
+

{{ meta.get('main-title', title) }}

+
{% if 'code-column' in meta %} {% set container = 'container-fluid' %} {% else %} {% set container = 'container' %} {% endif %} -
+
{% if pagename != master_doc %}
- {% if 'has-toc' not in meta and not (pagename in toc) %} - - {% endif %} -
+ {% if 'has-toc' not in meta and not (pagename in toc) %} + {% endif %} - {% block body %} {% endblock %} - {% if pagename != master_doc %}
+
+ {% endif %} + {% block body %} {% endblock %} + {% if pagename != master_doc %} +
{% endif %}
-
-
+ +
-
+
- + -
-
+ + {%- endblock -%} diff --git a/doc/_extensions/flectra_ext/static/components.less b/doc/_extensions/flectra_ext/static/components.less index 7dfd79a2..8e734a07 100644 --- a/doc/_extensions/flectra_ext/static/components.less +++ b/doc/_extensions/flectra_ext/static/components.less @@ -395,7 +395,7 @@ blockquote { font-size: 0.8em; font-weight: @fw_semibold; color: darken(@brand-primary, 30%); - background-color: lighten(@brand-primary, 50%); + background-color: #bfe2ff; } .btn { diff --git a/doc/_extensions/flectra_ext/static/doc.js b/doc/_extensions/flectra_ext/static/doc.js index 0424d8e0..6704d01c 100644 --- a/doc/_extensions/flectra_ext/static/doc.js +++ b/doc/_extensions/flectra_ext/static/doc.js @@ -129,8 +129,9 @@ var half_cols_selector = '.tutorials,.api'; $main.find("#index .index-tree").find(half_cols_selector) - .wrap('
') - .find('.col-md-3').removeClass('col-md-3 col-sm-6').addClass('col-sm-12 col-md-6'); + .wrap('
') + .find('.col-md-3').removeClass('col-md-3 col-sm-6') + .addClass('col-sm-12 col-md-3'); var half_cols_els = $main.find(".o_half_col"); for(var i = 0; i < half_cols_els.length; i+=2) { diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/OFL.txt b/doc/_extensions/flectra_ext/static/fonts/Rubik/OFL.txt new file mode 100644 index 00000000..3f9139af --- /dev/null +++ b/doc/_extensions/flectra_ext/static/fonts/Rubik/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2015 The Rubik Project Authors, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Black.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Black.ttf new file mode 100644 index 00000000..9d9c1833 Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Black.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-BlackItalic.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-BlackItalic.ttf new file mode 100644 index 00000000..aec38299 Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-BlackItalic.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Bold.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Bold.ttf new file mode 100644 index 00000000..50eada5c Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Bold.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-BoldItalic.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-BoldItalic.ttf new file mode 100644 index 00000000..527d4c0c Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-BoldItalic.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Italic.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Italic.ttf new file mode 100644 index 00000000..8dc38c0b Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Italic.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Light.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Light.ttf new file mode 100644 index 00000000..5ffda618 Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Light.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-LightItalic.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-LightItalic.ttf new file mode 100644 index 00000000..747fc6f5 Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-LightItalic.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Medium.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Medium.ttf new file mode 100644 index 00000000..c0b7965f Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Medium.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-MediumItalic.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-MediumItalic.ttf new file mode 100644 index 00000000..77385061 Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-MediumItalic.ttf differ diff --git a/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Regular.ttf b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Regular.ttf new file mode 100644 index 00000000..fb52c8ee Binary files /dev/null and b/doc/_extensions/flectra_ext/static/fonts/Rubik/Rubik-Regular.ttf differ diff --git a/doc/_extensions/flectra_ext/static/style.css b/doc/_extensions/flectra_ext/static/style.css index f2f617f4..bfb86ba4 100644 --- a/doc/_extensions/flectra_ext/static/style.css +++ b/doc/_extensions/flectra_ext/static/style.css @@ -5,7 +5,7 @@ */ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ html { - font-family: sans-serif; + font-family:'Rubik', sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } @@ -253,15 +253,19 @@ th { } } @font-face { - font-family: 'Glyphicons Halflings'; + font-family: 'Rubik'; src: url('../fonts/glyphicons-halflings-regular.eot'); src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); } +@font-face { + font-family: 'Rubik'; + src: url('../fonts/Rubik/Rubik-Medium.ttf') format('truetype'); +} .glyphicon { position: relative; top: 1px; display: inline-block; - font-family: 'Glyphicons Halflings'; + font-family:'Rubik', sans-serif; font-style: normal; font-weight: normal; line-height: 1; @@ -1071,7 +1075,7 @@ html { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } body { - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; font-size: 16px; line-height: 1.42857143; color: #373e42; @@ -1091,7 +1095,7 @@ a { } a:hover, a:focus { - color: #926485; + color: #c2e2fc; text-decoration: none; } a:focus { @@ -1174,7 +1178,7 @@ h6, .h4, .h5, .h6 { - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; font-weight: 400; line-height: 1.1; color: #21313a; @@ -3410,7 +3414,7 @@ fieldset[disabled] .btn-link { } .btn-link:hover, .btn-link:focus { - color: #926485; + color: #c2e2fc; text-decoration: none; background-color: transparent; } @@ -4728,7 +4732,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus { .pagination > li > a:focus, .pagination > li > span:focus { z-index: 2; - color: #926485; + color: #c2e2fc; background-color: #F2F2F2; border-color: #ddd; } @@ -5964,7 +5968,7 @@ button.close { position: absolute; z-index: 1070; display: block; - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; font-style: normal; font-weight: normal; letter-spacing: normal; @@ -6082,7 +6086,7 @@ button.close { display: none; max-width: 276px; padding: 1px; - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; font-style: normal; font-weight: normal; letter-spacing: normal; @@ -6350,7 +6354,7 @@ button.close { width: 20px; height: 20px; line-height: 1; - font-family: serif; + font-family:'Rubik', sans-serif; } .carousel-control .icon-prev:before { content: '\2039'; @@ -9117,8 +9121,8 @@ button.close { background-position: 0 0; background-repeat: no-repeat; display: inline-block; - width: 94.05px; - height: 30px; + width: 200px; + height: 90px; background-size: auto 30px; } .o_logo.center-block, @@ -9546,24 +9550,24 @@ article.doc-body .code-fields ul em { font-weight: 600; } .card-img { - background: #75526b; - background: -webkit-linear-gradient(99deg, #875A7B 10%, #62495B 90%); - background: -moz-linear-gradient(99deg, #875A7B 10%, #62495B 90%); - background: -ms-linear-gradient(99deg, #875A7B 10%, #62495B 90%); - background: -o-linear-gradient(99deg, #875A7B 10%, #62495B 90%); - background: linear-gradient(99deg, #875A7B 10%, #62495B 90%); - position: absolute; - top: 0; - left: auto; - bottom: auto; - right: 0; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - width: 100%; - height: 100%; - display: block; - background-size: cover; - background-position: 50%; + background: #2396f5; + background: -webkit-linear-gradient(99deg, #2396f5 10%, #0a599a 90%); + background: -moz-linear-gradient(99deg, #2396f5 10%, #0a599a 90%); + background: -ms-linear-gradient(99deg, #2396f5 10%, #0a599a 90%); + background: -o-linear-gradient(99deg, #2396f5 10%, #0a599a 90%); + background: linear-gradient(99deg, #2396f5 10%, #0a599a 90%); + position: absolute; + top: 0; + left: auto; + bottom: auto; + right: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + width: 100%; + height: 100%; + display: block; + background-size: cover; + background-position: 50%; } .card.top { position: relative; @@ -9629,7 +9633,7 @@ article.doc-body .code-fields ul em { font-weight: 300; font-size: 1em; color: white; - line-height: 0.9; + line-height: 4; } .card.top.has_banner { background: #282F33; @@ -9670,7 +9674,7 @@ main .alert h3.alert-title { line-height: 1em; margin: 0 0 5px; font-weight: bold; - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; color: #438fa5; } main .alert h3.alert-title:before { @@ -9794,12 +9798,12 @@ span.menuselection { background: transparent; } blockquote { - font-family: Georgia, "Times New Roman", Times, serif; + font-family:'Rubik', sans-serif; font-weight: 600; font-style: italic; } blockquote footer { - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; background: transparent; text-align: left; color: #373e42; @@ -9819,7 +9823,7 @@ code { font-size: 0.8em; font-weight: 600; color: #0a352d; - background-color: #def9f4; + background-color: #bfe2ff; } .btn { border-radius: 0; @@ -10124,6 +10128,7 @@ article.doc-toc .toctree-wrapper > ul > li > span { @media screen and (min-width: 992px) { #wrap.index > .card.top { padding: 10% 0 2%; + min-height: 350px; } } #wrap.index > main.index { @@ -10135,13 +10140,13 @@ article.doc-toc .toctree-wrapper > ul > li > span { } main.index .toc-section h2 { padding: 0 0 4px; - border-bottom: 1px solid #F2F2F2; + border-bottom: 1px solid #cecece; margin: 1.4em 0 0.8em; - font-size: 16px; - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 20px; + font-family:'Rubik', sans-serif; letter-spacing: 0; font-weight: bold; - color: #888888; + color: #333; } main.index .card { border-radius: 4px; @@ -10219,11 +10224,11 @@ main.index .card figcaption { .o_main_header { position: fixed; width: 100%; - height: 50px; + height: 100px; z-index: 2; background-color: rgba(255, 255, 255, 0.6); color: #2b3134; - font-family: "Work Sans", sans-serif; + font-family:'Rubik', sans-serif; font-size: 12px; -webkit-transition: all 0.2s ease; -o-transition: all 0.2s ease; @@ -10286,12 +10291,7 @@ main.index .card figcaption { color: #273239; } .o_main_header > .o_main_header_main .o_logo { - //margin: 15px 0; - // width: 63px; - //height: 20px; margin: 5px 0; - width: 7%; - height: 75%; background-size: cover; } .o_main_header > .o_main_header_main > .o_primary_nav { @@ -10375,13 +10375,13 @@ main.index .card figcaption { transform: rotate(-45deg); } .o_main_header > .o_main_header_main > .o_primary_nav .dropdown.open > a { - color: #9E588B !important; + color: #bfe2ff !important; font-weight: 600; } .o_main_header > .o_main_header_main > .o_primary_nav .dropdown.open > a::before, .o_main_header > .o_main_header_main > .o_primary_nav .dropdown.open > a::after { - background-color: #9E588B !important; - box-shadow: 0 1px 1px rgba(158, 88, 139, 0.1); + background-color: #bfe2ff !important; + box-shadow: 0 1px 1px rgba(191, 226, 255, 0.1); right: 3.53553391px; } .o_main_header > .o_main_header_main > .o_primary_nav .dropdown.open > a::before { @@ -10881,7 +10881,7 @@ main.index .card figcaption { -webkit-transition: 0.3s background-color; -o-transition: 0.3s background-color; transition: 0.3s background-color; - background-color: rgba(255, 255, 255, 0.05); + background-color: rgba(255, 255, 255, 0.3); border-color: rgba(255, 255, 255, 0.1); } .o_main_header.o_inverted:not(.o_scrolled) > .o_sub_nav .nav > li > a, @@ -10900,7 +10900,7 @@ main.index .card figcaption { } .o_main_header.o_has_sub_nav.o_scrolled { position: fixed; - top: -51px; + top: -104px; } .o_main_header.o_inverted { background-color: transparent; @@ -11235,7 +11235,6 @@ body > footer .o_footer_bottom { background-color: #21272b; color: #dcddde; padding: 1em 0; - margin-top: 3em; } body > footer .o_footer_bottom a { opacity: 0.6; @@ -11248,6 +11247,63 @@ body > footer .o_footer_bottom a:hover { body > footer .o_footer_bottom .social-links .fa { margin-left: 20px; } + +body > footer a{ + font-family:'Rubik', sans-serif; +} +body > footer h1, +body > footer h2, +body > footer h3, +body > footer h4, +body > footer h5, +body > footer h6{ + color:#fff; +} +body > footer ul li { + font-size: 14px; + list-style-type: none; + line-height: 2; +} +.mb16 { + margin-bottom: 16px; +} +.mt16 { + margin-top: 16px; +} +.mb32 { + margin-bottom: 32px; +} +.mb48 { + margin-bottom: 48px; +} +.mt48 { + margin-top: 48px; +} +.social-btns .facebook-footer { + background: #3b5998; + color: #fff; + font-size: 14px; + padding: 0 25px; + height: 40px; + width: 126px; + line-height: 38px; +} +.social-btns .twitter-footer { + background: #00aced; + color: #fff; + font-size: 14px; + padding: 0 25px; + height: 40px; + width: 126px; + line-height: 38px; +} +.mr8 { + margin-right: 8px; +} +.ml8 { + margin-left: 8px; +} + aside { position: relative; min-height: 1px; @@ -11269,7 +11325,7 @@ aside { .navbar-aside { position: relative; overflow: hidden; - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; font-size: 0.85em; line-height: 1.5; overflow-y: auto; @@ -11314,7 +11370,7 @@ aside { display: inline-block; position: relative; margin: 10px 0; - font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family:'Rubik', sans-serif; } .navbar-aside .gith-container .gith-link:hover { color: #21313a; @@ -11433,7 +11489,7 @@ aside { .navbar-aside > ul > li.active > a, .navbar-aside > ul > li.active:focus > a, .navbar-aside > ul > li.active:hover > a { - border-left: 3px solid #21b799; + border-left: 3px solid #2fa2dc; } .navbar-aside > ul > li.active.parent + li { box-shadow: 0 -3px 5px -4px rgba(40, 47, 51, 0.4); @@ -11678,7 +11734,7 @@ aside { .o_main_header > .o_sub_nav #o_sub-menu .o_breadcrumb { background-color: transparent; padding: 0; - margin: 0 0 0 -15px; + margin: 0px; height: 38px; line-height: 38px; } diff --git a/doc/_extensions/flectra_ext/static/variables.less b/doc/_extensions/flectra_ext/static/variables.less index eae85399..77392957 100644 --- a/doc/_extensions/flectra_ext/static/variables.less +++ b/doc/_extensions/flectra_ext/static/variables.less @@ -10,7 +10,7 @@ // ============================================== @flectra-brand-optional : #21b799; -@flectra-brand-primary : #9E588B; +@flectra-brand-primary : #bfe2ff; //== Flectra Colours @o-violet-dark : #875A7B; diff --git a/doc/_extensions/github_link.py b/doc/_extensions/gitlab_link.py similarity index 75% rename from doc/_extensions/github_link.py rename to doc/_extensions/gitlab_link.py index 3db1b6fe..4ead696e 100644 --- a/doc/_extensions/github_link.py +++ b/doc/_extensions/gitlab_link.py @@ -7,7 +7,7 @@ from werkzeug import urls from flectra.tools import pycompat """ -* adds github_link(mode) context variable: provides URL (in relevant mode) of +* adds gitlab_link(mode) context variable: provides URL (in relevant mode) of current document on github * if sphinx.ext.linkcode is enabled, automatically generates github linkcode links (by setting config.linkcode_resolve) @@ -15,30 +15,30 @@ from flectra.tools import pycompat Settings ======== -* ``github_user``, username/organisation under which the project lives -* ``github_project``, name of the project on github -* (optional) ``version``, github branch to link to (default: master) +* ``gitlab_user``, username/organisation under which the project lives +* ``gitlab_project``, name of the project on gitlab +* (optional) ``version``, gitlab branch to link to (default: master) Notes ===== * provided ``linkcode_resolve`` only supports Python domain -* generates https github links +* generates https gitlab links * explicitly imports ``flectra``, so useless for anyone else """ def setup(app): - app.add_config_value('github_user', None, 'env') - app.add_config_value('github_project', None, 'env') + app.add_config_value('gitlab_user', None, 'env') + app.add_config_value('gitlab_project', None, 'env') app.connect('html-page-context', add_doc_link) def linkcode_resolve(domain, info): - """ Resolves provided object to corresponding github URL + """ Resolves provided object to corresponding gitlab URL """ # TODO: js? if domain != 'py': return None - if not (app.config.github_user and app.config.github_project): + if not (app.config.gitlab_user and app.config.gitlab_project): return None module, fullname = info['module'], info['fullname'] @@ -68,18 +68,18 @@ def setup(app): import flectra # FIXME: make finding project root project-independent project_root = os.path.join(os.path.dirname(flectra.__file__), '..') - return make_github_link( + return make_gitlab_link( app, os.path.relpath(obj_source_path, project_root), line) app.config.linkcode_resolve = linkcode_resolve -def make_github_link(app, path, line=None, mode="blob"): +def make_gitlab_link(app, path, line=None, mode="blob"): config = app.config urlpath = "/{user}/{project}/{mode}/{branch}/{path}".format( - user=config.github_user, - project=config.github_project, + user=config.gitlab_user, + project=config.gitlab_project, branch=config.version or 'master', path=path, mode=mode, @@ -93,8 +93,8 @@ def make_github_link(app, path, line=None, mode="blob"): )) def add_doc_link(app, pagename, templatename, context, doctree): - """ Add github_link function linking to the current page on github """ - if not app.config.github_user and app.config.github_project: + """ Add gitlab_link function linking to the current page on gitlab """ + if not app.config.gitlab_user and app.config.gitlab_project: return # FIXME: find other way to recover current document's source suffix @@ -103,5 +103,5 @@ def add_doc_link(app, pagename, templatename, context, doctree): source_suffix = app.config.source_suffix source_suffix = source_suffix if isinstance(source_suffix, pycompat.string_types) else source_suffix[0] # can't use functools.partial because 3rd positional is line not mode - context['github_link'] = lambda mode='edit': make_github_link( + context['github_link'] = lambda mode='edit': make_gitlab_link( app, 'doc/%s%s' % (pagename, source_suffix), mode=mode) diff --git a/doc/_static/banners/actions.jpg b/doc/_static/banners/actions.jpg deleted file mode 100644 index ed64a785..00000000 Binary files a/doc/_static/banners/actions.jpg and /dev/null differ diff --git a/doc/_static/banners/actions.small.jpg b/doc/_static/banners/actions.small.jpg deleted file mode 100644 index 5a727bb8..00000000 Binary files a/doc/_static/banners/actions.small.jpg and /dev/null differ diff --git a/doc/_static/banners/build_a_module.jpg b/doc/_static/banners/build_a_module.jpg deleted file mode 100644 index 7e16ab9e..00000000 Binary files a/doc/_static/banners/build_a_module.jpg and /dev/null differ diff --git a/doc/_static/banners/build_a_module.small.jpg b/doc/_static/banners/build_a_module.small.jpg deleted file mode 100644 index 01eacfb8..00000000 Binary files a/doc/_static/banners/build_a_module.small.jpg and /dev/null differ diff --git a/doc/_static/banners/build_a_theme.jpg b/doc/_static/banners/build_a_theme.jpg deleted file mode 100644 index 41f822d7..00000000 Binary files a/doc/_static/banners/build_a_theme.jpg and /dev/null differ diff --git a/doc/_static/banners/build_a_theme.small.jpg b/doc/_static/banners/build_a_theme.small.jpg deleted file mode 100644 index cbd2802f..00000000 Binary files a/doc/_static/banners/build_a_theme.small.jpg and /dev/null differ diff --git a/doc/_static/banners/build_a_website.jpg b/doc/_static/banners/build_a_website.jpg deleted file mode 100644 index f15124ce..00000000 Binary files a/doc/_static/banners/build_a_website.jpg and /dev/null differ diff --git a/doc/_static/banners/build_a_website.small.jpg b/doc/_static/banners/build_a_website.small.jpg deleted file mode 100644 index 37f02efe..00000000 Binary files a/doc/_static/banners/build_a_website.small.jpg and /dev/null differ diff --git a/doc/_static/banners/build_interface_ext.jpg b/doc/_static/banners/build_interface_ext.jpg deleted file mode 100644 index 0e0b55cc..00000000 Binary files a/doc/_static/banners/build_interface_ext.jpg and /dev/null differ diff --git a/doc/_static/banners/build_interface_ext.small.jpg b/doc/_static/banners/build_interface_ext.small.jpg deleted file mode 100644 index bd23fa27..00000000 Binary files a/doc/_static/banners/build_interface_ext.small.jpg and /dev/null differ diff --git a/doc/_static/banners/cdn.jpg b/doc/_static/banners/cdn.jpg deleted file mode 100644 index 67efa8f0..00000000 Binary files a/doc/_static/banners/cdn.jpg and /dev/null differ diff --git a/doc/_static/banners/cdn.small.jpg b/doc/_static/banners/cdn.small.jpg deleted file mode 100644 index 9d5a177b..00000000 Binary files a/doc/_static/banners/cdn.small.jpg and /dev/null differ diff --git a/doc/_static/banners/cmdline.jpg b/doc/_static/banners/cmdline.jpg deleted file mode 100644 index ce7e30da..00000000 Binary files a/doc/_static/banners/cmdline.jpg and /dev/null differ diff --git a/doc/_static/banners/cmdline.small.jpg b/doc/_static/banners/cmdline.small.jpg deleted file mode 100644 index cbd7e569..00000000 Binary files a/doc/_static/banners/cmdline.small.jpg and /dev/null differ diff --git a/doc/_static/banners/data_files.jpg b/doc/_static/banners/data_files.jpg deleted file mode 100644 index aa82b595..00000000 Binary files a/doc/_static/banners/data_files.jpg and /dev/null differ diff --git a/doc/_static/banners/data_files.small.jpg b/doc/_static/banners/data_files.small.jpg deleted file mode 100644 index c961891e..00000000 Binary files a/doc/_static/banners/data_files.small.jpg and /dev/null differ diff --git a/doc/_static/banners/deploying_odoo.jpg b/doc/_static/banners/deploying_odoo.jpg deleted file mode 100644 index 98bebb81..00000000 Binary files a/doc/_static/banners/deploying_odoo.jpg and /dev/null differ diff --git a/doc/_static/banners/deploying_odoo.small.jpg b/doc/_static/banners/deploying_odoo.small.jpg deleted file mode 100644 index eed9fe72..00000000 Binary files a/doc/_static/banners/deploying_odoo.small.jpg and /dev/null differ diff --git a/doc/_static/banners/enterprise.jpg b/doc/_static/banners/enterprise.jpg deleted file mode 100644 index 7247e783..00000000 Binary files a/doc/_static/banners/enterprise.jpg and /dev/null differ diff --git a/doc/_static/banners/enterprise.small.jpg b/doc/_static/banners/enterprise.small.jpg deleted file mode 100644 index fa0d3122..00000000 Binary files a/doc/_static/banners/enterprise.small.jpg and /dev/null differ diff --git a/doc/_static/banners/flectra_actions.jpg b/doc/_static/banners/flectra_actions.jpg new file mode 100644 index 00000000..4dcae973 Binary files /dev/null and b/doc/_static/banners/flectra_actions.jpg differ diff --git a/doc/_static/banners/flectra_building_interface_extensions.jpg b/doc/_static/banners/flectra_building_interface_extensions.jpg new file mode 100644 index 00000000..05226d0c Binary files /dev/null and b/doc/_static/banners/flectra_building_interface_extensions.jpg differ diff --git a/doc/_static/banners/flectra_building_module.jpg b/doc/_static/banners/flectra_building_module.jpg new file mode 100644 index 00000000..06383d21 Binary files /dev/null and b/doc/_static/banners/flectra_building_module.jpg differ diff --git a/doc/_static/banners/flectra_building_website.jpg b/doc/_static/banners/flectra_building_website.jpg new file mode 100644 index 00000000..8b4a901a Binary files /dev/null and b/doc/_static/banners/flectra_building_website.jpg differ diff --git a/doc/_static/banners/flectra_command_line_interface.jpg b/doc/_static/banners/flectra_command_line_interface.jpg new file mode 100644 index 00000000..3c290961 Binary files /dev/null and b/doc/_static/banners/flectra_command_line_interface.jpg differ diff --git a/doc/_static/banners/flectra_creating_localization.jpg b/doc/_static/banners/flectra_creating_localization.jpg new file mode 100644 index 00000000..e6e07388 Binary files /dev/null and b/doc/_static/banners/flectra_creating_localization.jpg differ diff --git a/doc/_static/banners/flectra_data_files.jpg b/doc/_static/banners/flectra_data_files.jpg new file mode 100644 index 00000000..9b1bedce Binary files /dev/null and b/doc/_static/banners/flectra_data_files.jpg differ diff --git a/doc/_static/banners/flectra_deploying.jpg b/doc/_static/banners/flectra_deploying.jpg new file mode 100644 index 00000000..9b2c1141 Binary files /dev/null and b/doc/_static/banners/flectra_deploying.jpg differ diff --git a/doc/_static/banners/flectra_external_api.jpg b/doc/_static/banners/flectra_external_api.jpg new file mode 100644 index 00000000..991a5263 Binary files /dev/null and b/doc/_static/banners/flectra_external_api.jpg differ diff --git a/doc/_static/banners/flectra_guidelines.jpg b/doc/_static/banners/flectra_guidelines.jpg new file mode 100644 index 00000000..02e9208d Binary files /dev/null and b/doc/_static/banners/flectra_guidelines.jpg differ diff --git a/doc/_static/banners/flectra_index.jpg b/doc/_static/banners/flectra_index.jpg new file mode 100644 index 00000000..316581ef Binary files /dev/null and b/doc/_static/banners/flectra_index.jpg differ diff --git a/doc/_static/banners/flectra_installing.jpg b/doc/_static/banners/flectra_installing.jpg new file mode 100644 index 00000000..6bf05549 Binary files /dev/null and b/doc/_static/banners/flectra_installing.jpg differ diff --git a/doc/_static/banners/flectra_javascript.jpg b/doc/_static/banners/flectra_javascript.jpg new file mode 100644 index 00000000..ce7673b7 Binary files /dev/null and b/doc/_static/banners/flectra_javascript.jpg differ diff --git a/doc/_static/banners/flectra_mixins_and_useful_classes.jpg b/doc/_static/banners/flectra_mixins_and_useful_classes.jpg new file mode 100644 index 00000000..b6eef8e3 Binary files /dev/null and b/doc/_static/banners/flectra_mixins_and_useful_classes.jpg differ diff --git a/doc/_static/banners/flectra_modules .jpg b/doc/_static/banners/flectra_modules .jpg new file mode 100644 index 00000000..d6d46caa Binary files /dev/null and b/doc/_static/banners/flectra_modules .jpg differ diff --git a/doc/_static/banners/flectra_modules.jpg b/doc/_static/banners/flectra_modules.jpg new file mode 100644 index 00000000..d6d46caa Binary files /dev/null and b/doc/_static/banners/flectra_modules.jpg differ diff --git a/doc/_static/banners/flectra_orm_api.jpg b/doc/_static/banners/flectra_orm_api.jpg new file mode 100644 index 00000000..19146cff Binary files /dev/null and b/doc/_static/banners/flectra_orm_api.jpg differ diff --git a/doc/_static/banners/flectra_qweb.jpg b/doc/_static/banners/flectra_qweb.jpg new file mode 100644 index 00000000..98db21c2 Binary files /dev/null and b/doc/_static/banners/flectra_qweb.jpg differ diff --git a/doc/_static/banners/flectra_qweb_reports.jpg b/doc/_static/banners/flectra_qweb_reports.jpg new file mode 100644 index 00000000..c281d922 Binary files /dev/null and b/doc/_static/banners/flectra_qweb_reports.jpg differ diff --git a/doc/_static/banners/flectra_security.jpg b/doc/_static/banners/flectra_security.jpg new file mode 100644 index 00000000..865b8422 Binary files /dev/null and b/doc/_static/banners/flectra_security.jpg differ diff --git a/doc/_static/banners/flectra_testing_modules.jpg b/doc/_static/banners/flectra_testing_modules.jpg new file mode 100644 index 00000000..df401eda Binary files /dev/null and b/doc/_static/banners/flectra_testing_modules.jpg differ diff --git a/doc/_static/banners/flectra_theme_tutorial.jpg b/doc/_static/banners/flectra_theme_tutorial.jpg new file mode 100644 index 00000000..a92022d6 Binary files /dev/null and b/doc/_static/banners/flectra_theme_tutorial.jpg differ diff --git a/doc/_static/banners/flectra_translating_modules.jpg b/doc/_static/banners/flectra_translating_modules.jpg new file mode 100644 index 00000000..0234b76e Binary files /dev/null and b/doc/_static/banners/flectra_translating_modules.jpg differ diff --git a/doc/_static/banners/flectra_views.jpg b/doc/_static/banners/flectra_views.jpg new file mode 100644 index 00000000..6c691fc8 Binary files /dev/null and b/doc/_static/banners/flectra_views.jpg differ diff --git a/doc/_static/banners/flectra_web_controllers.jpg b/doc/_static/banners/flectra_web_controllers.jpg new file mode 100644 index 00000000..fdec0b3b Binary files /dev/null and b/doc/_static/banners/flectra_web_controllers.jpg differ diff --git a/doc/_static/banners/iap.jpg b/doc/_static/banners/iap.jpg deleted file mode 100644 index 46102046..00000000 Binary files a/doc/_static/banners/iap.jpg and /dev/null differ diff --git a/doc/_static/banners/iap.small.jpg b/doc/_static/banners/iap.small.jpg deleted file mode 100644 index 6d17bda1..00000000 Binary files a/doc/_static/banners/iap.small.jpg and /dev/null differ diff --git a/doc/_static/banners/index.jpg b/doc/_static/banners/index.jpg deleted file mode 100644 index 2e57d937..00000000 Binary files a/doc/_static/banners/index.jpg and /dev/null differ diff --git a/doc/_static/banners/installing_odoo.jpg b/doc/_static/banners/installing_odoo.jpg deleted file mode 100644 index e94ca61c..00000000 Binary files a/doc/_static/banners/installing_odoo.jpg and /dev/null differ diff --git a/doc/_static/banners/installing_odoo.small.jpg b/doc/_static/banners/installing_odoo.small.jpg deleted file mode 100644 index f02b4fca..00000000 Binary files a/doc/_static/banners/installing_odoo.small.jpg and /dev/null differ diff --git a/doc/_static/banners/javascript.jpg b/doc/_static/banners/javascript.jpg deleted file mode 100644 index 9f71a98f..00000000 Binary files a/doc/_static/banners/javascript.jpg and /dev/null differ diff --git a/doc/_static/banners/javascript.small.jpg b/doc/_static/banners/javascript.small.jpg deleted file mode 100644 index 284b26ab..00000000 Binary files a/doc/_static/banners/javascript.small.jpg and /dev/null differ diff --git a/doc/_static/banners/localization.jpg b/doc/_static/banners/localization.jpg deleted file mode 100644 index 76587113..00000000 Binary files a/doc/_static/banners/localization.jpg and /dev/null differ diff --git a/doc/_static/banners/m_1.small.jpg b/doc/_static/banners/m_1.small.jpg deleted file mode 100644 index 09c6f69e..00000000 Binary files a/doc/_static/banners/m_1.small.jpg and /dev/null differ diff --git a/doc/_static/banners/m_2.small.jpg b/doc/_static/banners/m_2.small.jpg deleted file mode 100644 index 4cfc678a..00000000 Binary files a/doc/_static/banners/m_2.small.jpg and /dev/null differ diff --git a/doc/_static/banners/m_accounting.small.jpg b/doc/_static/banners/m_accounting.small.jpg deleted file mode 100644 index 41ae9b2f..00000000 Binary files a/doc/_static/banners/m_accounting.small.jpg and /dev/null differ diff --git a/doc/_static/banners/mixins.jpg b/doc/_static/banners/mixins.jpg deleted file mode 100644 index 0be9d04a..00000000 Binary files a/doc/_static/banners/mixins.jpg and /dev/null differ diff --git a/doc/_static/banners/mixins.small.jpg b/doc/_static/banners/mixins.small.jpg deleted file mode 100644 index 20411564..00000000 Binary files a/doc/_static/banners/mixins.small.jpg and /dev/null differ diff --git a/doc/_static/banners/mobile.jpg b/doc/_static/banners/mobile.jpg deleted file mode 100644 index 7f5365c3..00000000 Binary files a/doc/_static/banners/mobile.jpg and /dev/null differ diff --git a/doc/_static/banners/module.jpg b/doc/_static/banners/module.jpg deleted file mode 100644 index f422179b..00000000 Binary files a/doc/_static/banners/module.jpg and /dev/null differ diff --git a/doc/_static/banners/module.small.jpg b/doc/_static/banners/module.small.jpg deleted file mode 100644 index 2299f0eb..00000000 Binary files a/doc/_static/banners/module.small.jpg and /dev/null differ diff --git a/doc/_static/banners/odoo_guideline.jpg b/doc/_static/banners/odoo_guideline.jpg deleted file mode 100644 index eb16f7ef..00000000 Binary files a/doc/_static/banners/odoo_guideline.jpg and /dev/null differ diff --git a/doc/_static/banners/odoo_guideline.small.jpg b/doc/_static/banners/odoo_guideline.small.jpg deleted file mode 100644 index 2e6ad27c..00000000 Binary files a/doc/_static/banners/odoo_guideline.small.jpg and /dev/null differ diff --git a/doc/_static/banners/orm_api.jpg b/doc/_static/banners/orm_api.jpg deleted file mode 100644 index fd7ca9a9..00000000 Binary files a/doc/_static/banners/orm_api.jpg and /dev/null differ diff --git a/doc/_static/banners/orm_api.small.jpg b/doc/_static/banners/orm_api.small.jpg deleted file mode 100644 index 43f8b4bb..00000000 Binary files a/doc/_static/banners/orm_api.small.jpg and /dev/null differ diff --git a/doc/_static/banners/qweb.jpg b/doc/_static/banners/qweb.jpg deleted file mode 100644 index c60c9be6..00000000 Binary files a/doc/_static/banners/qweb.jpg and /dev/null differ diff --git a/doc/_static/banners/qweb.small.jpg b/doc/_static/banners/qweb.small.jpg deleted file mode 100644 index 23108875..00000000 Binary files a/doc/_static/banners/qweb.small.jpg and /dev/null differ diff --git a/doc/_static/banners/reports.jpg b/doc/_static/banners/reports.jpg deleted file mode 100644 index ddb64abc..00000000 Binary files a/doc/_static/banners/reports.jpg and /dev/null differ diff --git a/doc/_static/banners/reports.small.jpg b/doc/_static/banners/reports.small.jpg deleted file mode 100644 index b4ab3712..00000000 Binary files a/doc/_static/banners/reports.small.jpg and /dev/null differ diff --git a/doc/_static/banners/security.jpg b/doc/_static/banners/security.jpg deleted file mode 100644 index 77ce9ef4..00000000 Binary files a/doc/_static/banners/security.jpg and /dev/null differ diff --git a/doc/_static/banners/security.small.jpg b/doc/_static/banners/security.small.jpg deleted file mode 100644 index 9b03c81d..00000000 Binary files a/doc/_static/banners/security.small.jpg and /dev/null differ diff --git a/doc/_static/banners/testing_modules.jpg b/doc/_static/banners/testing_modules.jpg deleted file mode 100644 index 11637ab4..00000000 Binary files a/doc/_static/banners/testing_modules.jpg and /dev/null differ diff --git a/doc/_static/banners/testing_modules.small.jpg b/doc/_static/banners/testing_modules.small.jpg deleted file mode 100644 index e65a1483..00000000 Binary files a/doc/_static/banners/testing_modules.small.jpg and /dev/null differ diff --git a/doc/_static/banners/translate.jpg b/doc/_static/banners/translate.jpg deleted file mode 100644 index 0da70f5f..00000000 Binary files a/doc/_static/banners/translate.jpg and /dev/null differ diff --git a/doc/_static/banners/translate.small.jpg b/doc/_static/banners/translate.small.jpg deleted file mode 100644 index 93873d12..00000000 Binary files a/doc/_static/banners/translate.small.jpg and /dev/null differ diff --git a/doc/_static/banners/upgrade_api.jpg b/doc/_static/banners/upgrade_api.jpg deleted file mode 100644 index 58ca5dc4..00000000 Binary files a/doc/_static/banners/upgrade_api.jpg and /dev/null differ diff --git a/doc/_static/banners/views.jpg b/doc/_static/banners/views.jpg deleted file mode 100644 index 456a7c42..00000000 Binary files a/doc/_static/banners/views.jpg and /dev/null differ diff --git a/doc/_static/banners/views.small.jpg b/doc/_static/banners/views.small.jpg deleted file mode 100644 index 57a9a86c..00000000 Binary files a/doc/_static/banners/views.small.jpg and /dev/null differ diff --git a/doc/_static/banners/web_controllers.jpg b/doc/_static/banners/web_controllers.jpg deleted file mode 100644 index 7bd944c7..00000000 Binary files a/doc/_static/banners/web_controllers.jpg and /dev/null differ diff --git a/doc/_static/banners/web_controllers.small.jpg b/doc/_static/banners/web_controllers.small.jpg deleted file mode 100644 index 428ced27..00000000 Binary files a/doc/_static/banners/web_controllers.small.jpg and /dev/null differ diff --git a/doc/_static/banners/web_service_api.jpg b/doc/_static/banners/web_service_api.jpg deleted file mode 100644 index 579b55fb..00000000 Binary files a/doc/_static/banners/web_service_api.jpg and /dev/null differ diff --git a/doc/_static/banners/web_service_api.small.jpg b/doc/_static/banners/web_service_api.small.jpg deleted file mode 100644 index 949718e9..00000000 Binary files a/doc/_static/banners/web_service_api.small.jpg and /dev/null differ diff --git a/doc/conf.py b/doc/conf.py index 866a9105..8c1bbbe1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,7 +26,7 @@ extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.linkcode', 'autojsdoc.ext', - 'github_link', + 'gitlab_link', 'flectra_ext', 'html_domain', 'exercise_admonition', @@ -95,7 +95,7 @@ pygments_style = 'flectra' # a list of builtin themes. html_theme = 'flectra_ext' -flectra_cover_default = 'banners/installing_flectra.jpg' +flectra_cover_default = 'banners/flectra_modules.jpg' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -184,8 +184,8 @@ intersphinx_mapping = { 'django': ('https://django.readthedocs.org/en/latest/', None), } -github_user = 'flectra' -github_project = 'flectra' +gitlab_user = 'flectra-hq' +gitlab_project = 'flectra' # monkeypatch PHP lexer to not require `:: + external system):: >>> self.browse([7, 18, 12]) res.partner(7, 18, 12) @@ -493,94 +492,6 @@ Clearing caches can be performed using the :meth:`~flectra.api.Environment.invalidate_all` method of the :class:`~flectra.api.Environment` object. - -.. _reference/orm/oldapi: - -Compatibility between new API and old API -========================================= - -Flectra is currently transitioning from an older (less regular) API, it can be -necessary to manually bridge from one to the other manually: - -* RPC layers (both XML-RPC and JSON-RPC) are expressed in terms of the old - API, methods expressed purely in the new API are not available over RPC -* overridable methods may be called from older pieces of code still written - in the old API style - -The big differences between the old and new APIs are: - -* values of the :class:`~flectra.api.Environment` (cursor, user id and - context) are passed explicitly to methods instead -* record data (:attr:`~flectra.models.Model.ids`) are passed explicitly to - methods, and possibly not passed at all -* methods tend to work on lists of ids instead of recordsets - -By default, methods are assumed to use the new API style and are not callable -from the old API style. - -.. tip:: calls from the new API to the old API are bridged - :class: aphorism - - when using the new API style, calls to methods defined using the old API - are automatically converted on-the-fly, there should be no need to do - anything special:: - - >>> # method in the old API style - >>> def old_method(self, cr, uid, ids, context=None): - ... print ids - - >>> # method in the new API style - >>> def new_method(self): - ... # system automatically infers how to call the old-style - ... # method from the new-style method - ... self.old_method() - - >>> env[model].browse([1, 2, 3, 4]).new_method() - [1, 2, 3, 4] - -Two decorators can expose a new-style method to the old API: - -:func:`~flectra.api.model` - the method is exposed as not using ids, its recordset will generally be - empty. Its "old API" signature is ``cr, uid, *arguments, context``:: - - @api.model - def some_method(self, a_value): - pass - # can be called as - old_style_model.some_method(cr, uid, a_value, context=context) - -:func:`~flectra.api.multi` - the method is exposed as taking a list of ids (possibly empty), its - "old API" signature is ``cr, uid, ids, *arguments, context``:: - - @api.multi - def some_method(self, a_value): - pass - # can be called as - old_style_model.some_method(cr, uid, [id1, id2], a_value, context=context) - -Because new-style APIs tend to return recordsets and old-style APIs tend to -return lists of ids, there is also a decorator managing this: - -:func:`~flectra.api.returns` - the function is assumed to return a recordset, the first parameter should - be the name of the recordset's model or ``self`` (for the current model). - - No effect if the method is called in new API style, but transforms the - recordset into a list of ids when called from the old API style:: - - >>> @api.multi - ... @api.returns('self') - ... def some_method(self): - ... return self - >>> new_style_model = env['a.model'].browse(1, 2, 3) - >>> new_style_model.some_method() - a.model(1, 2, 3) - >>> old_style_model = pool['a.model'] - >>> old_style_model.some_method(cr, uid, [1, 2, 3], context=context) - [1, 2, 3] - .. _reference/orm/model: Model Reference @@ -1076,149 +987,3 @@ Domain criteria can be combined using logical operators in *prefix* form: (name is 'ABC') AND (language is NOT english) AND (country is Belgium OR Germany) - -Porting from the old API to the new API -======================================= - -* bare lists of ids are to be avoided in the new API, use recordsets instead -* methods still written in the old API should be automatically bridged by the - ORM, no need to switch to the old API, just call them as if they were a new - API method. See :ref:`reference/orm/oldapi/bridging` for more details. -* :meth:`~flectra.models.Model.search` returns a recordset, no point in e.g. - browsing its result -* ``fields.related`` and ``fields.function`` are replaced by using a normal - field type with either a ``related=`` or a ``compute=`` parameter -* :func:`~flectra.api.depends` on ``compute=`` methods **must be complete**, - it must list **all** the fields and sub-fields which the compute method - uses. It is better to have too many dependencies (will recompute the field - in cases where that is not needed) than not enough (will forget to recompute - the field and then values will be incorrect) -* **remove** all ``onchange`` methods on computed fields. Computed fields are - automatically re-computed when one of their dependencies is changed, and - that is used to auto-generate ``onchange`` by the client -* the decorators :func:`~flectra.api.model` and :func:`~flectra.api.multi` are - for bridging *when calling from the old API context*, for internal or pure - new-api (e.g. compute) they are useless -* remove :attr:`~flectra.models.Model._default`, replace by ``default=`` - parameter on corresponding fields -* if a field's ``string=`` is the titlecased version of the field name:: - - name = fields.Char(string="Name") - - it is useless and should be removed -* the ``multi=`` parameter does not do anything on new API fields use the same - ``compute=`` methods on all relevant fields for the same result -* provide ``compute=``, ``inverse=`` and ``search=`` methods by name (as a - string), this makes them overridable (removes the need for an intermediate - "trampoline" function) -* double check that all fields and methods have different names, there is no - warning in case of collision (because Python handles it before Flectra sees - anything) -* the normal new-api import is ``from flectra import fields, models``. If - compatibility decorators are necessary, use ``from flectra import api, - fields, models`` -* avoid the :func:`~flectra.api.one` decorator, it probably does not do what - you expect -* remove explicit definition of :attr:`~flectra.models.Model.create_uid`, - :attr:`~flectra.models.Model.create_date`, - :attr:`~flectra.models.Model.write_uid` and - :attr:`~flectra.models.Model.write_date` fields: they are now created as - regular "legitimate" fields, and can be read and written like any other - field out-of-the-box -* when straight conversion is impossible (semantics can not be bridged) or the - "old API" version is not desirable and could be improved for the new API, it - is possible to use completely different "old API" and "new API" - implementations for the same method name using :func:`~flectra.api.v7` and - :func:`~flectra.api.v8`. The method should first be defined using the - old-API style and decorated with :func:`~flectra.api.v7`, it should then be - re-defined using the exact same name but the new-API style and decorated - with :func:`~flectra.api.v8`. Calls from an old-API context will be - dispatched to the first implementation and calls from a new-API context will - be dispatched to the second implementation. One implementation can call (and - frequently does) call the other by switching context. - - .. danger:: using these decorators makes methods extremely difficult to - override and harder to understand and document -* uses of :attr:`~flectra.models.Model._columns` or - :attr:`~flectra.models.Model._all_columns` should be replaced by - :attr:`~flectra.models.Model._fields`, which provides access to instances of - new-style :class:`flectra.fields.Field` instances (rather than old-style - :class:`flectra.osv.fields._column`). - - Non-stored computed fields created using the new API style are *not* - available in :attr:`~flectra.models.Model._columns` and can only be - inspected through :attr:`~flectra.models.Model._fields` -* reassigning ``self`` in a method is probably unnecessary and may break - translation introspection -* :class:`~flectra.api.Environment` objects rely on some threadlocal state, - which has to be set up before using them. It is necessary to do so using the - :meth:`flectra.api.Environment.manage` context manager when trying to use - the new API in contexts where it hasn't been set up yet, such as new threads - or a Python interactive environment:: - - >>> from flectra import api, modules - >>> r = modules.registry.RegistryManager.get('test') - >>> cr = r.cursor() - >>> env = api.Environment(cr, 1, {}) - Traceback (most recent call last): - ... - AttributeError: environments - >>> with api.Environment.manage(): - ... env = api.Environment(cr, 1, {}) - ... print env['res.partner'].browse(1) - ... - res.partner(1,) - -.. _reference/orm/oldapi/bridging: - -Automatic bridging of old API methods -------------------------------------- - -When models are initialized, all methods are automatically scanned and bridged -if they look like models declared in the old API style. This bridging makes -them transparently callable from new-API-style methods. - -Methods are matched as "old-API style" if their second positional parameter -(after ``self``) is called either ``cr`` or ``cursor``. The system also -recognizes the third positional parameter being called ``uid`` or ``user`` and -the fourth being called ``id`` or ``ids``. It also recognizes the presence of -any parameter called ``context``. - -When calling such methods from a new API context, the system will -automatically fill matched parameters from the current -:class:`~flectra.api.Environment` (for :attr:`~flectra.api.Environment.cr`, -:attr:`~flectra.api.Environment.user` and -:attr:`~flectra.api.Environment.context`) or the current recordset (for ``id`` -and ``ids``). - -In the rare cases where it is necessary, the bridging can be customized by -decorating the old-style method: - -* disabling it entirely, by decorating a method with - :func:`~flectra.api.noguess` there will be no bridging and methods will be - called the exact same way from the new and old API styles -* defining the bridge explicitly, this is mostly for methods which are matched - incorrectly (because parameters are named in unexpected ways): - - :func:`~flectra.api.cr` - will automatically prepend the current cursor to explicitly provided - parameters, positionally - :func:`~flectra.api.cr_uid` - will automatically prepend the current cursor and user's id to explictly - provided parameters - :func:`~flectra.api.cr_uid_ids` - will automatically prepend the current cursor, user's id and recordset's - ids to explicitly provided parameters - :func:`~flectra.api.cr_uid_id` - will loop over the current recordset and call the method once for each - record, prepending the current cursor, user's id and record's id to - explicitly provided parameters. - - .. danger:: the result of this wrapper is *always a list* when calling - from a new-API context - - All of these methods have a ``_context``-suffixed version - (e.g. :func:`~flectra.api.cr_uid_context`) which also passes the current - context *by keyword*. -* dual implementations using :func:`~flectra.api.v7` and - :func:`~flectra.api.v8` will be ignored as they provide their own "bridging" diff --git a/doc/reference/qweb.rst b/doc/reference/qweb.rst index 721a2cdf..5a0ba85f 100644 --- a/doc/reference/qweb.rst +++ b/doc/reference/qweb.rst @@ -1,4 +1,4 @@ -:banner: banners/qweb.jpg +:banner: banners/flectra_qweb.jpg .. highlight:: xml diff --git a/doc/reference/reports.rst b/doc/reference/reports.rst index a642798f..237f5ebe 100644 --- a/doc/reference/reports.rst +++ b/doc/reference/reports.rst @@ -1,4 +1,4 @@ -:banner: banners/reports.jpg +:banner: banners/flectra_qweb_reports.jpg .. highlight:: xml @@ -290,16 +290,18 @@ the function ``render_html`` and pass objects in the ``docargs`` dictionary: class ParticularReport(models.AbstractModel): _name = 'report.module.report_name' + @api.model - def render_html(self, docids, data=None): - report_obj = self.env['report'] - report = report_obj._get_report_from_name('module.report_name') - docargs = { - 'doc_ids': docids, - 'doc_model': report.model, - 'docs': self, + def get_report_values(self, docids, data=None): + self.model = self.env.context.get('active_model') + docs = self.env[self.model].browse(self.env.context.get('active_ids', [])) + + return { + 'doc_ids': self.ids, + 'doc_model': self.model, + 'data': data['form'], + 'docs': docs } - return report_obj.render('module.report_name', docargs) Reports are web pages ===================== diff --git a/doc/reference/security.rst b/doc/reference/security.rst index bf7524df..995a1eca 100644 --- a/doc/reference/security.rst +++ b/doc/reference/security.rst @@ -1,4 +1,4 @@ -:banner: banners/security.jpg +:banner: banners/flectra_security.jpg .. _reference/security: diff --git a/doc/reference/testing.rst b/doc/reference/testing.rst index 45ac60a0..65bbfbec 100644 --- a/doc/reference/testing.rst +++ b/doc/reference/testing.rst @@ -1,4 +1,4 @@ -:banner: banners/testing_modules.jpg +:banner: banners/flectra_testing_modules.jpg .. _reference/testing: diff --git a/doc/reference/translations.rst b/doc/reference/translations.rst index d22cb3b3..4a46d853 100644 --- a/doc/reference/translations.rst +++ b/doc/reference/translations.rst @@ -1,4 +1,4 @@ -:banner: banners/translate.jpg +:banner: banners/flectra_translating_modules.jpg .. _reference/translations: diff --git a/doc/reference/views.rst b/doc/reference/views.rst index eadcf974..0c99f9f9 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -1,4 +1,4 @@ -:banner: banners/views.jpg +:banner: banners/flectra_views.jpg .. highlight:: xml .. _reference/views: diff --git a/doc/setup/deploy.rst b/doc/setup/deploy.rst index eef0bcea..727e9c21 100644 --- a/doc/setup/deploy.rst +++ b/doc/setup/deploy.rst @@ -1,4 +1,4 @@ -:banner: banners/deploying_flectra.jpg +:banner: banners/flectra_deploying.jpg ================= Deploying Flectra @@ -278,7 +278,7 @@ in ``/etc/nginx/sites-enabled/flectra.conf`` set: #flectra server upstream flectra { - server 127.0.0.1:8069; + server 127.0.0.1:7073; } upstream flectrachat { server 127.0.0.1:8072; @@ -287,13 +287,13 @@ in ``/etc/nginx/sites-enabled/flectra.conf`` set: # http -> https server { listen 80; - server_name flectra.mycompany.com; + server_name flectrahq.mycompany.com; rewrite ^(.*) https://$host$1 permanent; } server { listen 443; - server_name flectra.mycompany.com; + server_name flectrahq.mycompany.com; proxy_read_timeout 720s; proxy_connect_timeout 720s; proxy_send_timeout 720s; @@ -320,10 +320,10 @@ in ``/etc/nginx/sites-enabled/flectra.conf`` set: # Redirect requests to flectra backend server location / { proxy_redirect off; - proxy_pass http://flectra; + proxy_pass http://flectrahq; } location /longpolling { - proxy_pass http://flectrachat; + proxy_pass http://flectrahqchat; } # common gzip @@ -441,7 +441,7 @@ security-related topics: - Keep installations updated by regularly installing the latest builds, either via GitHub or by downloading the latest version from - https://www.flectra.com/page/download or http://nightly.flectra.com + https://flectrahq.com/download - Configure your server in multi-process mode with proper limits matching your typical usage (memory/CPU/timeouts). See also :ref:`builtin_server`. diff --git a/doc/setup/install.rst b/doc/setup/install.rst index 509c509d..3900243c 100644 --- a/doc/setup/install.rst +++ b/doc/setup/install.rst @@ -1,4 +1,4 @@ -:banner: banners/installing_flectra.jpg +:banner: banners/flectra_installing.jpg .. _setup/install: @@ -24,30 +24,6 @@ This documents attempts to describe most of the installation options. If you usually use docker_ for development or deployment, an official docker_ base image is available. -.. _setup/install/demo: - -Demo -====== - -To simply get a quick idea of Flectra, demo_ instances are available. They are -shared instances which only live for a few hours, and can be used to browse -around and try things out with no commitment. - -Demo_ instances require no local installation, just a web browser. - -SaaS ----- - -Trivial to start with, fully managed and migrated by Flectra S.A., Flectra's SaaS_ -provides private instances and starts out free. It can be used to discover and -test Flectra and do non-code customizations (i.e. incompatible with custom modules -or the Flectra Apps Store) without having to install it locally. - -Can be used for both testing Flectra and long-term production use. - -Like demo_ instances, SaaS_ instances require no local installation, a web -browser is sufficient. - .. _setup/install/packaged: Packaged installers @@ -82,7 +58,7 @@ Linux Debian/Ubuntu ''''''''''''' -Flectra 1.0 'deb' package currently supports `Debian Stretch`_, `Ubuntu Xenial`_, +Flectrahq 'deb' package currently supports `Debian Stretch`_, `Ubuntu Xenial`_, `Ubuntu Zesty`_ and `Ubuntu Artful`_. Prepare @@ -106,14 +82,14 @@ in the archive section. Repository ^^^^^^^^^^ -Flectra S.A. provides a repository that can be used with Debian and Ubuntu +Flectra provides a repository that can be used with Debian and Ubuntu distributions. It can be used to install Flectra by executing the following commands as root: .. code-block:: console - # wget -O - https://nightly.flectra.com/flectra.key | apt-key add - - # echo "deb http://nightly.flectra.com/11.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/flectra.list + # wget -O - https://flectrahq.com/flectra.key | apt-key add - + # echo "deb https://download.flectrahq.com/1.0/pub/deb/ ./" >> /etc/apt/sources.list.d/flectra.list # apt-get update && apt-get install flectra You can then use the usual ``apt-get upgrade`` command to keep your installation up-to-date. @@ -173,7 +149,7 @@ If you need this feature, you can install the python module like this: Fedora '''''' -Flectra 1.0 'rpm' package supports Fedora 26. +FlectraHQ 'rpm' package supports Fedora 26. As of 2017, CentOS does not have the minimum Python requirements (3.5) for Flectra 1.0. @@ -198,7 +174,7 @@ in the archive section. Repository ^^^^^^^^^^ -Flectra S.A. provides a repository that can be used with the Fedora distibutions. +Flectra provides a repository that can be used with the Fedora distibutions. It can be used to install Flectra Community Edition by executing the following commands: @@ -523,7 +499,6 @@ Docker The full documentation on how to use Flectra with Docker can be found on the offcial Flectra `docker image `_ page. -.. _demo: https://demo.flectra.com .. _docker: https://www.docker.com .. _Debian Stretch: https://www.debian.org/releases/stretch/ .. _Ubuntu Xenial: http://releases.ubuntu.com/16.04/ diff --git a/doc/webservices/flectra.rst b/doc/webservices/flectra.rst index 01963efa..b396009e 100644 --- a/doc/webservices/flectra.rst +++ b/doc/webservices/flectra.rst @@ -1,4 +1,4 @@ -:banner: banners/web_service_api.jpg +:banner: banners/flectra_external_api.jpg :types: api diff --git a/doc/webservices/localization.rst b/doc/webservices/localization.rst index d7cc6c78..881af6b6 100644 --- a/doc/webservices/localization.rst +++ b/doc/webservices/localization.rst @@ -1,4 +1,4 @@ -:banner: banners/localization.jpg +:banner: banners/flectra_creating_localization.jpg ======================= Creating a Localization