Skip to content

Commit ee1b868

Browse files
committed
[ADD]17.0: Added pos_product_info_location module.
1 parent 5d9ad8f commit ee1b868

13 files changed

+766
-0
lines changed

pos_product_info_position/README.rst

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
=====================================
2+
Point of Sale - Product Info Position
3+
=====================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:38bb7f41721ea7f4bfccaa0678d6a384eaffe6d2b39dcacbcfe296aafa3c105a
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
20+
:target: https://github.com/OCA/pos/tree/17.0/pos_product_info_position
21+
:alt: OCA/pos
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_product_info_position
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
POS Product Info - Position
32+
===========================
33+
34+
This module enhances the Point of Sale (POS) system by displaying the
35+
stock location details for products directly in the POS interface.
36+
37+
Features
38+
--------
39+
40+
- Shows stock locations of products in POS.
41+
- Only internal locations are considered.
42+
- Location details include:
43+
44+
- Location name
45+
- Corridor, Row, Rack, Level
46+
- X, Y, Z coordinates (if defined)
47+
48+
Use Case
49+
--------
50+
51+
When a cashier or store employee is looking for a product, this module
52+
helps them identify where exactly the product is stored in the warehouse
53+
or store floor. It saves time and improves operational efficiency.
54+
55+
**Table of contents**
56+
57+
.. contents::
58+
:local:
59+
60+
Bug Tracker
61+
===========
62+
63+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
64+
In case of trouble, please check there if your issue has already been reported.
65+
If you spotted it first, help us to smash it by providing a detailed and welcomed
66+
`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**>`_.
67+
68+
Do not contact contributors directly about support or help with technical issues.
69+
70+
Credits
71+
=======
72+
73+
Authors
74+
-------
75+
76+
* Serpent Consulting Services Pvt. Ltd.
77+
78+
Contributors
79+
------------
80+
81+
- Vehiana Tepuhiarii <[email protected]>
82+
- `SerpentCS <https://www.serpentcs.com>`__:
83+
84+
- Parvez Qureshi <[email protected]>
85+
86+
Maintainers
87+
-----------
88+
89+
This module is maintained by the OCA.
90+
91+
.. image:: https://odoo-community.org/logo.png
92+
:alt: Odoo Community Association
93+
:target: https://odoo-community.org
94+
95+
OCA, or the Odoo Community Association, is a nonprofit organization whose
96+
mission is to support the collaborative development of Odoo features and
97+
promote its widespread use.
98+
99+
.. |maintainer-Serpent Consulting Services Pvt. Ltd.| image:: https://github.com/Serpent Consulting Services Pvt. Ltd..png?size=40px
100+
:target: https://github.com/Serpent Consulting Services Pvt. Ltd.
101+
:alt: Serpent Consulting Services Pvt. Ltd.
102+
103+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
104+
105+
|maintainer-Serpent Consulting Services Pvt. Ltd.|
106+
107+
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/17.0/pos_product_info_position>`_ project on GitHub.
108+
109+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

pos_product_info_position/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "Point of Sale - Product Info Position",
3+
"summary": "Point of Sale - Product Info Position",
4+
"version": "17.0.1.0.0",
5+
"category": "Point of sale",
6+
"website": "https://github.com/OCA/pos",
7+
"author": "Serpent Consulting Services Pvt. Ltd.,Odoo Community Association (OCA)",
8+
"maintainers": ["Serpent Consulting Services Pvt. Ltd."],
9+
"license": "AGPL-3",
10+
"installable": True,
11+
"depends": ["point_of_sale", "stock_location_position"],
12+
"assets": {
13+
"point_of_sale._assets_pos": [
14+
"pos_product_info_position/static/src/popup/product_info_position_popup.xml",
15+
"pos_product_info_position/static/src/popup/product_info_popup.xml",
16+
"pos_product_info_position/static/src/popup/product_info_position_popup.esm.js",
17+
"pos_product_info_position/static/src/popup/product_info_popup.esm.js",
18+
]
19+
},
20+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import pos_config
2+
from . import product
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from odoo import api, fields, models
2+
3+
4+
class PosConfig(models.Model):
5+
_inherit = "pos.config"
6+
7+
module_pos_product_info_location = fields.Boolean(
8+
string="Module Pos Product Info Location Installed",
9+
compute="_compute_module_pos_product_info_location",
10+
)
11+
12+
@api.depends("company_id")
13+
def _compute_module_pos_product_info_location(self):
14+
is_installed = bool(
15+
self.env["ir.module.module"]
16+
.sudo()
17+
.search_count(
18+
[
19+
("name", "=", "pos_product_info_location"),
20+
("state", "=", "installed"),
21+
]
22+
)
23+
)
24+
for config in self:
25+
config.module_pos_product_info_location = is_installed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from odoo import models
2+
3+
4+
class ProductProduct(models.Model):
5+
_inherit = "product.product"
6+
7+
def get_product_info_pos(self, price, quantity, pos_config_id):
8+
res = super().get_product_info_pos(price, quantity, pos_config_id)
9+
quants = self.env["stock.quant"].search(
10+
[
11+
("product_id", "in", self.ids),
12+
("location_id.usage", "=", "internal"),
13+
]
14+
)
15+
locations = []
16+
for quant in quants:
17+
loc = quant.location_id
18+
locations.append(
19+
{
20+
"location_id": loc.id,
21+
"location_name": loc.display_name,
22+
"corridor": loc.corridor or "-",
23+
"row": loc.row or "-",
24+
"rack": loc.rack or "-",
25+
"level": loc.level or "-",
26+
"posx": loc.posx,
27+
"posy": loc.posy,
28+
"posz": loc.posz,
29+
}
30+
)
31+
res["positions"] = locations
32+
return res
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Vehiana Tepuhiarii \<<[email protected]>\>
2+
- [SerpentCS](https://www.serpentcs.com):
3+
- Parvez Qureshi \<<[email protected]>\>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# POS Product Info - Position
2+
3+
This module enhances the Point of Sale (POS) system by displaying the stock location details for products directly in the POS interface.
4+
5+
## Features
6+
7+
- Shows stock locations of products in POS.
8+
- Only internal locations are considered.
9+
- Location details include:
10+
- Location name
11+
- Corridor, Row, Rack, Level
12+
- X, Y, Z coordinates (if defined)
13+
14+
## Use Case
15+
16+
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.
17+
Loading

0 commit comments

Comments
 (0)