Skip to content
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

[16.0][ADD] stock_report_delivery_document_lot_id: Add lot in all pickings #3101

Closed
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_report_delivery_document_lot_id/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,
)
78 changes: 78 additions & 0 deletions stock_report_delivery_document_lot_id/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: https://opensource.org/licenses/LGPL-3.0
:alt: License: LGPL-3

==============================================================
Stock Report Delivery Document Lot ID
==============================================================

Overview
========

The **Stock Report Delivery Document Lot ID** module enhances the **Delivery Document Report** by adding the ability to display lot or serial numbers for stock moves. This provides more detailed traceability for your delivery operations.

Features
========

- **Display Lot/Serial Numbers**:

- Adds a new column to the **Delivery Document Report** to show the lot or serial number of stock moves.

- **Barcode Support**:

- Displays barcodes for the lot/serial numbers, improving operational efficiency.

- **Dynamic Visibility**:

- Automatically shows the column only when lot or serial numbers are present in the stock move lines.

Usage
=====

1. **Install the Module**:

- Install the **Stock Report Delivery Document Lot ID** module via the Apps menu.

2. **Check Delivery Documents**:

- Open any delivery document and verify the presence of the `Lot/Serial Number` column.

3. **Barcodes for Lot/Serial Numbers**:

- Confirm that barcodes for lot or serial numbers appear in the new column.

Configuration
=============

No additional configuration is needed. The module works out of the box once installed.

Testing
=======

Perform the following tests to ensure the module is working correctly:

- Verify that the `Lot/Serial Number` column appears in the **Delivery Document Report** only when there are lot or serial numbers.

- Confirm that the barcodes are correctly generated and displayed in the column.

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

If you encounter any issues, please report them on the GitHub repository at `GitHub Issues <https://github.com/avanzosc/odoo-addons/issues>`_.

Credits
=======

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

* Ana Juaristi <[email protected]>

* Unai Beristain <[email protected]>

For specific questions or support, please contact the contributors.

License
=======

This project is licensed under the LGPL-3 License. For more details, refer to the LICENSE file or visit <https://opensource.org/licenses/LGPL-3.0>.
Empty file.
14 changes: 14 additions & 0 deletions stock_report_delivery_document_lot_id/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Stock Report Delivery Document Lot ID",
"version": "16.0.1.0.0",
"category": "Stock",
"author": "Avanzosc",
"license": "LGPL-3",
"depends": ["stock"],
"data": [
"views/stock_report_delivery_document_lot_id_view.xml",
],
"installable": True,
"application": False,
"website": "https://github.com/avanzosc/odoo-addons",
}
21 changes: 21 additions & 0 deletions stock_report_delivery_document_lot_id/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_report_delivery_document_lot_id
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-21 10:09+0000\n"
"PO-Revision-Date: 2025-01-21 10:09+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_report_delivery_document_lot_id
#: model_terms:ir.ui.view,arch_db:stock_report_delivery_document_lot_id.stock_report_delivery_document_lot_id_inherit
msgid "<strong>Lot/Serial Number</strong>"
msgstr "<strong>Numero de Sèrie/Lote</strong>"
21 changes: 21 additions & 0 deletions stock_report_delivery_document_lot_id/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_report_delivery_document_lot_id
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-21 10:09+0000\n"
"PO-Revision-Date: 2025-01-21 10:09+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_report_delivery_document_lot_id
#: model_terms:ir.ui.view,arch_db:stock_report_delivery_document_lot_id.stock_report_delivery_document_lot_id_inherit
msgid "<strong>Lot/Serial Number</strong>"
msgstr "<strong>Número de Serie/Lote</strong>"
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template
id="stock_report_delivery_document_lot_id_inherit"
inherit_id="stock.report_delivery_document"
>
<xpath
expr="//table[@name='stock_move_table']//th[@name='th_sm_quantity']"
position="after"
>
<th name="lot_serial" t-if="has_serial_number">
<strong>Lot/Serial Number</strong>
</th>
</xpath>

<xpath expr="//table[@name='stock_move_table']/thead" position="before">
<t
t-set="has_serial_number"
t-value="any(move_line.lot_id or move_line.lot_name for move_line in o.move_line_ids)"
/>
</xpath>

<xpath
expr="//table[@name='stock_move_table']/tbody/tr//span[@t-field='move.quantity_done']/.."
position="after"
>
<td t-if="has_serial_number">
<t t-foreach="move.move_line_ids" t-as="line">
<div
t-if="line.lot_id or line.lot_name"
t-esc="line.lot_id.name or line.lot_name"
t-options="{'widget': 'barcode', 'humanreadable': 1, 'width': 400, 'height': 100, 'img_style': 'width:100%;height:35px;'}"
/>
</t>
</td>
</xpath>
</template>
</odoo>
Loading