Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ addon | version | maintainers | summary
[sale_stock_release_channel_partner_by_date](sale_stock_release_channel_partner_by_date/) | 16.0.1.1.0 | <a href='https://github.com/sebalix'><img src='https://github.com/sebalix.png' width='32' height='32' style='border-radius:50%;' alt='sebalix'/></a> | Release channels integration with Sales
[sale_stock_release_channel_partner_by_date_delivery](sale_stock_release_channel_partner_by_date_delivery/) | 16.0.1.1.1 | <a href='https://github.com/sebalix'><img src='https://github.com/sebalix.png' width='32' height='32' style='border-radius:50%;' alt='sebalix'/></a> | Filters channels on sales based on selected carrier.
[shopfloor](shopfloor/) | 16.0.2.16.1 | <a href='https://github.com/guewen'><img src='https://github.com/guewen.png' width='32' height='32' style='border-radius:50%;' alt='guewen'/></a> <a href='https://github.com/simahawk'><img src='https://github.com/simahawk.png' width='32' height='32' style='border-radius:50%;' alt='simahawk'/></a> <a href='https://github.com/sebalix'><img src='https://github.com/sebalix.png' width='32' height='32' style='border-radius:50%;' alt='sebalix'/></a> | manage warehouse operations with barcode scanners
[shopfloor_base](shopfloor_base/) | 16.0.1.2.0 | <a href='https://github.com/guewen'><img src='https://github.com/guewen.png' width='32' height='32' style='border-radius:50%;' alt='guewen'/></a> <a href='https://github.com/simahawk'><img src='https://github.com/simahawk.png' width='32' height='32' style='border-radius:50%;' alt='simahawk'/></a> <a href='https://github.com/sebalix'><img src='https://github.com/sebalix.png' width='32' height='32' style='border-radius:50%;' alt='sebalix'/></a> | Core module for creating mobile apps
[shopfloor_base](shopfloor_base/) | 16.0.1.2.1 | <a href='https://github.com/guewen'><img src='https://github.com/guewen.png' width='32' height='32' style='border-radius:50%;' alt='guewen'/></a> <a href='https://github.com/simahawk'><img src='https://github.com/simahawk.png' width='32' height='32' style='border-radius:50%;' alt='simahawk'/></a> <a href='https://github.com/sebalix'><img src='https://github.com/sebalix.png' width='32' height='32' style='border-radius:50%;' alt='sebalix'/></a> | Core module for creating mobile apps
[shopfloor_batch_automatic_creation](shopfloor_batch_automatic_creation/) | 16.0.1.1.0 | <a href='https://github.com/guewen'><img src='https://github.com/guewen.png' width='32' height='32' style='border-radius:50%;' alt='guewen'/></a> | Create batch transfers for Cluster Picking
[shopfloor_mobile](shopfloor_mobile/) | 16.0.1.4.1 | <a href='https://github.com/simahawk'><img src='https://github.com/simahawk.png' width='32' height='32' style='border-radius:50%;' alt='simahawk'/></a> | Mobile frontend for WMS Shopfloor app
[shopfloor_mobile_base](shopfloor_mobile_base/) | 16.0.1.2.0 | <a href='https://github.com/simahawk'><img src='https://github.com/simahawk.png' width='32' height='32' style='border-radius:50%;' alt='simahawk'/></a> | Mobile frontend for WMS Shopfloor app
Expand Down
8 changes: 6 additions & 2 deletions shopfloor_base/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==============
Shopfloor Base
==============
Expand All @@ -7,13 +11,13 @@ Shopfloor Base
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:20bc1f30d736fb59db86e1756b980c66dcc273077b510bd312ac1ff1e345a85d
!! source digest: sha256:298af3b443e7b1f7b510c4a693347ff589b516793b8f009ad4409d1ef0690515
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github
Expand Down
2 changes: 1 addition & 1 deletion shopfloor_base/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "Shopfloor Base",
"summary": "Core module for creating mobile apps",
"version": "16.0.1.2.0",
"version": "16.0.1.2.1",
"development_status": "Beta",
"category": "Inventory",
"website": "https://github.com/OCA/wms",
Expand Down
3 changes: 2 additions & 1 deletion shopfloor_base/models/shopfloor_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ def _prepare_endpoint_rules(self, options=None):

def _registered_endpoint_rule_keys(self):
# `endpoint.route.sync.mixin` api
return [x[0] for x in self._registered_routes()]
# TODO: add tests
return [x.key for x in self._registered_routes()]

def _register_hook(self):
super()._register_hook()
Expand Down
48 changes: 27 additions & 21 deletions shopfloor_base/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Shopfloor Base</title>
<title>README.rst</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,16 +360,21 @@
</style>
</head>
<body>
<div class="document" id="shopfloor-base">
<h1 class="title">Shopfloor Base</h1>
<div class="document">


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="shopfloor-base">
<h1>Shopfloor Base</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:20bc1f30d736fb59db86e1756b980c66dcc273077b510bd312ac1ff1e345a85d
!! source digest: sha256:298af3b443e7b1f7b510c4a693347ff589b516793b8f009ad4409d1ef0690515
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/wms/tree/16.0/shopfloor_base"><img alt="OCA/wms" src="https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_base"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/wms&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/wms/tree/16.0/shopfloor_base"><img alt="OCA/wms" src="https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_base"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/wms&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Shopfloor is a barcode scanner application.</p>
<p>This module provides REST APIs to support scenario. It needs a frontend
to consume the backend APIs and provide screens for users on barcode devices.
Expand Down Expand Up @@ -402,20 +407,20 @@ <h1 class="title">Shopfloor Base</h1>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
<div class="section" id="shopfloor-config-menu">
<h2><a class="toc-backref" href="#toc-entry-2">Shopfloor config menu</a></h2>
<h3><a class="toc-backref" href="#toc-entry-2">Shopfloor config menu</a></h3>
<p>In the main menu (or home screen) click on “Shopfloor”.</p>
</div>
<div class="section" id="profiles">
<h2><a class="toc-backref" href="#toc-entry-3">Profiles</a></h2>
<h3><a class="toc-backref" href="#toc-entry-3">Profiles</a></h3>
<p>In Shopfloor / Profiles.</p>
<p>The profiles are used to restrict which menus are shown on the frontend
application. When a user logs in the scanner application, they have to
select their profile, so the correct menus are shown.</p>
</div>
<div class="section" id="menus">
<h2><a class="toc-backref" href="#toc-entry-4">Menus</a></h2>
<h3><a class="toc-backref" href="#toc-entry-4">Menus</a></h3>
<p>In Shopfloor / Menus.</p>
<p>The menus are displayed on the frontend application.
The configuration may come from the menu itself
Expand All @@ -425,15 +430,15 @@ <h2><a class="toc-backref" href="#toc-entry-4">Menus</a></h2>
<p>Some scenario may have additional options.</p>
</div>
<div class="section" id="scenario">
<h2><a class="toc-backref" href="#toc-entry-5">Scenario</a></h2>
<h3><a class="toc-backref" href="#toc-entry-5">Scenario</a></h3>
<p>In Shopfloor / Scenario.</p>
<p>A Scenario represents a flow (or more basically “something to do” with the app.
Each scenario must have a name and a unique key.
The key must match a registered shopfloor service component.</p>
</div>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-6">Usage</a></h1>
<h2><a class="toc-backref" href="#toc-entry-6">Usage</a></h2>
<p>An API key is created in the Demo data (for development), using
the Demo user. The key to use in the HTTP header <tt class="docutils literal"><span class="pre">API-KEY</span></tt> is: 72B044F7AC780DAC</p>
<p>Curl example:</p>
Expand All @@ -442,39 +447,39 @@ <h1><a class="toc-backref" href="#toc-entry-6">Usage</a></h1>
</pre>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-7">Known issues / Roadmap</a></h1>
<h2><a class="toc-backref" href="#toc-entry-7">Known issues / Roadmap</a></h2>
<ul class="simple">
<li>improve documentation</li>
<li>change shopfloor.scenario.key to selection? See comment in model</li>
</ul>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#toc-entry-8">Changelog</a></h1>
<h2><a class="toc-backref" href="#toc-entry-8">Changelog</a></h2>
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#toc-entry-9">13.0.1.0.0</a></h2>
<h3><a class="toc-backref" href="#toc-entry-9">13.0.1.0.0</a></h3>
<p>First official version.</p>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-10">Bug Tracker</a></h1>
<h2><a class="toc-backref" href="#toc-entry-10">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/wms/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 to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/wms/issues/new?body=module:%20shopfloor_base%0Aversion:%2016.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>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-11">Credits</a></h1>
<h2><a class="toc-backref" href="#toc-entry-11">Credits</a></h2>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-12">Authors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-12">Authors</a></h3>
<ul class="simple">
<li>Camptocamp</li>
<li>BCIM</li>
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-13">Contributors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-13">Contributors</a></h3>
<ul class="simple">
<li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li>
<li>Simone Orsi &lt;<a class="reference external" href="mailto:simahawk&#64;gmail.com">simahawk&#64;gmail.com</a>&gt;</li>
Expand All @@ -488,14 +493,14 @@ <h2><a class="toc-backref" href="#toc-entry-13">Contributors</a></h2>
</ul>
</div>
<div class="section" id="design">
<h2><a class="toc-backref" href="#toc-entry-14">Design</a></h2>
<h3><a class="toc-backref" href="#toc-entry-14">Design</a></h3>
<ul class="simple">
<li>Joël Grand-Guillaume &lt;<a class="reference external" href="mailto:joel.grandguillaume&#64;camptocamp.com">joel.grandguillaume&#64;camptocamp.com</a>&gt;</li>
<li>Jacques-Etienne Baudoux &lt;<a class="reference external" href="mailto:je&#64;bcim.be">je&#64;bcim.be</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-15">Other credits</a></h2>
<h3><a class="toc-backref" href="#toc-entry-15">Other credits</a></h3>
<p><strong>Financial support</strong></p>
<ul class="simple">
<li>Cosanum</li>
Expand All @@ -509,7 +514,7 @@ <h2><a class="toc-backref" href="#toc-entry-15">Other credits</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-16">Maintainers</a></h2>
<h3><a class="toc-backref" href="#toc-entry-16">Maintainers</a></h3>
<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" />
Expand All @@ -524,5 +529,6 @@ <h2><a class="toc-backref" href="#toc-entry-16">Maintainers</a></h2>
</div>
</div>
</div>
</div>
</body>
</html>
12 changes: 10 additions & 2 deletions shopfloor_base/tests/test_shopfloor_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ def _test_registered_routes(self, rec):
),
"method_name": "_process_endpoint",
}
self.assertEqual(rule.handler_options, expected_handler_opts)
for k, v in expected_handler_opts.items():
self.assertEqual(
rule.handler_options[k],
v,
f"{k} differs: {rule.handler_options[k]} != {v}",
)
_check[rule.route] = set(rule.routing["methods"])
expected = {
# TODO: review methods
Expand Down Expand Up @@ -145,7 +150,10 @@ def test_make_app_info(self):
)

def test_make_app_manifest(self):
param = "http://localhost:8069"
self.env["ir.config_parameter"].sudo().set_param(
"web.base.url", "http://foo.com"
)
param = "http://foo.com"
manifest = self.shopfloor_app._make_app_manifest()
expected = {
"name": self.shopfloor_app.name,
Expand Down
Loading