Skip to content

Commit fe408d1

Browse files
author
Pretecno
committed
Merge branch '14.0-mig-pos_lot_selection' of git+ssh://github.com/efatto/pos into 14.0
2 parents ca6e2f8 + 78344dc commit fe408d1

20 files changed

Lines changed: 877 additions & 0 deletions

File tree

pos_lot_selection/README.rst

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
=================
2+
POS Lot Selection
3+
=================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:bbdabf66a65199b6ec3d6b0b42e4b9754b6d93d0ee411f903c3c7c55db2ce777
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/14.0/pos_lot_selection
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-14-0/pos-14-0-pos_lot_selection
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=14.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows to pick between existing lots in POS frontend.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Usage
39+
=====
40+
41+
1. Go to *Inventory > Settings* and set the option *Track lots or serial
42+
numbers*
43+
2. Chose a product that is stockable, go to its *Inventory*
44+
tab, and set *Tracking* to *By Lots*.
45+
3. Go to its *Sales* tab and set it as *Available in the Point of Sale*.
46+
4. Click on *Update Qty On Hand*, chose the same location configured in the
47+
POS you want the lot available in; write a quantity; unfold the *Lot/Serial
48+
Number* field and pick create one if none is available yet.
49+
5. Create a new lot with the serial number of your choice.
50+
51+
Bug Tracker
52+
===========
53+
54+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
55+
In case of trouble, please check there if your issue has already been reported.
56+
If you spotted it first, help us to smash it by providing a detailed and welcomed
57+
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_lot_selection%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
58+
59+
Do not contact contributors directly about support or help with technical issues.
60+
61+
Credits
62+
=======
63+
64+
Authors
65+
~~~~~~~
66+
67+
* Tecnativa
68+
* Camptocamp
69+
70+
Maintainers
71+
~~~~~~~~~~~
72+
73+
This module is maintained by the OCA.
74+
75+
.. image:: https://odoo-community.org/logo.png
76+
:alt: Odoo Community Association
77+
:target: https://odoo-community.org
78+
79+
OCA, or the Odoo Community Association, is a nonprofit organization whose
80+
mission is to support the collaborative development of Odoo features and
81+
promote its widespread use.
82+
83+
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_lot_selection>`_ project on GitHub.
84+
85+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

pos_lot_selection/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

pos_lot_selection/__manifest__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2018 Tecnativa S.L. - David Vidal
2+
# Copyright 2022 Camptocamp SA
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4+
5+
{
6+
"name": "POS Lot Selection",
7+
"version": "14.0.1.0.0",
8+
"category": "Point of Sale",
9+
"author": "Tecnativa, Camptocamp, Odoo Community Association (OCA)",
10+
"website": "https://github.com/OCA/pos",
11+
"license": "AGPL-3",
12+
"depends": [
13+
"point_of_sale",
14+
],
15+
"data": ["templates/assets.xml"],
16+
"qweb": ["static/src/xml/LotSelectorPopup.xml"],
17+
"application": False,
18+
"installable": True,
19+
}

pos_lot_selection/i18n/es.po

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * pos_lot_selection
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2023-07-11 09:09+0000\n"
10+
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
11+
"Language-Team: none\n"
12+
"Language: es\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: pos_lot_selection
20+
#: model:ir.model,name:pos_lot_selection.model_stock_production_lot
21+
msgid "Lot/Serial"
22+
msgstr "Lote/Serie"
23+
24+
#. module: pos_lot_selection
25+
#. openerp-web
26+
#: code:addons/pos_lot_selection/static/src/js/EditListPopup.js:0
27+
#, python-format
28+
msgid "Lot/Serial Number(s) Required"
29+
msgstr "Número(s) de lote/serie obligatorio(s)"
30+
31+
#. module: pos_lot_selection
32+
#. openerp-web
33+
#: code:addons/pos_lot_selection/static/src/xml/LotSelectorPopup.xml:0
34+
#, python-format
35+
msgid "prepared_lots"
36+
msgstr "lotes_preparados"
37+
38+
#. module: pos_lot_selection
39+
#. openerp-web
40+
#: code:addons/pos_lot_selection/static/src/xml/LotSelectorPopup.xml:0
41+
#, python-format
42+
msgid "props.lots"
43+
msgstr "puntales.lotes"

pos_lot_selection/i18n/it.po

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * pos_lot_selection
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2024-01-24 17:34+0000\n"
10+
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: pos_lot_selection
20+
#: model:ir.model,name:pos_lot_selection.model_stock_production_lot
21+
msgid "Lot/Serial"
22+
msgstr "Lotto/seriale"
23+
24+
#. module: pos_lot_selection
25+
#. openerp-web
26+
#: code:addons/pos_lot_selection/static/src/js/EditListPopup.js:0
27+
#, python-format
28+
msgid "Lot/Serial Number(s) Required"
29+
msgstr "Richiesto numero(i) di lotto/serie"
30+
31+
#. module: pos_lot_selection
32+
#. openerp-web
33+
#: code:addons/pos_lot_selection/static/src/xml/LotSelectorPopup.xml:0
34+
#, python-format
35+
msgid "prepared_lots"
36+
msgstr "prepared_lots"
37+
38+
#. module: pos_lot_selection
39+
#. openerp-web
40+
#: code:addons/pos_lot_selection/static/src/xml/LotSelectorPopup.xml:0
41+
#, python-format
42+
msgid "props.lots"
43+
msgstr "props.lots"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * pos_lot_selection
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: pos_lot_selection
17+
#: model:ir.model,name:pos_lot_selection.model_stock_production_lot
18+
msgid "Lot/Serial"
19+
msgstr ""
20+
21+
#. module: pos_lot_selection
22+
#. openerp-web
23+
#: code:addons/pos_lot_selection/static/src/js/EditListPopup.js:0
24+
#, python-format
25+
msgid "Lot/Serial Number(s) Required"
26+
msgstr ""
27+
28+
#. module: pos_lot_selection
29+
#. openerp-web
30+
#: code:addons/pos_lot_selection/static/src/xml/LotSelectorPopup.xml:0
31+
#, python-format
32+
msgid "prepared_lots"
33+
msgstr ""
34+
35+
#. module: pos_lot_selection
36+
#. openerp-web
37+
#: code:addons/pos_lot_selection/static/src/xml/LotSelectorPopup.xml:0
38+
#, python-format
39+
msgid "props.lots"
40+
msgstr ""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import stock_production_lot
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2022 Camptocamp SA
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
3+
4+
from odoo import api, models
5+
from odoo.tools import float_compare
6+
7+
8+
class ProductionLot(models.Model):
9+
_inherit = "stock.production.lot"
10+
11+
@api.model
12+
def get_available_lots_for_pos(self, product_id, company_id):
13+
lots = self.sudo().search(
14+
[
15+
"&",
16+
["product_id", "=", product_id],
17+
"|",
18+
["company_id", "=", company_id],
19+
["company_id", "=", False],
20+
]
21+
)
22+
23+
lots = lots.filtered(
24+
lambda l: float_compare(
25+
l.product_qty, 0, precision_rounding=l.product_uom_id.rounding
26+
)
27+
> 0
28+
)
29+
30+
return lots.mapped("name")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module allows to pick between existing lots in POS frontend.

pos_lot_selection/readme/USAGE.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
1. Go to *Inventory > Settings* and set the option *Track lots or serial
2+
numbers*
3+
2. Chose a product that is stockable, go to its *Inventory*
4+
tab, and set *Tracking* to *By Lots*.
5+
3. Go to its *Sales* tab and set it as *Available in the Point of Sale*.
6+
4. Click on *Update Qty On Hand*, chose the same location configured in the
7+
POS you want the lot available in; write a quantity; unfold the *Lot/Serial
8+
Number* field and pick create one if none is available yet.
9+
5. Create a new lot with the serial number of your choice.

0 commit comments

Comments
 (0)