What it does
Technical module, a bridge that closes an access-rights gap opened by core repair on
stock.picking, stock.picking.type and stock.lot.
Core repair adds fields to those models that read repair.order (repair_ids and
nbr_repairs on transfers, the four count_repair_* counters on operation types,
repair_line_ids, repair_part_count, in_repair_count and repaired_count on lots)
without a groups= restriction, while repair.order itself is only readable by
stock.group_stock_user. Any user who can read a transfer, an operation type or a lot but is
not in that group (for instance an Accounting, Portal, Fleet, Quality or per-warehouse user)
hits an AccessError on a read of those records, because resolving those fields checks
access on repair.order. The Inventory overview counts repair orders for the dashboard graph
of every operation type, whoever reads it.
This module re-declares those fields with groups='stock.group_stock_user' so they are
simply omitted from read() results for users outside that group, instead of raising. It
gates the views that show them in the same way: the Repair Orders button of the transfer
form, the "Create Repair" action of the transfer, the repair parts of the repair operation type
card (the card of a user outside the group shows the name of the operation type only) and the
two repair buttons of the lot form. The dashboard graph of a repair operation type counts no
repair order for such a user. Nothing is granted: a user in stock.group_stock_user gets
exactly what core gives, and nobody else gains sight of a repair order or of a figure counted
from them. The module depends only on repair and auto-installs whenever repair is
installed.
Key Features
- Gate stock.picking.repair_ids and stock.picking.nbr_repairs to stock.group_stock_user, with the button and the action that use them.
- Gate the four repair counters of stock.picking.type to stock.group_stock_user, with the repair parts of the operation type card, and leave repair orders out of the dashboard graph for the other users.
- Gate the four repair fields of stock.lot to stock.group_stock_user, with the two repair buttons of the lot form.
Editions Supported
- Community Edition
- Enterprise Edition
This software and associated files (the "Software") may only be
used
(executed, modified, executed after modifications) if you have
purchased a
valid license from the authors, typically via Odoo Apps,
or if you
have
received a written agreement from the authors of the
Software (see the
COPYRIGHT file).
You may develop Odoo modules that use the Software as a library
(typically
by depending on it, importing it and using its
resources), but
without
copying any source code or material from the
Software. You may distribute
those modules under the license of your
choice, provided that this
license
is compatible with the terms of
the Odoo Proprietary License (For
example:
LGPL, MIT, or proprietary
licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell
copies of the
Software or modified copies of the Software.
The above copyright notice and this permission notice must be
included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT
SHALL THE
AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING
FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE
SOFTWARE.