Search 1.9 billion lines of Odoo code on GitHub


Author: TAKOBI, Tecnativa, Odoo Community Association (OCA)
License: LGPL-3
Branch: 15.0
Repository: AITIC/web
Dependencies: base_setup, mail, and web
Languages: HTML (443, 29.4%), JavaScript (130, 8.6%), PO File (198, 13.2%), Python (395, 26.2%), SVG (67, 4.5%), XML (98, 6.5%), and reStructuredText (174, 11.6%)
Other branches: 12.0, 13.0, 13.0_sh, and 14.0
Other repositories: ACCOMODATA-BVBA/web, AntoniRomera/web, AyoubZahid/web, BADEP/web, ChanFeei/web, Change2improve/web, Darknroses/web, Digital5-Odoo/web, Dobtor-OCA/web, ELMARDI0107/web, ERPLibre/web, ForgeFlow/web, GSLabIt/web, Gabinete-Digital/web, GlodoUK/oca-web, HirenDangar/web, Ingeos/web, Jarsa/web, KENLYLST/web, KKamaa/web, KonaERP/web, LevelPrime/web, Martronic-SA/web, MaxyMoos/web, MindAndGo/web, NL66278/web, NeatNerdPrime/web, NextERP-Romania/web, OCA-MUK/web, OCA/web, SequarSrl/web, SeuMarco/web, SimoRubi/web, SirumTME/web, StefanRijnhart/web, Studio73/web, TDu/web, TRESCLOUD/web, Tecnativa/web, VanMoof/web, Vauxoo/web, WilldooIT/web, aaltinisik/web, acsone/web, adhoc-dev/web, agrista/odoo-web, akloptim/web, akretion/web, alan80080/web, androettop/web, anhvu-sg/web, ansinaesmejor/web, antilhue/web, arkyalpyae/web, asphaltzipper/web, aurestic/web, bizzappdev/web, blooparksystems/web, brain-tec/web, brian10048/web, bud-e/web, camptocamp/web, coopiteasy/web, diggy128/web, dingguijin/web, druidoo-dev/web, dvalladares66/web, eLBati/web, ecosoft-odoo/web, ehsu0407/web, enmasys/web, essamcis/web, factorlibre/web, fallewi/web, fjouatte/web, focusate/web-oca, foramaktiv/web, gab-net/web, gastonfeng/web, gfcapalbo/web, grindtildeath/web, gtorresemmanuel/web, hbrunn/web, i-vyshnevska/web, ideaspositivas-group/web, initOS/web, jans23/web, janverb/web, jeroen7s/web, khanvuthy88/web, kkasing11/web, kmee/web, kos94ok-3D/web, leanhtuan1996/web, legalsylvain/web, lideritjnma/web, lubw/web, mashanz/web, mhadi12/web, mharenz/web, mochammadrizanaufal/web, modoolar/oca-web, mohamedhagag/web, multidadosti-erp/web, nikul-serpentcs/web, noorealam96/web, odoogap/web, onurugur/web, onyanga/web, paraita/web, petrus-v/web, phuctranerp/web, popsolutions/web, praxigento/oca-web, qgzhiguo/web, richard-willdooit/web, robertsvx27/web, rven/web, sahil-navadiya/web, samsagaz/web, sergiocorato/web, sodexis/web, solvosci/web, steingabelgaard/web, sudhir-erpharbor/web, sunflowerit/web, syci/web, takinobori/oca-web, tarteo/web, tegin/web, tirix/web, tirma-sa/web, tpa-odoo/web, trevi-software/web, trionoharjadi/web, trobz/web, tvtma/web, unitek-solusi/OCA-web, ursais/web, vasiljevicmarko/web, versada/web, vertelab/web, vialaurea/OCA-web, vnsofthe/web, wahello/oca-web, xcgd/web, zarumaru/web, zcyuefan/web, and zeroheure/web

<h1 class="title">Progressive web application</h1> <p><a class="reference external" href=""><img alt="Beta" src="" /></a> <a class="reference external" href=""><img alt="License: LGPL-3" src="" /></a> <a class="reference external" href=""><img alt="OCA/web" src="" /></a> <a class="reference external" href=""><img alt="Translate me on Weblate" src="" /></a> <a class="reference external" href=""><img alt="Try me on Runbot" src="" /></a></p> <p>Make Odoo an installable Progressive Web Application.</p> <p>Progressive Web Apps provide an installable, app-like experience on desktop and mobile that are built and delivered directly via the web. They're web apps that are fast and reliable. And most importantly, they're web apps that work in any browser. If you're building a web app today, you're already on the path towards building a Progressive Web App.</p> <ul class="simple"> <li>Developers Info.</li> </ul> <p>The service worker is contructed using 'Odoo Class' to have the same class inheritance behaviour that in the 'user pages'. Be noticed that 'Odoo Bootstrap' is not supported so, you can't use 'require' here.</p> <p>All service worker content can be found in 'static/src/js/worker'. The management between 'user pages' and service worker is done in 'pwa_manager.js'.</p> <p>The purpose of this module is give a base to make PWA applications.</p> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#installation" id="id1">Installation</a></li> <li><a class="reference internal" href="#configuration" id="id2">Configuration</a></li> <li><a class="reference internal" href="#usage" id="id3">Usage</a></li> <li><a class="reference internal" href="#known-issues-roadmap" id="id4">Known issues / Roadmap</a></li> <li><a class="reference internal" href="#bug-tracker" id="id5">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id6">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id7">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id8">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li> </ul> </li> </ul> </div> <a name="installation"></a> <h2><a class="toc-backref" href="#id1">Installation</a></h2> <p>After having installed this module, browsing your odoo on mobile you will be able to install it as a PWA.</p> <p>It is strongly recommended to use this module with a responsive layout, like the one provided by web_responsive.</p> <p>This module is intended to be used by Odoo back-end users (employees).</p> <p>When a Progressive Web App is installed, it looks and behaves like all of the other installed apps. It launches from the same place that other apps launch. It runs in an app without an address bar or other browser UI. And like all other installed apps, it's a top level app in the task switcher.</p> <p>In Chrome, a Progressive Web App can either be installed through the three-dot context menu.</p> <p>In case you previously installed <cite>web_pwa</cite>, run the following steps with <cite>odoo shell</cite>, after having installed <cite>openupgradelib</cite>:</p> <pre class="doctest-block"> &gt;&gt;&gt; from openupgradelib import openupgrade &gt;&gt;&gt; openupgrade.update_module_names(, [('web_pwa', 'web_pwa_oca')], merge_modules=False) &gt;&gt;&gt; </pre> <a name="configuration"></a> <h2><a class="toc-backref" href="#id2">Configuration</a></h2> <p>This module allows you to set the following parameters under settings to customize the appearance of the application</p> <ul class="simple"> <li>PWA Name (defaults to &quot;Odoo PWA&quot;)</li> <li>PWA Short Name (defaults to &quot;Odoo PWA&quot;)</li> <li>PWA Icon (<strong>SVG</strong>) (defaults to &quot;/web_pwa_oca/static/img/icons/odoo-logo.svg&quot;)</li> </ul> <p>To configure your PWA:</p> <ol class="arabic simple"> <li>Go to <strong>Settings &gt; General Settings &gt; Progressive Web App</strong>.</li> <li>Set the parameters (<em>Note:</em> Icon <strong>must be a SVG file</strong>)</li> <li><strong>Save</strong></li> </ol> <a name="usage"></a> <h2><a class="toc-backref" href="#id3">Usage</a></h2> <p>To use your PWA:</p> <ol class="arabic simple"> <li>Open the Odoo web app using a supported browser (See <a class="reference external" href=""></a>)</li> <li>Open the browser options</li> <li>Click on 'Add to Home screen' (or 'Install' in other browsers)</li> </ol> <p>** Maybe you need refresh the page to load the service worker after using the option.</p> <a name="known-issues-roadmap"></a> <h2><a class="toc-backref" href="#id4">Known issues / Roadmap</a></h2> <ul> <li><p class="first">Integrate <a class="reference external" href="">Notification API</a></p> </li> <li><p class="first">Integrate <a class="reference external" href="">Web Share API</a></p> </li> <li><p class="first">Create <code>portal_pwa</code> module, intended to be used by front-end users (customers, suppliers...)</p> </li> <li><p class="first">Current <em>John Resig's inheritance</em> implementation doesn't support <code>async</code> functions because <code>this._super</code> can't be called inside a promise. So we need to use the following workaround:</p> <ul> <li><p class="first">Natural 'async/await' example (This breaks &quot;_super&quot; call):</p> <pre> <code lang="javascript">var MyClass = OdooClass.extend({ myFunc: async function() { const mydata = await await stuff... return mydata; } });</code> </pre> </li> <li><p class="first">Same code with the workaround:</p> <pre> <code lang="javascript">var MyClass = OdooClass.extend({ myFunc: function() { return new Promise(async (resolve, reject) =&gt; { const mydata = await await stuff... return resolve(mydata); }); } });</code> </pre> </li> </ul> </li> <li><p class="first">Fix issue when trying to run in localhost with several databases. The browser doesn't send the cookie and web manifest returns 404.</p> </li> <li><p class="first">Firefox can't detect 'standalone' mode. See <a class="reference external" href=""></a></p> </li> <li><p class="first">Firefox disable service worker in private mode. See <a class="reference external" href=""></a></p> </li> </ul> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id5">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id6">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id7">Authors</a></h3> <ul class="simple"> <li>TAKOBI</li> <li>Tecnativa</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id8">Contributors</a></h3> <ul class="simple"> <li><a class="reference external" href="">TAKOBI</a>:<ul> <li>Lorenzo Battistini</li> </ul> </li> <li><a class="reference external" href="">Tecnativa</a>:<ul> <li>Alexandre D. Díaz</li> <li>João Marques</li> <li>Sergio Teruel</li> </ul> </li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id9">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href=""><img alt="Odoo Community Association" src="" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>Current <a class="reference external" href="">maintainer</a>:</p> <p><a class="reference external" href=""><img alt="eLBati" src="" /></a></p> <p>This module is part of the <a class="reference external" href="">OCA/web</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href=""></a>.</p>