Skip to content
Open
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
6 changes: 6 additions & 0 deletions setup/stock_location_report_manager_layout/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
100 changes: 100 additions & 0 deletions stock_location_report_manager_layout/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

====================================
Stock Location Report Manager Layout
====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3c519dae8c0bb3c90bc5f11d688db658db73f033007036878bd5ff768a4200a0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Faxls--custom-lightgray.png?logo=github
:target: https://github.com/qrtl/axls-custom/tree/16.0/stock_location_report_manager_layout
:alt: qrtl/axls-custom

|badge1| |badge2| |badge3|

This module changes the Locations report (*Inventory > Reporting >
Locations*) so that non-managers see a read-only copy of the manager
layout.

Depending on the user's groups, the Locations report list view resolves
to:

- Stock managers: the existing editable manager layout (unchanged).
- All other users: a read-only copy of the manager layout, so they see
the richer manager column set (and its extension columns, such as
expiration date) without being able to create, edit or delete
records.

A module such as ``stock_reporting_access`` should be installed to let
non-manager users access the *Inventory > Reporting* menu item.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Log in as a stock user who is not a stock manager.
2. Go to *Inventory > Reporting > Locations*.
3. The list shows the manager layout columns, but records cannot be
created, edited or deleted.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/qrtl/axls-custom/issues>`_.
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
`feedback <https://github.com/qrtl/axls-custom/issues/new?body=module:%20stock_location_report_manager_layout%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Quartile

Contributors
------------

- `Quartile <https://www.quartile.co>`__:

- Toshikimi Shigenobu
- Aung Ko Ko Lin

Maintainers
-----------

.. |maintainer-nobuQuartile| image:: https://github.com/nobuQuartile.png?size=40px
:target: https://github.com/nobuQuartile
:alt: nobuQuartile
.. |maintainer-AungKoKoLin1997| image:: https://github.com/AungKoKoLin1997.png?size=40px
:target: https://github.com/AungKoKoLin1997
:alt: AungKoKoLin1997

Current maintainers:

|maintainer-nobuQuartile| |maintainer-AungKoKoLin1997|

This module is part of the `qrtl/axls-custom <https://github.com/qrtl/axls-custom/tree/16.0/stock_location_report_manager_layout>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions stock_location_report_manager_layout/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions stock_location_report_manager_layout/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2026 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Location Report Manager Layout",
"version": "16.0.1.0.0",
"category": "Inventory/Inventory",
"summary": "Add a readonly manager layout option to the locations report",
"author": "Quartile",
"website": "https://www.quartile.co",
"license": "AGPL-3",
"maintainers": ["nobuQuartile", "AungKoKoLin1997"],
"depends": ["stock"],
"data": [
"views/stock_quant_views.xml",
],
"installable": True,
}
31 changes: 31 additions & 0 deletions stock_location_report_manager_layout/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_location_report_manager_layout
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-26 06:41+0000\n"
"PO-Revision-Date: 2026-06-26 06:41+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: stock_location_report_manager_layout
#: model_terms:ir.ui.view,arch_db:stock_location_report_manager_layout.view_stock_quant_tree_readonly_manager_layout
msgid "On Hand Quantity"
msgstr "手持在庫数"

#. module: stock_location_report_manager_layout
#: model:ir.model,name:stock_location_report_manager_layout.model_stock_quant
msgid "Quants"
msgstr "保管ロット"

#. module: stock_location_report_manager_layout
#: model_terms:ir.ui.view,arch_db:stock_location_report_manager_layout.view_stock_quant_tree_readonly_manager_layout
msgid "Total On Hand"
msgstr "手持在庫合計"
1 change: 1 addition & 0 deletions stock_location_report_manager_layout/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_quant
23 changes: 23 additions & 0 deletions stock_location_report_manager_layout/models/stock_quant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2026 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class StockQuant(models.Model):
_inherit = "stock.quant"

def _get_quants_action(self, domain=None, extend=False):
action = super()._get_quants_action(domain=domain, extend=extend)
if self.env.user.has_group("stock.group_stock_manager"):
return action
readonly_view = self.env.ref(
"stock_location_report_manager_layout.view_stock_quant_tree_readonly_manager_layout"
)
action["view_id"] = readonly_view.id
action["views"] = [(readonly_view.id, "list")] + [
(view_id, view_type)
for view_id, view_type in action.get("views", [])
if view_type != "list"
]
return action
3 changes: 3 additions & 0 deletions stock_location_report_manager_layout/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions stock_location_report_manager_layout/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Quartile](https://www.quartile.co):
- Toshikimi Shigenobu
- Aung Ko Ko Lin
12 changes: 12 additions & 0 deletions stock_location_report_manager_layout/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This module changes the Locations report (*Inventory > Reporting >
Locations*) so that non-managers see a read-only copy of the manager layout.

Depending on the user's groups, the Locations report list view resolves to:

- Stock managers: the existing editable manager layout (unchanged).
- All other users: a read-only copy of the manager layout, so they see the
richer manager column set (and its extension columns, such as expiration
date) without being able to create, edit or delete records.

A module such as `stock_reporting_access` should be installed to let non-manager
users access the *Inventory > Reporting* menu item.
4 changes: 4 additions & 0 deletions stock_location_report_manager_layout/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Log in as a stock user who is not a stock manager.
2. Go to *Inventory > Reporting > Locations*.
3. The list shows the manager layout columns, but records cannot be created,
edited or deleted.
Loading
Loading