-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '16.0' into 16.0-mig-product_search_customerinfo
- Loading branch information
Showing
21 changed files
with
426 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg | ||
:target: https://opensource.org/licenses/LGPL-3.0 | ||
:alt: License: LGPL-3 | ||
|
||
======================================================== | ||
Delivery Package Number Report | ||
======================================================== | ||
|
||
Overview | ||
======== | ||
|
||
The **Delivery Package Number Report** module enhances the existing **Stock Report Delivery Document** view by adding a new field to display the number of packages in the report. This is useful for tracking and reporting the number of packages associated with delivery moves. | ||
|
||
Features | ||
======== | ||
|
||
- **Add Number of Packages**: | ||
- Modifies the `stock.report_delivery_document` view to include a field showing the number of packages associated with a stock move line. | ||
|
||
- **Integration with Delivery Package Number**: | ||
- Leverages the **Delivery Package Number** module for the `number_of_packages` field. | ||
|
||
Usage | ||
===== | ||
|
||
1. **Install the Module**: | ||
- Install the **Delivery Package Number Report** module via the Apps menu. | ||
|
||
2. **View the Report**: | ||
- Navigate to the stock report view for delivery documents. | ||
- The new `Number of Packages` field will be visible in the report. | ||
|
||
3. **Use Case**: | ||
- This module is particularly useful for organizations that need to track the number of packages involved in their stock moves, especially when dealing with deliveries. | ||
|
||
Configuration | ||
============= | ||
|
||
No specific configuration is required for this module. It will automatically modify the `stock.report_delivery_document` view to include the new `number_of_packages` field. | ||
|
||
Testing | ||
======= | ||
|
||
Test the following to ensure the module works as intended: | ||
|
||
- Verify that the `number_of_packages` field appears correctly in the stock delivery document report. | ||
- Ensure the field reflects the correct data from the **Delivery Package Number** module. | ||
|
||
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 regarding this module, please contact the contributors. For support, please use the official issue tracker. | ||
|
||
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Delivery Package Number Report", | ||
"version": "16.0.1.0.0", | ||
"category": "Stock", | ||
"author": "Avanzosc", | ||
"license": "LGPL-3", | ||
"depends": ["stock", "delivery_package_number"], | ||
"data": [ | ||
"views/delivery_package_number_report_view.xml", | ||
], | ||
"installable": True, | ||
"application": False, | ||
"website": "https://github.com/avanzosc/odoo-addons", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
# * delivery_package_number_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-20 16:36+0000\n" | ||
"PO-Revision-Date: 2025-01-20 16:36+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: delivery_package_number_report | ||
#: model_terms:ir.ui.view,arch_db:delivery_package_number_report.delivery_package_number_report_inherit | ||
msgid "Packages:" | ||
msgstr "Paquets:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
# * delivery_package_number_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-20 14:17+0000\n" | ||
"PO-Revision-Date: 2025-01-20 14:17+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: delivery_package_number_report | ||
#: model_terms:ir.ui.view,arch_db:delivery_package_number_report.delivery_package_number_report_inherit | ||
msgid "Packages:" | ||
msgstr "Bultos:" |
13 changes: 13 additions & 0 deletions
13
delivery_package_number_report/views/delivery_package_number_report_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<template | ||
id="delivery_package_number_report_inherit" | ||
inherit_id="stock.report_delivery_document" | ||
> | ||
<xpath expr="//table[@name='stock_move_line_table']" position="after"> | ||
<div t-if="o.number_of_packages"> | ||
Packages: <span t-field="o.number_of_packages" /> | ||
</div> | ||
</xpath> | ||
</template> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/delivery_package_number_report/odoo/addons/delivery_package_number_report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../delivery_package_number_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |
1 change: 1 addition & 0 deletions
1
...lierinfo_customer_code_report/odoo/addons/stock_picking_supplierinfo_customer_code_report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../stock_picking_supplierinfo_customer_code_report |
6 changes: 6 additions & 0 deletions
6
setup/stock_picking_supplierinfo_customer_code_report/setup.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |
28 changes: 28 additions & 0 deletions
28
stock_picking_supplierinfo_customer_code_report/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
=============================================== | ||
Stock Picking Supplierinfo Customer Code Report | ||
=============================================== | ||
|
||
* Customer code field from suplierinfo, in stock picking report. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/odoo-addons/issues>`_. In case of trouble, | ||
please check there if your issue has already been reported. If you spotted | ||
it first, help us smash it by providing detailed and welcomed feedback. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Ana Juaristi <[email protected]> | ||
* Alfredo de la Fuente <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
19 changes: 19 additions & 0 deletions
19
stock_picking_supplierinfo_customer_code_report/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2025 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Stock Picking Supplierinfo Customer Code Report", | ||
"version": "16.0.1.0.0", | ||
"author": "AvanzOSC", | ||
"category": "Inventory", | ||
"license": "AGPL-3", | ||
"website": "https://github.com/avanzosc/odoo-addons", | ||
"depends": [ | ||
"stock", | ||
"product_supplierinfo_for_customer_sale", | ||
], | ||
"data": [ | ||
"reports/stock_picking_operations_report.xml", | ||
"reports/report_delivery_document.xml", | ||
], | ||
"installable": True, | ||
} |
27 changes: 27 additions & 0 deletions
27
stock_picking_supplierinfo_customer_code_report/i18n/ca_ES.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_supplierinfo_customer_code_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-20 13:43+0000\n" | ||
"PO-Revision-Date: 2025-01-20 13:43+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_picking_supplierinfo_customer_code_report | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_delivery_document | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_picking | ||
msgid "<strong>Cust. Cod.</strong>" | ||
msgstr "" | ||
|
||
#. module: stock_picking_supplierinfo_customer_code_report | ||
#: model:ir.model,name:stock_picking_supplierinfo_customer_code_report.model_stock_move_line | ||
msgid "Product Moves (Stock Move Line)" | ||
msgstr "Moviment del producte (línia de moviment d'estoc)" |
27 changes: 27 additions & 0 deletions
27
stock_picking_supplierinfo_customer_code_report/i18n/en_US.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_supplierinfo_customer_code_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-20 13:42+0000\n" | ||
"PO-Revision-Date: 2025-01-20 13:42+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_picking_supplierinfo_customer_code_report | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_delivery_document | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_picking | ||
msgid "<strong>Cust. Cod.</strong>" | ||
msgstr "" | ||
|
||
#. module: stock_picking_supplierinfo_customer_code_report | ||
#: model:ir.model,name:stock_picking_supplierinfo_customer_code_report.model_stock_move_line | ||
msgid "Product Moves (Stock Move Line)" | ||
msgstr "" |
27 changes: 27 additions & 0 deletions
27
stock_picking_supplierinfo_customer_code_report/i18n/es.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_supplierinfo_customer_code_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-20 13:42+0000\n" | ||
"PO-Revision-Date: 2025-01-20 13:42+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_picking_supplierinfo_customer_code_report | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_delivery_document | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_picking | ||
msgid "<strong>Cust. Cod.</strong>" | ||
msgstr "<strong>Cod. Cli.</strong>" | ||
|
||
#. module: stock_picking_supplierinfo_customer_code_report | ||
#: model:ir.model,name:stock_picking_supplierinfo_customer_code_report.model_stock_move_line | ||
msgid "Product Moves (Stock Move Line)" | ||
msgstr "Operación de empaquetado" |
27 changes: 27 additions & 0 deletions
27
...upplierinfo_customer_code_report/i18n/stock_picking_supplierinfo_customer_code_report.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_supplierinfo_customer_code_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-20 13:41+0000\n" | ||
"PO-Revision-Date: 2025-01-20 13: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_picking_supplierinfo_customer_code_report | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_delivery_document | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_supplierinfo_customer_code_report.report_picking | ||
msgid "<strong>Cust. Cod.</strong>" | ||
msgstr "" | ||
|
||
#. module: stock_picking_supplierinfo_customer_code_report | ||
#: model:ir.model,name:stock_picking_supplierinfo_customer_code_report.model_stock_move_line | ||
msgid "Product Moves (Stock Move Line)" | ||
msgstr "" |
1 change: 1 addition & 0 deletions
1
stock_picking_supplierinfo_customer_code_report/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import stock_move_line |
34 changes: 34 additions & 0 deletions
34
stock_picking_supplierinfo_customer_code_report/models/stock_move_line.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2025 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo import models | ||
|
||
|
||
class StockMoveLine(models.Model): | ||
_inherit = "stock.move.line" | ||
|
||
def _get_aggregated_product_quantities(self, **kwargs): | ||
result = super()._get_aggregated_product_quantities(**kwargs) | ||
out_picking_lines = self.filtered(lambda x: x.picking_code == "outgoing") | ||
if not result or len(self) != len(out_picking_lines): | ||
return result | ||
for clave in result.keys(): | ||
for move_line in self: | ||
line_key = self._generate_key_to_found() | ||
product_customer_code = "" | ||
if move_line.move_id.sale_line_id: | ||
product_customer_code = ( | ||
move_line.move_id.sale_line_id.product_customer_code | ||
) | ||
if line_key == clave: | ||
result[line_key]["product_customer_code"] = product_customer_code | ||
return result | ||
|
||
def _generate_key_to_found(self): | ||
uom = self.product_uom_id | ||
name = self.product_id.display_name | ||
description = self.move_id.description_picking | ||
product = self.product_id | ||
if description == name or description == self.product_id.name: | ||
description = False | ||
line_key = f'{product.id}_{product.display_name}_{description or ""}_{uom.id}' | ||
return line_key |
Oops, something went wrong.