Skip to content

Commit 6308b6e

Browse files
committed
Merge PR #411 into 18.0
Signed-off-by rafaelbn
2 parents 9d9cffd + 4120d7e commit 6308b6e

15 files changed

Lines changed: 711 additions & 0 deletions

File tree

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
======================================
2+
Account Invoice Report Stock Packaging
3+
======================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:6d9b0d1eedfd5541c23ecf0007d17002e447854f1b35c4eef74a1c0ccb757831
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Alpha
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%2Faccount--invoice--reporting-lightgray.png?logo=github
20+
:target: https://github.com/OCA/account-invoice-reporting/tree/18.0/account_invoice_report_stock_packaging
21+
:alt: OCA/account-invoice-reporting
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/account-invoice-reporting-18-0/account-invoice-reporting-18-0-account_invoice_report_stock_packaging
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/account-invoice-reporting&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module extends the functionality of Packagings and Invoices to
32+
support packaging display on invoices and to allow you to show packaging
33+
information directly in your invoices.
34+
35+
.. IMPORTANT::
36+
This is an alpha version, the data model and design can change at any time without warning.
37+
Only for development or testing purpose, do not use in production.
38+
`More details on development status <https://odoo-community.org/page/development-status>`_
39+
40+
**Table of contents**
41+
42+
.. contents::
43+
:local:
44+
45+
Use Cases / Context
46+
===================
47+
48+
This module was developed because sometimes, we want to show packaging
49+
information on invoice reports.
50+
51+
Usage
52+
=====
53+
54+
To use this module, you need to:
55+
56+
1. Go to Inventory > Products > Products.
57+
2. Create a produt with Packaging, set Invoicing Policy to Delivered
58+
quantities and Update Quantity.
59+
3. Go to Sales and create a Sales Order with that product.
60+
4. Fill packaging information on the Sale Order Line and confirm the
61+
Sale Order.
62+
5. Deliver its pickings totally or partially.
63+
6. Create an invoice of the goods delivered and confirm it.
64+
7. Print Invoice Report and check that Quantity column shows Packaging
65+
information.
66+
67+
Bug Tracker
68+
===========
69+
70+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/issues>`_.
71+
In case of trouble, please check there if your issue has already been reported.
72+
If you spotted it first, help us to smash it by providing a detailed and welcomed
73+
`feedback <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_stock_packaging%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
74+
75+
Do not contact contributors directly about support or help with technical issues.
76+
77+
Credits
78+
=======
79+
80+
Authors
81+
-------
82+
83+
* Moduon
84+
85+
Contributors
86+
------------
87+
88+
- Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__)
89+
90+
Maintainers
91+
-----------
92+
93+
This module is maintained by the OCA.
94+
95+
.. image:: https://odoo-community.org/logo.png
96+
:alt: Odoo Community Association
97+
:target: https://odoo-community.org
98+
99+
OCA, or the Odoo Community Association, is a nonprofit organization whose
100+
mission is to support the collaborative development of Odoo features and
101+
promote its widespread use.
102+
103+
.. |maintainer-Shide| image:: https://github.com/Shide.png?size=40px
104+
:target: https://github.com/Shide
105+
:alt: Shide
106+
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
107+
:target: https://github.com/rafaelbn
108+
:alt: rafaelbn
109+
110+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
111+
112+
|maintainer-Shide| |maintainer-rafaelbn|
113+
114+
This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/18.0/account_invoice_report_stock_packaging>`_ project on GitHub.
115+
116+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2026 Moduon Team S.L.
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
3+
4+
{
5+
"name": "Account Invoice Report Stock Packaging",
6+
"summary": "Display Packaging on Invoice Report",
7+
"version": "18.0.1.0.0",
8+
"development_status": "Alpha",
9+
"category": "Accounting",
10+
"website": "https://github.com/OCA/account-invoice-reporting",
11+
"author": "Moduon, Odoo Community Association (OCA)",
12+
"maintainers": ["Shide", "rafaelbn"],
13+
"license": "AGPL-3",
14+
"application": False,
15+
"installable": True,
16+
"depends": [
17+
"stock_move_packaging_qty",
18+
"stock_picking_invoice_link",
19+
],
20+
"data": [
21+
"views/report_invoice.xml",
22+
],
23+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import account_move_line
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2026 Moduon Team S.L.
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
3+
4+
from odoo import models
5+
6+
7+
class AccountMoveLine(models.Model):
8+
_inherit = "account.move.line"
9+
10+
def _get_packaging_info(self):
11+
self.ensure_one()
12+
pkg_amnts = {}
13+
for move in self.move_line_ids.filtered("product_packaging_id"):
14+
pkg_amnts.setdefault(move.product_packaging_id, 0.0)
15+
pkg_amnts[move.product_packaging_id] += move.product_packaging_quantity
16+
if not pkg_amnts:
17+
return ""
18+
return ", ".join(f"{pq} {p.name}" for p, pq in pkg_amnts.items())
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module was developed because sometimes, we want to show packaging information on invoice reports.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Eduardo de Miguel ([Moduon](https://www.moduon.team/))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module extends the functionality of Packagings and Invoices to support packaging display on invoices and to allow you to show packaging information directly in your invoices.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
To use this module, you need to:
2+
3+
1. Go to Inventory > Products > Products.
4+
1. Create a produt with Packaging, set Invoicing Policy to Delivered quantities and Update Quantity.
5+
1. Go to Sales and create a Sales Order with that product.
6+
1. Fill packaging information on the Sale Order Line and confirm the Sale Order.
7+
1. Deliver its pickings totally or partially.
8+
1. Create an invoice of the goods delivered and confirm it.
9+
1. Print Invoice Report and check that Quantity column shows Packaging information.

0 commit comments

Comments
 (0)