odoo-addon-account-invoice-report-picking-customer-note 16.0.1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/account_invoice_report_picking_customer_note/README.rst +142 -0
- odoo/addons/account_invoice_report_picking_customer_note/__init__.py +0 -0
- odoo/addons/account_invoice_report_picking_customer_note/__manifest__.py +15 -0
- odoo/addons/account_invoice_report_picking_customer_note/i18n/account_invoice_report_picking_customer_note.pot +21 -0
- odoo/addons/account_invoice_report_picking_customer_note/i18n/es.po +27 -0
- odoo/addons/account_invoice_report_picking_customer_note/readme/CONTEXT.rst +2 -0
- odoo/addons/account_invoice_report_picking_customer_note/readme/CONTRIBUTORS.rst +5 -0
- odoo/addons/account_invoice_report_picking_customer_note/readme/DESCRIPTION.rst +6 -0
- odoo/addons/account_invoice_report_picking_customer_note/readme/USAGE.rst +29 -0
- odoo/addons/account_invoice_report_picking_customer_note/static/description/icon.png +0 -0
- odoo/addons/account_invoice_report_picking_customer_note/static/description/index.html +479 -0
- odoo/addons/account_invoice_report_picking_customer_note/tests/__init__.py +1 -0
- odoo/addons/account_invoice_report_picking_customer_note/tests/test_print_picking_customer_note.py +138 -0
- odoo/addons/account_invoice_report_picking_customer_note/views/account_invoice_report.xml +30 -0
- odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/METADATA +158 -0
- odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/RECORD +18 -0
- odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/WHEEL +5 -0
- odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
2
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
3
|
+
:alt: Odoo Community Association
|
|
4
|
+
|
|
5
|
+
============================================
|
|
6
|
+
Account Invoice Report Picking Customer Note
|
|
7
|
+
============================================
|
|
8
|
+
|
|
9
|
+
..
|
|
10
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
11
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
12
|
+
!! changes will be overwritten. !!
|
|
13
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
|
+
!! source digest: sha256:d58ea5b740e9b20a332573312a8dcbfd029e5ef2684720275434d0b2a9fbc261
|
|
15
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
16
|
+
|
|
17
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
18
|
+
:target: https://odoo-community.org/page/development-status
|
|
19
|
+
:alt: Beta
|
|
20
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
21
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
22
|
+
:alt: License: AGPL-3
|
|
23
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github
|
|
24
|
+
:target: https://github.com/OCA/account-invoice-reporting/tree/16.0/account_invoice_report_picking_customer_note
|
|
25
|
+
:alt: OCA/account-invoice-reporting
|
|
26
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
27
|
+
:target: https://translation.odoo-community.org/projects/account-invoice-reporting-16-0/account-invoice-reporting-16-0-account_invoice_report_picking_customer_note
|
|
28
|
+
:alt: Translate me on Weblate
|
|
29
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
30
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoice-reporting&target_branch=16.0
|
|
31
|
+
:alt: Try me on Runboat
|
|
32
|
+
|
|
33
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
34
|
+
|
|
35
|
+
This module prints the **Picking Customer Comments** (provided by the
|
|
36
|
+
``sale_stock_picking_note`` module) from the **Delivery Address** contact on the invoice
|
|
37
|
+
report.
|
|
38
|
+
Because this module extends ``sale_stock_picking_note``, please refer to
|
|
39
|
+
`that module's README <https://github.com/OCA/sale-workflow/blob/16.0/sale_stock_picking_note/README.rst>`_
|
|
40
|
+
to understand the underlying fields and flow.
|
|
41
|
+
|
|
42
|
+
**Table of contents**
|
|
43
|
+
|
|
44
|
+
.. contents::
|
|
45
|
+
:local:
|
|
46
|
+
|
|
47
|
+
Use Cases / Context
|
|
48
|
+
===================
|
|
49
|
+
|
|
50
|
+
It's handy to have this default information available in the invoice.
|
|
51
|
+
There might be case where there's no delivery slip or it isn't handed to the customer.
|
|
52
|
+
|
|
53
|
+
Usage
|
|
54
|
+
=====
|
|
55
|
+
|
|
56
|
+
This module assumes you have configured and are using ``sale_stock_picking_note`` as
|
|
57
|
+
described in its README (i.e., the **Picking Customer Comments** field is available on
|
|
58
|
+
the Contact's *Sales & Purchases* tab and on the Sales Order *Other Information* tab).
|
|
59
|
+
|
|
60
|
+
**Case 1: Single Sales Order -> Single Invoice**:
|
|
61
|
+
|
|
62
|
+
#. On the Sales Order, open the *Other Information* tab and set **Picking Customer
|
|
63
|
+
Comments**.
|
|
64
|
+
#. When you create and print the invoice from this SO, the invoice report will display
|
|
65
|
+
that **Picking Customer Comments** value from the Sales Order.
|
|
66
|
+
|
|
67
|
+
**Case 2: Multiple Sales Orders -> One (Grouped) Invoice**:
|
|
68
|
+
|
|
69
|
+
*When the invoice aggregates two or more sales orders, the report prints one
|
|
70
|
+
value taken from the invoice's Delivery Address (shipping partner).*
|
|
71
|
+
|
|
72
|
+
#. Create two Sales Orders for the same customer using the same **Delivery Address**.
|
|
73
|
+
Each sales order will have **Picking Customer Comments** set from its **Delivery
|
|
74
|
+
Address**. You may edit the SO value or leave it as is.
|
|
75
|
+
#. Deliver both Sales Orders by validating their related delivery pickings.
|
|
76
|
+
#. From the sales order list view, select both Sales Orders and invoice them, grouping
|
|
77
|
+
into a single invoice.
|
|
78
|
+
#. Print the grouped invoice; the invoice report will display the **Delivery Address**
|
|
79
|
+
value.
|
|
80
|
+
|
|
81
|
+
**Notes:**
|
|
82
|
+
|
|
83
|
+
- Make sure *Settings > Invoicing > Customer Invoices > Customer Addresses* is enabled.
|
|
84
|
+
- Changes made directly on pickings are not considered.
|
|
85
|
+
|
|
86
|
+
Bug Tracker
|
|
87
|
+
===========
|
|
88
|
+
|
|
89
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/issues>`_.
|
|
90
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
91
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
92
|
+
`feedback <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_picking_customer_note%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
93
|
+
|
|
94
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
95
|
+
|
|
96
|
+
Credits
|
|
97
|
+
=======
|
|
98
|
+
|
|
99
|
+
Authors
|
|
100
|
+
~~~~~~~
|
|
101
|
+
|
|
102
|
+
* Moduon
|
|
103
|
+
|
|
104
|
+
Contributors
|
|
105
|
+
~~~~~~~~~~~~
|
|
106
|
+
|
|
107
|
+
* `Moduon <https://www.moduon.team>`_:
|
|
108
|
+
|
|
109
|
+
* Rafael Blasco
|
|
110
|
+
* David Vidal
|
|
111
|
+
* Andrii Kompaniiets
|
|
112
|
+
|
|
113
|
+
Maintainers
|
|
114
|
+
~~~~~~~~~~~
|
|
115
|
+
|
|
116
|
+
This module is maintained by the OCA.
|
|
117
|
+
|
|
118
|
+
.. image:: https://odoo-community.org/logo.png
|
|
119
|
+
:alt: Odoo Community Association
|
|
120
|
+
:target: https://odoo-community.org
|
|
121
|
+
|
|
122
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
123
|
+
mission is to support the collaborative development of Odoo features and
|
|
124
|
+
promote its widespread use.
|
|
125
|
+
|
|
126
|
+
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
|
|
127
|
+
:target: https://github.com/rafaelbn
|
|
128
|
+
:alt: rafaelbn
|
|
129
|
+
.. |maintainer-Andrii9090| image:: https://github.com/Andrii9090.png?size=40px
|
|
130
|
+
:target: https://github.com/Andrii9090
|
|
131
|
+
:alt: Andrii9090
|
|
132
|
+
.. |maintainer-chienandalu| image:: https://github.com/chienandalu.png?size=40px
|
|
133
|
+
:target: https://github.com/chienandalu
|
|
134
|
+
:alt: chienandalu
|
|
135
|
+
|
|
136
|
+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
|
137
|
+
|
|
138
|
+
|maintainer-rafaelbn| |maintainer-Andrii9090| |maintainer-chienandalu|
|
|
139
|
+
|
|
140
|
+
This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/16.0/account_invoice_report_picking_customer_note>`_ project on GitHub.
|
|
141
|
+
|
|
142
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copyright 2025 Moduon Team S.L.
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
3
|
+
|
|
4
|
+
{
|
|
5
|
+
"name": "Account Invoice Report Picking Customer Note",
|
|
6
|
+
"summary": "Print picking customer note in Invoice",
|
|
7
|
+
"version": "16.0.1.0.1",
|
|
8
|
+
"category": "Account",
|
|
9
|
+
"website": "https://github.com/OCA/account-invoice-reporting",
|
|
10
|
+
"author": "Moduon, Odoo Community Association (OCA)",
|
|
11
|
+
"maintainers": ["rafaelbn", "Andrii9090", "chienandalu"],
|
|
12
|
+
"license": "AGPL-3",
|
|
13
|
+
"depends": ["sale_stock_picking_note"],
|
|
14
|
+
"data": ["views/account_invoice_report.xml"],
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Translation of Odoo Server.
|
|
2
|
+
# This file contains the translation of the following modules:
|
|
3
|
+
# * account_invoice_report_picking_customer_note
|
|
4
|
+
#
|
|
5
|
+
msgid ""
|
|
6
|
+
msgstr ""
|
|
7
|
+
"Project-Id-Version: Odoo Server 16.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: account_invoice_report_picking_customer_note
|
|
17
|
+
#: model_terms:ir.ui.view,arch_db:account_invoice_report_picking_customer_note.report_invoice_document_customer_note
|
|
18
|
+
msgid ""
|
|
19
|
+
"<strong>Customer Comments:</strong>\n"
|
|
20
|
+
" <br/>"
|
|
21
|
+
msgstr ""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Translation of Odoo Server.
|
|
2
|
+
# This file contains the translation of the following modules:
|
|
3
|
+
# * account_invoice_report_picking_customer_note
|
|
4
|
+
#
|
|
5
|
+
msgid ""
|
|
6
|
+
msgstr ""
|
|
7
|
+
"Project-Id-Version: Odoo Server 16.0\n"
|
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
|
9
|
+
"POT-Creation-Date: 2025-10-15 13:05+0000\n"
|
|
10
|
+
"PO-Revision-Date: 2025-10-15 15:06+0200\n"
|
|
11
|
+
"Last-Translator: Andrii Kompaniiets <andrii@moduon.team>\n"
|
|
12
|
+
"Language-Team: \n"
|
|
13
|
+
"Language: es_ES\n"
|
|
14
|
+
"MIME-Version: 1.0\n"
|
|
15
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
16
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
"X-Generator: Poedit 3.5\n"
|
|
19
|
+
|
|
20
|
+
#. module: account_invoice_report_picking_customer_note
|
|
21
|
+
#: model_terms:ir.ui.view,arch_db:account_invoice_report_picking_customer_note.report_invoice_document_customer_note
|
|
22
|
+
msgid ""
|
|
23
|
+
"<strong>Customer Comments:</strong>\n"
|
|
24
|
+
" <br/>"
|
|
25
|
+
msgstr ""
|
|
26
|
+
"<strong>Comentarios de cliente:</strong>\n"
|
|
27
|
+
" <br/>"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
This module prints the **Picking Customer Comments** (provided by the
|
|
2
|
+
``sale_stock_picking_note`` module) from the **Delivery Address** contact on the invoice
|
|
3
|
+
report.
|
|
4
|
+
Because this module extends ``sale_stock_picking_note``, please refer to
|
|
5
|
+
`that module's README <https://github.com/OCA/sale-workflow/blob/16.0/sale_stock_picking_note/README.rst>`_
|
|
6
|
+
to understand the underlying fields and flow.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
This module assumes you have configured and are using ``sale_stock_picking_note`` as
|
|
2
|
+
described in its README (i.e., the **Picking Customer Comments** field is available on
|
|
3
|
+
the Contact's *Sales & Purchases* tab and on the Sales Order *Other Information* tab).
|
|
4
|
+
|
|
5
|
+
**Case 1: Single Sales Order -> Single Invoice**:
|
|
6
|
+
|
|
7
|
+
#. On the Sales Order, open the *Other Information* tab and set **Picking Customer
|
|
8
|
+
Comments**.
|
|
9
|
+
#. When you create and print the invoice from this SO, the invoice report will display
|
|
10
|
+
that **Picking Customer Comments** value from the Sales Order.
|
|
11
|
+
|
|
12
|
+
**Case 2: Multiple Sales Orders -> One (Grouped) Invoice**:
|
|
13
|
+
|
|
14
|
+
*When the invoice aggregates two or more sales orders, the report prints one
|
|
15
|
+
value taken from the invoice's Delivery Address (shipping partner).*
|
|
16
|
+
|
|
17
|
+
#. Create two Sales Orders for the same customer using the same **Delivery Address**.
|
|
18
|
+
Each sales order will have **Picking Customer Comments** set from its **Delivery
|
|
19
|
+
Address**. You may edit the SO value or leave it as is.
|
|
20
|
+
#. Deliver both Sales Orders by validating their related delivery pickings.
|
|
21
|
+
#. From the sales order list view, select both Sales Orders and invoice them, grouping
|
|
22
|
+
into a single invoice.
|
|
23
|
+
#. Print the grouped invoice; the invoice report will display the **Delivery Address**
|
|
24
|
+
value.
|
|
25
|
+
|
|
26
|
+
**Notes:**
|
|
27
|
+
|
|
28
|
+
- Make sure *Settings > Invoicing > Customer Invoices > Customer Addresses* is enabled.
|
|
29
|
+
- Changes made directly on pickings are not considered.
|
|
Binary file
|
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
|
+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
+
<title>README.rst</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
:Author: David Goodger (goodger@python.org)
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
|
+
|
|
14
|
+
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
16
|
+
|
|
17
|
+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
18
|
+
customize this style sheet.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* used to remove borders from tables and images */
|
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
|
23
|
+
border: 0 }
|
|
24
|
+
|
|
25
|
+
table.borderless td, table.borderless th {
|
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
|
27
|
+
The right padding separates the table cells. */
|
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
|
29
|
+
|
|
30
|
+
.first {
|
|
31
|
+
/* Override more specific margin styles with "! important". */
|
|
32
|
+
margin-top: 0 ! important }
|
|
33
|
+
|
|
34
|
+
.last, .with-subtitle {
|
|
35
|
+
margin-bottom: 0 ! important }
|
|
36
|
+
|
|
37
|
+
.hidden {
|
|
38
|
+
display: none }
|
|
39
|
+
|
|
40
|
+
.subscript {
|
|
41
|
+
vertical-align: sub;
|
|
42
|
+
font-size: smaller }
|
|
43
|
+
|
|
44
|
+
.superscript {
|
|
45
|
+
vertical-align: super;
|
|
46
|
+
font-size: smaller }
|
|
47
|
+
|
|
48
|
+
a.toc-backref {
|
|
49
|
+
text-decoration: none ;
|
|
50
|
+
color: black }
|
|
51
|
+
|
|
52
|
+
blockquote.epigraph {
|
|
53
|
+
margin: 2em 5em ; }
|
|
54
|
+
|
|
55
|
+
dl.docutils dd {
|
|
56
|
+
margin-bottom: 0.5em }
|
|
57
|
+
|
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
63
|
+
dl.docutils dt {
|
|
64
|
+
font-weight: bold }
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
div.abstract {
|
|
68
|
+
margin: 2em 5em }
|
|
69
|
+
|
|
70
|
+
div.abstract p.topic-title {
|
|
71
|
+
font-weight: bold ;
|
|
72
|
+
text-align: center }
|
|
73
|
+
|
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
|
76
|
+
margin: 2em ;
|
|
77
|
+
border: medium outset ;
|
|
78
|
+
padding: 1em }
|
|
79
|
+
|
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
|
82
|
+
div.tip p.admonition-title {
|
|
83
|
+
font-weight: bold ;
|
|
84
|
+
font-family: sans-serif }
|
|
85
|
+
|
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
|
88
|
+
div.warning p.admonition-title, .code .error {
|
|
89
|
+
color: red ;
|
|
90
|
+
font-weight: bold ;
|
|
91
|
+
font-family: sans-serif }
|
|
92
|
+
|
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
94
|
+
compound paragraphs.
|
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
|
96
|
+
margin-bottom: 0.5em }
|
|
97
|
+
|
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
|
99
|
+
margin-top: 0.5em }
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
div.dedication {
|
|
103
|
+
margin: 2em 5em ;
|
|
104
|
+
text-align: center ;
|
|
105
|
+
font-style: italic }
|
|
106
|
+
|
|
107
|
+
div.dedication p.topic-title {
|
|
108
|
+
font-weight: bold ;
|
|
109
|
+
font-style: normal }
|
|
110
|
+
|
|
111
|
+
div.figure {
|
|
112
|
+
margin-left: 2em ;
|
|
113
|
+
margin-right: 2em }
|
|
114
|
+
|
|
115
|
+
div.footer, div.header {
|
|
116
|
+
clear: both;
|
|
117
|
+
font-size: smaller }
|
|
118
|
+
|
|
119
|
+
div.line-block {
|
|
120
|
+
display: block ;
|
|
121
|
+
margin-top: 1em ;
|
|
122
|
+
margin-bottom: 1em }
|
|
123
|
+
|
|
124
|
+
div.line-block div.line-block {
|
|
125
|
+
margin-top: 0 ;
|
|
126
|
+
margin-bottom: 0 ;
|
|
127
|
+
margin-left: 1.5em }
|
|
128
|
+
|
|
129
|
+
div.sidebar {
|
|
130
|
+
margin: 0 0 0.5em 1em ;
|
|
131
|
+
border: medium outset ;
|
|
132
|
+
padding: 1em ;
|
|
133
|
+
background-color: #ffffee ;
|
|
134
|
+
width: 40% ;
|
|
135
|
+
float: right ;
|
|
136
|
+
clear: right }
|
|
137
|
+
|
|
138
|
+
div.sidebar p.rubric {
|
|
139
|
+
font-family: sans-serif ;
|
|
140
|
+
font-size: medium }
|
|
141
|
+
|
|
142
|
+
div.system-messages {
|
|
143
|
+
margin: 5em }
|
|
144
|
+
|
|
145
|
+
div.system-messages h1 {
|
|
146
|
+
color: red }
|
|
147
|
+
|
|
148
|
+
div.system-message {
|
|
149
|
+
border: medium outset ;
|
|
150
|
+
padding: 1em }
|
|
151
|
+
|
|
152
|
+
div.system-message p.system-message-title {
|
|
153
|
+
color: red ;
|
|
154
|
+
font-weight: bold }
|
|
155
|
+
|
|
156
|
+
div.topic {
|
|
157
|
+
margin: 2em }
|
|
158
|
+
|
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
161
|
+
margin-top: 0.4em }
|
|
162
|
+
|
|
163
|
+
h1.title {
|
|
164
|
+
text-align: center }
|
|
165
|
+
|
|
166
|
+
h2.subtitle {
|
|
167
|
+
text-align: center }
|
|
168
|
+
|
|
169
|
+
hr.docutils {
|
|
170
|
+
width: 75% }
|
|
171
|
+
|
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
|
173
|
+
clear: left ;
|
|
174
|
+
float: left ;
|
|
175
|
+
margin-right: 1em }
|
|
176
|
+
|
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
|
178
|
+
clear: right ;
|
|
179
|
+
float: right ;
|
|
180
|
+
margin-left: 1em }
|
|
181
|
+
|
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
|
183
|
+
display: block;
|
|
184
|
+
margin-left: auto;
|
|
185
|
+
margin-right: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
table.align-center {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
margin-right: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.align-left {
|
|
194
|
+
text-align: left }
|
|
195
|
+
|
|
196
|
+
.align-center {
|
|
197
|
+
clear: both ;
|
|
198
|
+
text-align: center }
|
|
199
|
+
|
|
200
|
+
.align-right {
|
|
201
|
+
text-align: right }
|
|
202
|
+
|
|
203
|
+
/* reset inner alignment in figures */
|
|
204
|
+
div.align-right {
|
|
205
|
+
text-align: inherit }
|
|
206
|
+
|
|
207
|
+
/* div.align-center * { */
|
|
208
|
+
/* text-align: left } */
|
|
209
|
+
|
|
210
|
+
.align-top {
|
|
211
|
+
vertical-align: top }
|
|
212
|
+
|
|
213
|
+
.align-middle {
|
|
214
|
+
vertical-align: middle }
|
|
215
|
+
|
|
216
|
+
.align-bottom {
|
|
217
|
+
vertical-align: bottom }
|
|
218
|
+
|
|
219
|
+
ol.simple, ul.simple {
|
|
220
|
+
margin-bottom: 1em }
|
|
221
|
+
|
|
222
|
+
ol.arabic {
|
|
223
|
+
list-style: decimal }
|
|
224
|
+
|
|
225
|
+
ol.loweralpha {
|
|
226
|
+
list-style: lower-alpha }
|
|
227
|
+
|
|
228
|
+
ol.upperalpha {
|
|
229
|
+
list-style: upper-alpha }
|
|
230
|
+
|
|
231
|
+
ol.lowerroman {
|
|
232
|
+
list-style: lower-roman }
|
|
233
|
+
|
|
234
|
+
ol.upperroman {
|
|
235
|
+
list-style: upper-roman }
|
|
236
|
+
|
|
237
|
+
p.attribution {
|
|
238
|
+
text-align: right ;
|
|
239
|
+
margin-left: 50% }
|
|
240
|
+
|
|
241
|
+
p.caption {
|
|
242
|
+
font-style: italic }
|
|
243
|
+
|
|
244
|
+
p.credits {
|
|
245
|
+
font-style: italic ;
|
|
246
|
+
font-size: smaller }
|
|
247
|
+
|
|
248
|
+
p.label {
|
|
249
|
+
white-space: nowrap }
|
|
250
|
+
|
|
251
|
+
p.rubric {
|
|
252
|
+
font-weight: bold ;
|
|
253
|
+
font-size: larger ;
|
|
254
|
+
color: maroon ;
|
|
255
|
+
text-align: center }
|
|
256
|
+
|
|
257
|
+
p.sidebar-title {
|
|
258
|
+
font-family: sans-serif ;
|
|
259
|
+
font-weight: bold ;
|
|
260
|
+
font-size: larger }
|
|
261
|
+
|
|
262
|
+
p.sidebar-subtitle {
|
|
263
|
+
font-family: sans-serif ;
|
|
264
|
+
font-weight: bold }
|
|
265
|
+
|
|
266
|
+
p.topic-title {
|
|
267
|
+
font-weight: bold }
|
|
268
|
+
|
|
269
|
+
pre.address {
|
|
270
|
+
margin-bottom: 0 ;
|
|
271
|
+
margin-top: 0 ;
|
|
272
|
+
font: inherit }
|
|
273
|
+
|
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
275
|
+
margin-left: 2em ;
|
|
276
|
+
margin-right: 2em }
|
|
277
|
+
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
286
|
+
|
|
287
|
+
span.classifier {
|
|
288
|
+
font-family: sans-serif ;
|
|
289
|
+
font-style: oblique }
|
|
290
|
+
|
|
291
|
+
span.classifier-delimiter {
|
|
292
|
+
font-family: sans-serif ;
|
|
293
|
+
font-weight: bold }
|
|
294
|
+
|
|
295
|
+
span.interpreted {
|
|
296
|
+
font-family: sans-serif }
|
|
297
|
+
|
|
298
|
+
span.option {
|
|
299
|
+
white-space: nowrap }
|
|
300
|
+
|
|
301
|
+
span.pre {
|
|
302
|
+
white-space: pre }
|
|
303
|
+
|
|
304
|
+
span.problematic, pre.problematic {
|
|
305
|
+
color: red }
|
|
306
|
+
|
|
307
|
+
span.section-subtitle {
|
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
|
309
|
+
font-size: 80% }
|
|
310
|
+
|
|
311
|
+
table.citation {
|
|
312
|
+
border-left: solid 1px gray;
|
|
313
|
+
margin-left: 1px }
|
|
314
|
+
|
|
315
|
+
table.docinfo {
|
|
316
|
+
margin: 2em 4em }
|
|
317
|
+
|
|
318
|
+
table.docutils {
|
|
319
|
+
margin-top: 0.5em ;
|
|
320
|
+
margin-bottom: 0.5em }
|
|
321
|
+
|
|
322
|
+
table.footnote {
|
|
323
|
+
border-left: solid 1px black;
|
|
324
|
+
margin-left: 1px }
|
|
325
|
+
|
|
326
|
+
table.docutils td, table.docutils th,
|
|
327
|
+
table.docinfo td, table.docinfo th {
|
|
328
|
+
padding-left: 0.5em ;
|
|
329
|
+
padding-right: 0.5em ;
|
|
330
|
+
vertical-align: top }
|
|
331
|
+
|
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
333
|
+
font-weight: bold ;
|
|
334
|
+
text-align: left ;
|
|
335
|
+
white-space: nowrap ;
|
|
336
|
+
padding-left: 0 }
|
|
337
|
+
|
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
|
339
|
+
table.docutils.booktabs {
|
|
340
|
+
border: 0px;
|
|
341
|
+
border-top: 2px solid;
|
|
342
|
+
border-bottom: 2px solid;
|
|
343
|
+
border-collapse: collapse;
|
|
344
|
+
}
|
|
345
|
+
table.docutils.booktabs * {
|
|
346
|
+
border: 0px;
|
|
347
|
+
}
|
|
348
|
+
table.docutils.booktabs th {
|
|
349
|
+
border-bottom: thin solid;
|
|
350
|
+
text-align: left;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
355
|
+
font-size: 100% }
|
|
356
|
+
|
|
357
|
+
ul.auto-toc {
|
|
358
|
+
list-style-type: none }
|
|
359
|
+
|
|
360
|
+
</style>
|
|
361
|
+
</head>
|
|
362
|
+
<body>
|
|
363
|
+
<div class="document">
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="account-invoice-report-picking-customer-note">
|
|
370
|
+
<h1>Account Invoice Report Picking Customer Note</h1>
|
|
371
|
+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
372
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
373
|
+
!! changes will be overwritten. !!
|
|
374
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
+
!! source digest: sha256:d58ea5b740e9b20a332573312a8dcbfd029e5ef2684720275434d0b2a9fbc261
|
|
376
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-invoice-reporting/tree/16.0/account_invoice_report_picking_customer_note"><img alt="OCA/account-invoice-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoice-reporting-16-0/account-invoice-reporting-16-0-account_invoice_report_picking_customer_note"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-invoice-reporting&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
|
+
<p>This module prints the <strong>Picking Customer Comments</strong> (provided by the
|
|
379
|
+
<tt class="docutils literal">sale_stock_picking_note</tt> module) from the <strong>Delivery Address</strong> contact on the invoice
|
|
380
|
+
report.
|
|
381
|
+
Because this module extends <tt class="docutils literal">sale_stock_picking_note</tt>, please refer to
|
|
382
|
+
<a class="reference external" href="https://github.com/OCA/sale-workflow/blob/16.0/sale_stock_picking_note/README.rst">that module’s README</a>
|
|
383
|
+
to understand the underlying fields and flow.</p>
|
|
384
|
+
<p><strong>Table of contents</strong></p>
|
|
385
|
+
<div class="contents local topic" id="contents">
|
|
386
|
+
<ul class="simple">
|
|
387
|
+
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
|
|
388
|
+
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
|
389
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
|
390
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
|
391
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
|
392
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
|
393
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
|
394
|
+
</ul>
|
|
395
|
+
</li>
|
|
396
|
+
</ul>
|
|
397
|
+
</div>
|
|
398
|
+
<div class="section" id="use-cases-context">
|
|
399
|
+
<h2><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h2>
|
|
400
|
+
<p>It’s handy to have this default information available in the invoice.
|
|
401
|
+
There might be case where there’s no delivery slip or it isn’t handed to the customer.</p>
|
|
402
|
+
</div>
|
|
403
|
+
<div class="section" id="usage">
|
|
404
|
+
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
|
|
405
|
+
<p>This module assumes you have configured and are using <tt class="docutils literal">sale_stock_picking_note</tt> as
|
|
406
|
+
described in its README (i.e., the <strong>Picking Customer Comments</strong> field is available on
|
|
407
|
+
the Contact’s <em>Sales & Purchases</em> tab and on the Sales Order <em>Other Information</em> tab).</p>
|
|
408
|
+
<p><strong>Case 1: Single Sales Order -> Single Invoice</strong>:</p>
|
|
409
|
+
<ol class="arabic simple">
|
|
410
|
+
<li>On the Sales Order, open the <em>Other Information</em> tab and set <strong>Picking Customer
|
|
411
|
+
Comments</strong>.</li>
|
|
412
|
+
<li>When you create and print the invoice from this SO, the invoice report will display
|
|
413
|
+
that <strong>Picking Customer Comments</strong> value from the Sales Order.</li>
|
|
414
|
+
</ol>
|
|
415
|
+
<p><strong>Case 2: Multiple Sales Orders -> One (Grouped) Invoice</strong>:</p>
|
|
416
|
+
<p><em>When the invoice aggregates two or more sales orders, the report prints one
|
|
417
|
+
value taken from the invoice’s Delivery Address (shipping partner).</em></p>
|
|
418
|
+
<ol class="arabic simple">
|
|
419
|
+
<li>Create two Sales Orders for the same customer using the same <strong>Delivery Address</strong>.
|
|
420
|
+
Each sales order will have <strong>Picking Customer Comments</strong> set from its <strong>Delivery
|
|
421
|
+
Address</strong>. You may edit the SO value or leave it as is.</li>
|
|
422
|
+
<li>Deliver both Sales Orders by validating their related delivery pickings.</li>
|
|
423
|
+
<li>From the sales order list view, select both Sales Orders and invoice them, grouping
|
|
424
|
+
into a single invoice.</li>
|
|
425
|
+
<li>Print the grouped invoice; the invoice report will display the <strong>Delivery Address</strong>
|
|
426
|
+
value.</li>
|
|
427
|
+
</ol>
|
|
428
|
+
<p><strong>Notes:</strong></p>
|
|
429
|
+
<ul class="simple">
|
|
430
|
+
<li>Make sure <em>Settings > Invoicing > Customer Invoices > Customer Addresses</em> is enabled.</li>
|
|
431
|
+
<li>Changes made directly on pickings are not considered.</li>
|
|
432
|
+
</ul>
|
|
433
|
+
</div>
|
|
434
|
+
<div class="section" id="bug-tracker">
|
|
435
|
+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
|
|
436
|
+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoice-reporting/issues">GitHub Issues</a>.
|
|
437
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
438
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
439
|
+
<a class="reference external" href="https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_picking_customer_note%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
440
|
+
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
441
|
+
</div>
|
|
442
|
+
<div class="section" id="credits">
|
|
443
|
+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
|
|
444
|
+
<div class="section" id="authors">
|
|
445
|
+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
|
|
446
|
+
<ul class="simple">
|
|
447
|
+
<li>Moduon</li>
|
|
448
|
+
</ul>
|
|
449
|
+
</div>
|
|
450
|
+
<div class="section" id="contributors">
|
|
451
|
+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
|
|
452
|
+
<ul class="simple">
|
|
453
|
+
<li><a class="reference external" href="https://www.moduon.team">Moduon</a>:<ul>
|
|
454
|
+
<li>Rafael Blasco</li>
|
|
455
|
+
<li>David Vidal</li>
|
|
456
|
+
<li>Andrii Kompaniiets</li>
|
|
457
|
+
</ul>
|
|
458
|
+
</li>
|
|
459
|
+
</ul>
|
|
460
|
+
</div>
|
|
461
|
+
<div class="section" id="maintainers">
|
|
462
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
|
|
463
|
+
<p>This module is maintained by the OCA.</p>
|
|
464
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
465
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
466
|
+
</a>
|
|
467
|
+
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
468
|
+
mission is to support the collaborative development of Odoo features and
|
|
469
|
+
promote its widespread use.</p>
|
|
470
|
+
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
|
471
|
+
<p><a class="reference external image-reference" href="https://github.com/rafaelbn"><img alt="rafaelbn" src="https://github.com/rafaelbn.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/Andrii9090"><img alt="Andrii9090" src="https://github.com/Andrii9090.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/chienandalu"><img alt="chienandalu" src="https://github.com/chienandalu.png?size=40px" /></a></p>
|
|
472
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoice-reporting/tree/16.0/account_invoice_report_picking_customer_note">OCA/account-invoice-reporting</a> project on GitHub.</p>
|
|
473
|
+
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
474
|
+
</div>
|
|
475
|
+
</div>
|
|
476
|
+
</div>
|
|
477
|
+
</div>
|
|
478
|
+
</body>
|
|
479
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import test_print_picking_customer_note
|
odoo/addons/account_invoice_report_picking_customer_note/tests/test_print_picking_customer_note.py
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Copyright 2025 Moduon Team S.L.
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
|
3
|
+
|
|
4
|
+
from odoo import fields
|
|
5
|
+
from odoo.tests import Form, TransactionCase
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TestSaleStockPickingNote(TransactionCase):
|
|
9
|
+
@classmethod
|
|
10
|
+
def setUpClass(cls):
|
|
11
|
+
super().setUpClass()
|
|
12
|
+
cls.partner = cls.env["res.partner"].create(
|
|
13
|
+
{
|
|
14
|
+
"name": "Mr. Odoo",
|
|
15
|
+
"picking_customer_note": "Test customer note",
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
def _create_invoice(self):
|
|
20
|
+
invoice_vals = [
|
|
21
|
+
(
|
|
22
|
+
0,
|
|
23
|
+
0,
|
|
24
|
+
{
|
|
25
|
+
"product_id": False,
|
|
26
|
+
"quantity": 1.0,
|
|
27
|
+
"name": "Line 1",
|
|
28
|
+
"price_unit": 200.00,
|
|
29
|
+
},
|
|
30
|
+
)
|
|
31
|
+
]
|
|
32
|
+
invoice = (
|
|
33
|
+
self.env["account.move"]
|
|
34
|
+
.with_context(check_move_validity=False)
|
|
35
|
+
.create(
|
|
36
|
+
{
|
|
37
|
+
"journal_id": self.env["account.journal"]
|
|
38
|
+
.search([("type", "=", "sale")], limit=1)
|
|
39
|
+
.id,
|
|
40
|
+
"partner_id": self.partner.id,
|
|
41
|
+
"move_type": "out_invoice",
|
|
42
|
+
"invoice_line_ids": invoice_vals,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
return invoice
|
|
47
|
+
|
|
48
|
+
def _create_sale_order(self):
|
|
49
|
+
product = self.env["product.product"].create(
|
|
50
|
+
{
|
|
51
|
+
"name": "test_product",
|
|
52
|
+
"type": "product",
|
|
53
|
+
"standard_price": 1.0,
|
|
54
|
+
"list_price": 1.0,
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
so_vals = {
|
|
58
|
+
"partner_id": self.partner.id,
|
|
59
|
+
"date_order": fields.Datetime.now(),
|
|
60
|
+
"order_line": [
|
|
61
|
+
(
|
|
62
|
+
0,
|
|
63
|
+
0,
|
|
64
|
+
{
|
|
65
|
+
"name": product.name,
|
|
66
|
+
"product_id": product.id,
|
|
67
|
+
"price_unit": product.list_price,
|
|
68
|
+
},
|
|
69
|
+
)
|
|
70
|
+
],
|
|
71
|
+
}
|
|
72
|
+
return self.env["sale.order"].create(so_vals)
|
|
73
|
+
|
|
74
|
+
def test_print_picking_customer_note_in_invoice(self):
|
|
75
|
+
invoice_form = Form(self._create_invoice())
|
|
76
|
+
invoice = invoice_form.save()
|
|
77
|
+
invoice.action_post()
|
|
78
|
+
report = self.env.ref("account.account_invoices_without_payment")
|
|
79
|
+
res = str(
|
|
80
|
+
report._render_qweb_html(
|
|
81
|
+
"account.account_invoices_without_payment", invoice.id
|
|
82
|
+
)[0]
|
|
83
|
+
)
|
|
84
|
+
self.assertRegex(res, self.partner.picking_customer_note)
|
|
85
|
+
|
|
86
|
+
def test_print_picking_customer_note_in_invoice_from_sale_order(self):
|
|
87
|
+
picking_customer_note = "Test comment"
|
|
88
|
+
product = self.env["product.product"].create(
|
|
89
|
+
{
|
|
90
|
+
"name": "test_product",
|
|
91
|
+
"type": "product",
|
|
92
|
+
"standard_price": 1.0,
|
|
93
|
+
"list_price": 1.0,
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
so_vals = {
|
|
97
|
+
"partner_id": self.partner.id,
|
|
98
|
+
"date_order": fields.Datetime.now(),
|
|
99
|
+
"order_line": [
|
|
100
|
+
(
|
|
101
|
+
0,
|
|
102
|
+
0,
|
|
103
|
+
{
|
|
104
|
+
"name": product.name,
|
|
105
|
+
"product_id": product.id,
|
|
106
|
+
"price_unit": product.list_price,
|
|
107
|
+
},
|
|
108
|
+
)
|
|
109
|
+
],
|
|
110
|
+
}
|
|
111
|
+
so = self.env["sale.order"].create(so_vals)
|
|
112
|
+
so.picking_customer_note = picking_customer_note
|
|
113
|
+
so.action_confirm()
|
|
114
|
+
invoice = so._create_invoices()
|
|
115
|
+
invoice.action_post()
|
|
116
|
+
report = self.env.ref("account.account_invoices_without_payment")
|
|
117
|
+
res = str(
|
|
118
|
+
report._render_qweb_html(
|
|
119
|
+
"account.account_invoices_without_payment", invoice.id
|
|
120
|
+
)[0]
|
|
121
|
+
)
|
|
122
|
+
self.assertRegex(res, picking_customer_note)
|
|
123
|
+
|
|
124
|
+
def test_print_picking_customer_note_in_invoice_more_one_sale_orders(self):
|
|
125
|
+
invoice = self._create_invoice()
|
|
126
|
+
so_1 = self._create_sale_order()
|
|
127
|
+
so_2 = self._create_sale_order()
|
|
128
|
+
so_1.picking_customer_note = "Picking Note"
|
|
129
|
+
so_2.picking_customer_note = "Picking Note SO 2"
|
|
130
|
+
invoice.invoice_line_ids.sale_line_ids.order_id = [so_1, so_2]
|
|
131
|
+
invoice.action_post()
|
|
132
|
+
report = self.env.ref("account.account_invoices_without_payment")
|
|
133
|
+
res = str(
|
|
134
|
+
report._render_qweb_html(
|
|
135
|
+
"account.account_invoices_without_payment", invoice.id
|
|
136
|
+
)[0]
|
|
137
|
+
)
|
|
138
|
+
self.assertRegex(res, self.partner.picking_customer_note)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<!-- Copyright 2025 Moduon Team S.L. <info@moduon.team>
|
|
3
|
+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
|
4
|
+
<odoo>
|
|
5
|
+
<template
|
|
6
|
+
id="report_invoice_document_customer_note"
|
|
7
|
+
inherit_id="account.report_invoice_document"
|
|
8
|
+
>
|
|
9
|
+
<xpath expr="//p[@name='incoterm']" position="after">
|
|
10
|
+
<t t-if="o.sale_order_count == 1">
|
|
11
|
+
<t
|
|
12
|
+
t-set="picking_customer_note"
|
|
13
|
+
t-value="o.invoice_line_ids.sale_line_ids.order_id.picking_customer_note"
|
|
14
|
+
/>
|
|
15
|
+
</t>
|
|
16
|
+
<!-- Just show the customer's default note so we don't have that multiple notes from several orders (or no order) -->
|
|
17
|
+
<t t-else="">
|
|
18
|
+
<t
|
|
19
|
+
t-set="picking_customer_note"
|
|
20
|
+
t-value="o.partner_shipping_id.picking_customer_note"
|
|
21
|
+
/>
|
|
22
|
+
</t>
|
|
23
|
+
<p t-if="picking_customer_note">
|
|
24
|
+
<strong>Customer Comments:</strong>
|
|
25
|
+
<br />
|
|
26
|
+
<span t-out="picking_customer_note" />
|
|
27
|
+
</p>
|
|
28
|
+
</xpath>
|
|
29
|
+
</template>
|
|
30
|
+
</odoo>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: odoo-addon-account_invoice_report_picking_customer_note
|
|
3
|
+
Version: 16.0.1.0.1
|
|
4
|
+
Summary: Print picking customer note in Invoice
|
|
5
|
+
Home-page: https://github.com/OCA/account-invoice-reporting
|
|
6
|
+
Author: Moduon, Odoo Community Association (OCA)
|
|
7
|
+
Author-email: support@odoo-community.org
|
|
8
|
+
License: AGPL-3
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Framework :: Odoo
|
|
11
|
+
Classifier: Framework :: Odoo :: 16.0
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Requires-Dist: odoo-addon-sale-stock-picking-note<16.1dev,>=16.0dev
|
|
15
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
|
16
|
+
|
|
17
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
18
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
19
|
+
:alt: Odoo Community Association
|
|
20
|
+
|
|
21
|
+
============================================
|
|
22
|
+
Account Invoice Report Picking Customer Note
|
|
23
|
+
============================================
|
|
24
|
+
|
|
25
|
+
..
|
|
26
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
28
|
+
!! changes will be overwritten. !!
|
|
29
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30
|
+
!! source digest: sha256:d58ea5b740e9b20a332573312a8dcbfd029e5ef2684720275434d0b2a9fbc261
|
|
31
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
32
|
+
|
|
33
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
34
|
+
:target: https://odoo-community.org/page/development-status
|
|
35
|
+
:alt: Beta
|
|
36
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
37
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
38
|
+
:alt: License: AGPL-3
|
|
39
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github
|
|
40
|
+
:target: https://github.com/OCA/account-invoice-reporting/tree/16.0/account_invoice_report_picking_customer_note
|
|
41
|
+
:alt: OCA/account-invoice-reporting
|
|
42
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
43
|
+
:target: https://translation.odoo-community.org/projects/account-invoice-reporting-16-0/account-invoice-reporting-16-0-account_invoice_report_picking_customer_note
|
|
44
|
+
:alt: Translate me on Weblate
|
|
45
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
46
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoice-reporting&target_branch=16.0
|
|
47
|
+
:alt: Try me on Runboat
|
|
48
|
+
|
|
49
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
50
|
+
|
|
51
|
+
This module prints the **Picking Customer Comments** (provided by the
|
|
52
|
+
``sale_stock_picking_note`` module) from the **Delivery Address** contact on the invoice
|
|
53
|
+
report.
|
|
54
|
+
Because this module extends ``sale_stock_picking_note``, please refer to
|
|
55
|
+
`that module's README <https://github.com/OCA/sale-workflow/blob/16.0/sale_stock_picking_note/README.rst>`_
|
|
56
|
+
to understand the underlying fields and flow.
|
|
57
|
+
|
|
58
|
+
**Table of contents**
|
|
59
|
+
|
|
60
|
+
.. contents::
|
|
61
|
+
:local:
|
|
62
|
+
|
|
63
|
+
Use Cases / Context
|
|
64
|
+
===================
|
|
65
|
+
|
|
66
|
+
It's handy to have this default information available in the invoice.
|
|
67
|
+
There might be case where there's no delivery slip or it isn't handed to the customer.
|
|
68
|
+
|
|
69
|
+
Usage
|
|
70
|
+
=====
|
|
71
|
+
|
|
72
|
+
This module assumes you have configured and are using ``sale_stock_picking_note`` as
|
|
73
|
+
described in its README (i.e., the **Picking Customer Comments** field is available on
|
|
74
|
+
the Contact's *Sales & Purchases* tab and on the Sales Order *Other Information* tab).
|
|
75
|
+
|
|
76
|
+
**Case 1: Single Sales Order -> Single Invoice**:
|
|
77
|
+
|
|
78
|
+
#. On the Sales Order, open the *Other Information* tab and set **Picking Customer
|
|
79
|
+
Comments**.
|
|
80
|
+
#. When you create and print the invoice from this SO, the invoice report will display
|
|
81
|
+
that **Picking Customer Comments** value from the Sales Order.
|
|
82
|
+
|
|
83
|
+
**Case 2: Multiple Sales Orders -> One (Grouped) Invoice**:
|
|
84
|
+
|
|
85
|
+
*When the invoice aggregates two or more sales orders, the report prints one
|
|
86
|
+
value taken from the invoice's Delivery Address (shipping partner).*
|
|
87
|
+
|
|
88
|
+
#. Create two Sales Orders for the same customer using the same **Delivery Address**.
|
|
89
|
+
Each sales order will have **Picking Customer Comments** set from its **Delivery
|
|
90
|
+
Address**. You may edit the SO value or leave it as is.
|
|
91
|
+
#. Deliver both Sales Orders by validating their related delivery pickings.
|
|
92
|
+
#. From the sales order list view, select both Sales Orders and invoice them, grouping
|
|
93
|
+
into a single invoice.
|
|
94
|
+
#. Print the grouped invoice; the invoice report will display the **Delivery Address**
|
|
95
|
+
value.
|
|
96
|
+
|
|
97
|
+
**Notes:**
|
|
98
|
+
|
|
99
|
+
- Make sure *Settings > Invoicing > Customer Invoices > Customer Addresses* is enabled.
|
|
100
|
+
- Changes made directly on pickings are not considered.
|
|
101
|
+
|
|
102
|
+
Bug Tracker
|
|
103
|
+
===========
|
|
104
|
+
|
|
105
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/issues>`_.
|
|
106
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
107
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
108
|
+
`feedback <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_picking_customer_note%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
109
|
+
|
|
110
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
111
|
+
|
|
112
|
+
Credits
|
|
113
|
+
=======
|
|
114
|
+
|
|
115
|
+
Authors
|
|
116
|
+
~~~~~~~
|
|
117
|
+
|
|
118
|
+
* Moduon
|
|
119
|
+
|
|
120
|
+
Contributors
|
|
121
|
+
~~~~~~~~~~~~
|
|
122
|
+
|
|
123
|
+
* `Moduon <https://www.moduon.team>`_:
|
|
124
|
+
|
|
125
|
+
* Rafael Blasco
|
|
126
|
+
* David Vidal
|
|
127
|
+
* Andrii Kompaniiets
|
|
128
|
+
|
|
129
|
+
Maintainers
|
|
130
|
+
~~~~~~~~~~~
|
|
131
|
+
|
|
132
|
+
This module is maintained by the OCA.
|
|
133
|
+
|
|
134
|
+
.. image:: https://odoo-community.org/logo.png
|
|
135
|
+
:alt: Odoo Community Association
|
|
136
|
+
:target: https://odoo-community.org
|
|
137
|
+
|
|
138
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
139
|
+
mission is to support the collaborative development of Odoo features and
|
|
140
|
+
promote its widespread use.
|
|
141
|
+
|
|
142
|
+
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
|
|
143
|
+
:target: https://github.com/rafaelbn
|
|
144
|
+
:alt: rafaelbn
|
|
145
|
+
.. |maintainer-Andrii9090| image:: https://github.com/Andrii9090.png?size=40px
|
|
146
|
+
:target: https://github.com/Andrii9090
|
|
147
|
+
:alt: Andrii9090
|
|
148
|
+
.. |maintainer-chienandalu| image:: https://github.com/chienandalu.png?size=40px
|
|
149
|
+
:target: https://github.com/chienandalu
|
|
150
|
+
:alt: chienandalu
|
|
151
|
+
|
|
152
|
+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
|
153
|
+
|
|
154
|
+
|maintainer-rafaelbn| |maintainer-Andrii9090| |maintainer-chienandalu|
|
|
155
|
+
|
|
156
|
+
This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/16.0/account_invoice_report_picking_customer_note>`_ project on GitHub.
|
|
157
|
+
|
|
158
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
odoo/addons/account_invoice_report_picking_customer_note/README.rst,sha256=I9wv6TlT2HloS7XCINe2qISRtMFOQ8UUWTg8Fb052EU,5933
|
|
2
|
+
odoo/addons/account_invoice_report_picking_customer_note/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
odoo/addons/account_invoice_report_picking_customer_note/__manifest__.py,sha256=IoB02nKNUM6VC62lksHnCxajW0fLvaDdKhrxAOWH8Os,582
|
|
4
|
+
odoo/addons/account_invoice_report_picking_customer_note/i18n/account_invoice_report_picking_customer_note.pot,sha256=hUB7aNlGWruVlPlkPvS4PnTebuZWJ5cJ825-aIGjIQg,648
|
|
5
|
+
odoo/addons/account_invoice_report_picking_customer_note/i18n/es.po,sha256=GCtne1zrgkA_SujtFrCSOcu-GCBCWCl6PVfRmQ1qKSE,925
|
|
6
|
+
odoo/addons/account_invoice_report_picking_customer_note/readme/CONTEXT.rst,sha256=3101J5BZwkEtKg0ndpsYNu6zKoMKXoHtfcLNKNIjYhs,156
|
|
7
|
+
odoo/addons/account_invoice_report_picking_customer_note/readme/CONTRIBUTORS.rst,sha256=uF5sKnlosErSZEWaPrd7zQPOwbynaAdtzkp7ikqdLmE,98
|
|
8
|
+
odoo/addons/account_invoice_report_picking_customer_note/readme/DESCRIPTION.rst,sha256=NGJLU0MoJZaGGO4WODGIJ5ELwhhbsQaPqkHAzhXQS5g,393
|
|
9
|
+
odoo/addons/account_invoice_report_picking_customer_note/readme/USAGE.rst,sha256=J2ltYKJb4-Yeed4rnzUB4aAr0zYhizclZD-HWNbbvUM,1444
|
|
10
|
+
odoo/addons/account_invoice_report_picking_customer_note/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
11
|
+
odoo/addons/account_invoice_report_picking_customer_note/static/description/index.html,sha256=9BIka_lnFBoJ6NlF0-cpZGFsAzszeKRUyh1ykJTImu8,16145
|
|
12
|
+
odoo/addons/account_invoice_report_picking_customer_note/tests/__init__.py,sha256=wkpQQiZfS9Kc0EF5sMZZJApXnXYgq5LQmcSyLRCM58E,47
|
|
13
|
+
odoo/addons/account_invoice_report_picking_customer_note/tests/test_print_picking_customer_note.py,sha256=cPubDNGLEilQ8iG8I0awqnOB7y5bAx-ACtFosWUzv4o,4642
|
|
14
|
+
odoo/addons/account_invoice_report_picking_customer_note/views/account_invoice_report.xml,sha256=9zqxPnM7bAGbDK9MgO3qb14La1BEgyY6yJJwsE6zrQQ,1173
|
|
15
|
+
odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/METADATA,sha256=8BCLJlIzmm4CVvYseNLktpuhVPn6nNm24WmzIkvt47o,6567
|
|
16
|
+
odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
17
|
+
odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
18
|
+
odoo_addon_account_invoice_report_picking_customer_note-16.0.1.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|