Author: |
Tecnativa, Odoo Community Association (OCA) |
License: |
LGPL-3 |
Branch: |
13.0-add-sale_pwa_cache |
Repository: |
Tecnativa/sale-workflow |
Dependencies: |
base_setup,
product_pwa_cache,
sale_management,
web_pwa_cache,
web_pwa_oca,
and
web_widget_one2many_product_picker |
Languages: |
HTML (378, 23.5%),
JavaScript (217, 13.5%),
PO File (137, 8.5%),
Python (187, 11.6%),
XML (598, 37.2%),
and
reStructuredText (91, 5.7%) |
Other branches: |
12.0-add-sale_pwa_cache,
and
13.0-temp-sale_pwa_cache |
<h1 class="title">Sale PWA Cache</h1>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/13.0/sale_pwa_cache"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_pwa_cache"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/167/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Odoo Client Proxy</p>
<p>This module is used to add support to cache POST/GET requests. Can handle Odoo requests and responses to give an offline experience.</p>
<a name="cache-types"></a>
<h2>Cache Types</h2>
<ul class="simple">
<li>Model -> Gets records, related actions, views, default values and filters</li>
<li>Client QWeb -> Gets indepent client views (used by widgets)</li>
<li>function -> Cache function calls</li>
<li>Onchange -> Cache onchange calls</li>
<li>Onchange with formula -> Cache onchange calls using formulas</li>
<li>Post -> Cache indepent POST requests (used by widgets)</li>
<li>Get -> Cache indepent GET requests</li>
</ul>
<a name="how-works"></a>
<h2>How Works</h2>
<p>The module handle two modes:</p>
<ul class="simple">
<li>Normal: Runs Odoo as normal</li>
<li><dl class="first docutils">
<dt>Standalone: When the app starts you will request to set the mode (offline or online).</dt>
<dd><ul class="first last">
<li>Online: All requests except Create, Update and Delete operations goes from cache first, if not found, tries from network.</li>
<li>Offline: All requests goes from/to cache</li>
</ul>
</dd>
</dl>
</li>
</ul>
<p>When the user change to offline mode the module will start to prefetch all data and only recent records will be requested (write_date > last_cache_date)</p>
<p>The standalone mode is available only when install the PWA.</p>
<a name="to-developers"></a>
<h2>To Developers</h2>
<p>'onchange' prefetching works in a generic way... so, it uses the "main" form view to know the involved fields. If you trigger an onchange than uses a
field thas is not present in this view, you will don't get any change related with the field.</p>
<p>If you want trigger an 'onchange' with</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#known-issues-roadmap" id="id1">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a></li>
</ul>
</div>
<a name="known-issues-roadmap"></a>
<h3><a class="toc-backref" href="#id1">Known issues / Roadmap</a></h3>
<ul class="simple">
<li>This doesn't take into account different prices in pricelists according the
quantities.</li>
</ul>
<a name="bug-tracker"></a>
<h3><a class="toc-backref" href="#id2">Bug Tracker</a></h3>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/issues">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="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_pwa_cache%0Aversion:%2013.0%0A%0A**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>
<h3><a class="toc-backref" href="#id3">Credits</a></h3>
<a name="authors"></a>
<h2>Authors</h2>
<ul class="simple">
<li>Tecnativa</li>
</ul>
<a name="contributors"></a>
<h2>Contributors</h2>
<ul>
<li><p class="first"><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</p>
<blockquote>
<ul class="simple">
<li>Alexandre Díaz</li>
<li>Pedro M. Baeza</li>
</ul>
</blockquote>
</li>
</ul>
<a name="maintainers"></a>
<h2>Maintainers</h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></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="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/Tardo"><img alt="Tardo" src="https://github.com/Tardo.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/13.0/sale_pwa_cache">OCA/sale-workflow</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>