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

[17.0] [MIG] stock_picking_report_custom_description #311

Open
wants to merge 18 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
eceb7f7
[9.0][IMP] stock_picking_report_custom_description: Change name
carlosdauden Feb 3, 2017
b938cc5
[MIG] stock_picking_report_custom_description: Migration to v11
cubells May 15, 2017
e662b04
[FIX+IMP] stock_picking_report_custom_description
sergio-teruel Sep 25, 2018
14c5270
[MIG] stock_picking_report_custom_description: Migration to v12.0
sergio-teruel Dec 4, 2019
4afe696
[IMP] stock_picking_report_custom_description: black, isort, prettier
Aug 5, 2022
3d50581
[MIG] stock_picking_report_custom_description: Migration to 14.0
Aug 5, 2022
6a667ce
[UPD] Update stock_picking_report_custom_description.pot
Aug 16, 2022
4c0b31e
[MIG] stock_picking_report_custom_description: Migration to 15.0
pilarvargas-tecnativa Dec 13, 2022
f070983
[FIX] stock_picking_report_custom_description: Transfer line descript…
pedrobaeza Dec 13, 2022
3fef46f
[MIG] stock_picking_report_custom_description: Migration to 16.0
carolinafernandez-tecnativa Sep 21, 2023
686142b
[UPD] Update stock_picking_report_custom_description.pot
Oct 3, 2023
57b3039
[BOT] post-merge updates
OCA-git-bot Oct 3, 2023
e9a77b6
Update translation files
weblate Oct 9, 2023
64d7007
Translated using Weblate (Spanish)
Ivorra78 Oct 15, 2023
ae41523
Added translation using Weblate (Italian)
mymage Nov 24, 2023
a20d2b2
Translated using Weblate (Italian)
mymage Nov 24, 2023
352729f
[IMP] stock_picking_report_custom_description: pre-commit auto fixes
David-Luis-Mora Apr 24, 2024
346919d
[MIG] stock_picking_report_custom_description: Migration to 17.0
David-Luis-Mora Apr 24, 2024
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
108 changes: 108 additions & 0 deletions stock_picking_report_custom_description/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
=======================================
Stock Picking Report Custom Description
=======================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Fstock--logistics--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-reporting/tree/17.0/stock_picking_report_custom_description
:alt: OCA/stock-logistics-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-17-0/stock-logistics-reporting-17-0-stock_picking_report_custom_description
: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/stock-logistics-reporting&target_branch=17.0
:alt: Try me on Runboat

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

This module transfers the sales order line description to the picking
description, and allows to print such text on the picking reports. When
the sales order line description is changed, picking description is
updated.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Create a sale order and set manual description in sale order lines.
2. Confirm the order.
3. Navigate to the delivery through the smart-button.
4. You can check sales order line description is the same as description
picking

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-reporting/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/stock-logistics-reporting/issues/new?body=module:%20stock_picking_report_custom_description%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
-------

* Tecnativa

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

- `Tecnativa <https://www.tecnativa.com>`__:

- Carlos Dauden
- Sergio Teruel
- Ernesto Tejeda
- Pilar Vargas
- Carolina Fernandez

- `Binhex <https://binhex.cloud//com>`__:

- David Luis Mora <d.luis@binhex.cloud>

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-carlosdauden| image:: https://github.com/carlosdauden.png?size=40px
:target: https://github.com/carlosdauden
:alt: carlosdauden

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

|maintainer-carlosdauden|

This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/17.0/stock_picking_report_custom_description>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions stock_picking_report_custom_description/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
21 changes: 21 additions & 0 deletions stock_picking_report_custom_description/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2017 Tecnativa - Carlos Dauden
# Copyright 2018 Tecnativa - Vicent Cubells
# Copyright 2018 Tecnativa - Sergio Teruel
# Copyright 2023 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Stock Picking Report Custom Description",
"summary": "Show moves description in picking reports",
"version": "17.0.1.0.0",
"category": "Warehouse",
"website": "https://github.com/OCA/stock-logistics-reporting",
"author": "Tecnativa, Odoo Community Association (OCA)",
"development_status": "Production/Stable",
"maintainers": ["carlosdauden"],
"license": "AGPL-3",
"depends": [
"sale_stock",
],
"data": [],
}
46 changes: 46 additions & 0 deletions stock_picking_report_custom_description/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_report_custom_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-04 15:34+0000\n"
"PO-Revision-Date: 2023-10-15 20:37+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: stock_picking_report_custom_description
#: model:ir.model,name:stock_picking_report_custom_description.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de Orden de Venta"

#. module: stock_picking_report_custom_description
#: model:ir.model,name:stock_picking_report_custom_description.model_stock_rule
msgid "Stock Rule"
msgstr "Regla de Existencias"

#~ msgid "Delivery Slip (Description)"
#~ msgstr "Vale de entrega (descripción)"

#~ msgid "Picking Operations (Description)"
#~ msgstr "Operaciones de picking (descripción)"

#~ msgid "<small>Description</small>"
#~ msgstr "<small>Descripción</small>"

#~ msgid "<small>Qty</small>"
#~ msgstr "<small>Ctd.</small>"

#~ msgid "Packing Operation"
#~ msgstr "Operación de empaquetado"

#~ msgid "Several product description"
#~ msgstr "Varias descripciones de producto"
27 changes: 27 additions & 0 deletions stock_picking_report_custom_description/i18n/it.po
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_report_custom_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-24 17:33+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: stock_picking_report_custom_description
#: model:ir.model,name:stock_picking_report_custom_description.model_sale_order_line
msgid "Sales Order Line"
msgstr "Riga ordine di vendita"

#. module: stock_picking_report_custom_description
#: model:ir.model,name:stock_picking_report_custom_description.model_stock_rule
msgid "Stock Rule"
msgstr "Regola di giacenza"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_report_custom_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \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_report_custom_description
#: model:ir.model,name:stock_picking_report_custom_description.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: stock_picking_report_custom_description
#: model:ir.model,name:stock_picking_report_custom_description.model_stock_rule
msgid "Stock Rule"
msgstr ""
3 changes: 3 additions & 0 deletions stock_picking_report_custom_description/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import stock_rule
from . import sale_order_line
16 changes: 16 additions & 0 deletions stock_picking_report_custom_description/models/sale_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2023 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

def write(self, vals):
res = super().write(vals)
if vals.get("name"):
moves = self.env["stock.move"].search([("sale_line_id", "=", self.id)])
if moves:
moves.write({"description_picking": vals["name"]})
return res
36 changes: 36 additions & 0 deletions stock_picking_report_custom_description/models/stock_rule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class StockRule(models.Model):
_inherit = "stock.rule"

def _get_stock_move_values(
self,
product_id,
product_qty,
product_uom,
location_id,
name,
origin,
company_id,
values,
):
"""Transfer the SO line description to the move name."""
res = super()._get_stock_move_values(
product_id,
product_qty,
product_uom,
location_id,
name,
origin,
company_id,
values,
)
if values.get("sale_line_id"):
line = self.env["sale.order.line"].browse(values["sale_line_id"])
res["description_picking"] = line.name
res["name"] = line.name
return res
3 changes: 3 additions & 0 deletions stock_picking_report_custom_description/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- [Tecnativa](https://www.tecnativa.com):
- Carlos Dauden
- Sergio Teruel
- Ernesto Tejeda
- Pilar Vargas
- Carolina Fernandez

- [Binhex](https://binhex.cloud//com):
- David Luis Mora \<<d.luis@binhex.cloud>\>
4 changes: 4 additions & 0 deletions stock_picking_report_custom_description/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module transfers the sales order line description to the picking
description, and allows to print such text on the picking reports. When
the sales order line description is changed, picking description is
updated.
7 changes: 7 additions & 0 deletions stock_picking_report_custom_description/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To use this module, you need to:

1. Create a sale order and set manual description in sale order lines.
2. Confirm the order.
3. Navigate to the delivery through the smart-button.
4. You can check sales order line description is the same as
description picking
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading