Skip to content

[ADD]17.0: Added pos_product_info_position module. #1381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
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
109 changes: 109 additions & 0 deletions pos_product_info_position/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
=====================================
Point of Sale - Product Info Position
=====================================

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

.. |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-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-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/17.0/pos_product_info_position
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_product_info_position
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

POS Product Info - Position
===========================

This module enhances the Point of Sale (POS) system by displaying the
stock location details for products directly in the POS interface.

Features
--------

- Shows stock locations of products in POS.
- Only internal locations are considered.
- Location details include:

- Location name
- Corridor, Row, Rack, Level
- X, Y, Z coordinates (if defined)

Use Case
--------

When a cashier or store employee is looking for a product, this module
helps them identify where exactly the product is stored in the warehouse
or store floor. It saves time and improves operational efficiency.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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/OCA/pos/issues/new?body=module:%20pos_product_info_position%0Aversion:%2017.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
-------

* Serpent Consulting Services Pvt. Ltd.

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

- Vehiana Tepuhiarii <[email protected]>
- `SerpentCS <https://www.serpentcs.com>`__:

- Parvez Qureshi <[email protected]>

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

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-Serpent Consulting Services Pvt. Ltd.| image:: https://github.com/Serpent Consulting Services Pvt. Ltd..png?size=40px
:target: https://github.com/Serpent Consulting Services Pvt. Ltd.
:alt: Serpent Consulting Services Pvt. Ltd.

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-Serpent Consulting Services Pvt. Ltd.|

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/17.0/pos_product_info_position>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions pos_product_info_position/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions pos_product_info_position/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Point of Sale - Product Info Position",
"summary": "Point of Sale - Product Info Position",
"version": "17.0.1.0.0",
"category": "Point of sale",
"website": "https://github.com/OCA/pos",
"author": "Serpent Consulting Services Pvt. Ltd.,Odoo Community Association (OCA)",
"maintainers": ["Serpent Consulting Services Pvt. Ltd."],
"license": "AGPL-3",
"installable": True,
"depends": ["point_of_sale", "stock_location_position"],
"assets": {
"point_of_sale._assets_pos": [
"pos_product_info_position/static/src/popup/product_info_position_popup.xml",
"pos_product_info_position/static/src/popup/product_info_popup.xml",
"pos_product_info_position/static/src/popup/product_info_position_popup.esm.js",
"pos_product_info_position/static/src/popup/product_info_popup.esm.js",
]
},
}
2 changes: 2 additions & 0 deletions pos_product_info_position/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pos_config
from . import product
25 changes: 25 additions & 0 deletions pos_product_info_position/models/pos_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from odoo import api, fields, models


class PosConfig(models.Model):
_inherit = "pos.config"

module_pos_product_info_location = fields.Boolean(
string="Module Pos Product Info Location Installed",
compute="_compute_module_pos_product_info_location",
)

@api.depends("company_id")
def _compute_module_pos_product_info_location(self):
is_installed = bool(
self.env["ir.module.module"]
.sudo()
.search_count(
[
("name", "=", "pos_product_info_location"),
("state", "=", "installed"),
]
)
)
for config in self:
config.module_pos_product_info_location = is_installed
32 changes: 32 additions & 0 deletions pos_product_info_position/models/product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from odoo import models


class ProductProduct(models.Model):
_inherit = "product.product"

def get_product_info_pos(self, price, quantity, pos_config_id):
res = super().get_product_info_pos(price, quantity, pos_config_id)
quants = self.env["stock.quant"].search(
[
("product_id", "in", self.ids),
("location_id.usage", "=", "internal"),
]
)
locations = []
for quant in quants:
loc = quant.location_id
locations.append(
{
"location_id": loc.id,
"location_name": loc.display_name,
"corridor": loc.corridor or "-",
"row": loc.row or "-",
"rack": loc.rack or "-",
"level": loc.level or "-",
"posx": loc.posx,
"posy": loc.posy,
"posz": loc.posz,
}
)
res["positions"] = locations
return res
3 changes: 3 additions & 0 deletions pos_product_info_position/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 pos_product_info_position/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Vehiana Tepuhiarii \<<[email protected]>\>
- [SerpentCS](https://www.serpentcs.com):
- Parvez Qureshi \<<[email protected]>\>
17 changes: 17 additions & 0 deletions pos_product_info_position/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# POS Product Info - Position

This module enhances the Point of Sale (POS) system by displaying the stock location details for products directly in the POS interface.

## Features

- Shows stock locations of products in POS.
- Only internal locations are considered.
- Location details include:
- Location name
- Corridor, Row, Rack, Level
- X, Y, Z coordinates (if defined)

## Use Case

When a cashier or store employee is looking for a product, this module helps them identify where exactly the product is stored in the warehouse or store floor. It saves time and improves operational efficiency.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading