odoo-addon-product-customerinfo-invoice 18.0.1.0.0.2__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.
@@ -0,0 +1,85 @@
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
+ Product Customer code for account invoice
7
+ =========================================
8
+
9
+ ..
10
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
+ !! This file is generated by oca-gen-addon-readme !!
12
+ !! changes will be overwritten. !!
13
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ !! source digest: sha256:7d1cd804c2799c5d7eef79cd699d83757997f659f931f6cbbc596e14aa97a911
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--invoicing-lightgray.png?logo=github
24
+ :target: https://github.com/OCA/account-invoicing/tree/18.0/product_customerinfo_invoice
25
+ :alt: OCA/account-invoicing
26
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27
+ :target: https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-product_customerinfo_invoice
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-invoicing&target_branch=18.0
31
+ :alt: Try me on Runboat
32
+
33
+ |badge1| |badge2| |badge3| |badge4| |badge5|
34
+
35
+ Based on product_customerinfo, this module loads in every account
36
+ invoice the customer code defined in the product.
37
+
38
+ **Table of contents**
39
+
40
+ .. contents::
41
+ :local:
42
+
43
+ Bug Tracker
44
+ ===========
45
+
46
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/issues>`_.
47
+ In case of trouble, please check there if your issue has already been reported.
48
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
49
+ `feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20product_customerinfo_invoice%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
50
+
51
+ Do not contact contributors directly about support or help with technical issues.
52
+
53
+ Credits
54
+ =======
55
+
56
+ Authors
57
+ -------
58
+
59
+ * Agile Business Group
60
+ * ForgeFlow
61
+
62
+ Contributors
63
+ ------------
64
+
65
+ - Nicola Malcontenti <nicola.malcontenti@agilebg.com>
66
+ - Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
67
+ - Lois Rilo <lois.rilo@forgeflow.com>
68
+ - Juany Davila <juany.davila@forgeflow.com>
69
+
70
+ Maintainers
71
+ -----------
72
+
73
+ This module is maintained by the OCA.
74
+
75
+ .. image:: https://odoo-community.org/logo.png
76
+ :alt: Odoo Community Association
77
+ :target: https://odoo-community.org
78
+
79
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
80
+ mission is to support the collaborative development of Odoo features and
81
+ promote its widespread use.
82
+
83
+ This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/18.0/product_customerinfo_invoice>`_ project on GitHub.
84
+
85
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,21 @@
1
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
2
+
3
+ from . import models
4
+
5
+ from openupgradelib import openupgrade
6
+
7
+
8
+ def _product_customerinfo_invoice_pre_init_hook(env):
9
+ if openupgrade.is_module_installed(
10
+ env.cr, "product_supplierinfo_for_customer_invoice"
11
+ ):
12
+ openupgrade.update_module_names(
13
+ env.cr,
14
+ [
15
+ (
16
+ "product_supplierinfo_for_customer_invoice",
17
+ "product_customerinfo_invoice",
18
+ ),
19
+ ],
20
+ merge_modules=True,
21
+ )
@@ -0,0 +1,19 @@
1
+ # Copyright 2013-2017 Agile Business Group sagl
2
+ # (<http://www.agilebg.com>)
3
+ # Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
4
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5
+
6
+ {
7
+ "name": "Product Customer code for account invoice",
8
+ "summary": "Based on product_customerinfo, this module loads in every "
9
+ "account invoice the customer code defined in the product",
10
+ "version": "18.0.1.0.0",
11
+ "author": "Agile Business Group, ForgeFlow, Odoo Community Association (OCA)",
12
+ "website": "https://github.com/OCA/account-invoicing",
13
+ "category": "Account",
14
+ "license": "AGPL-3",
15
+ "depends": ["account", "product_customerinfo"],
16
+ "data": ["views/account_move_view.xml"],
17
+ "installable": True,
18
+ "pre_init_hook": "_product_customerinfo_invoice_pre_init_hook",
19
+ }
@@ -0,0 +1,29 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * product_customerinfo_invoice
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 18.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: product_customerinfo_invoice
17
+ #: model:ir.model,name:product_customerinfo_invoice.model_account_move_line
18
+ msgid "Journal Item"
19
+ msgstr ""
20
+
21
+ #. module: product_customerinfo_invoice
22
+ #: model:ir.model.fields,field_description:product_customerinfo_invoice.field_account_move_line__partner_show_customer_code
23
+ msgid "Partner Show Customer Code"
24
+ msgstr ""
25
+
26
+ #. module: product_customerinfo_invoice
27
+ #: model:ir.model.fields,field_description:product_customerinfo_invoice.field_account_move_line__product_customer_code
28
+ msgid "Product Customer Code"
29
+ msgstr ""
@@ -0,0 +1 @@
1
+ from . import account_move_line
@@ -0,0 +1,31 @@
1
+ # Copyright 2013-2017 Agile Business Group sagl
2
+ # (<http://www.agilebg.com>)
3
+ # Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
4
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5
+
6
+ from odoo import api, fields, models
7
+
8
+
9
+ class AccountInvoiceLine(models.Model):
10
+ _inherit = "account.move.line"
11
+
12
+ @api.depends("product_id")
13
+ def _compute_product_customer_code(self):
14
+ for line in self:
15
+ if line.product_id and line.partner_show_customer_code:
16
+ product = line.product_id
17
+ code_id = product._select_customerinfo(partner=line.move_id.partner_id)
18
+ line.product_customer_code = code_id.product_code or ""
19
+ else:
20
+ line.product_customer_code = ""
21
+
22
+ product_customer_code = fields.Char(
23
+ compute="_compute_product_customer_code",
24
+ )
25
+ partner_show_customer_code = fields.Boolean(
26
+ compute="_compute_partner_show_customer_code"
27
+ )
28
+
29
+ def _compute_partner_show_customer_code(self):
30
+ for rec in self:
31
+ rec.partner_show_customer_code = rec.move_id.is_sale_document()
@@ -0,0 +1,4 @@
1
+ - Nicola Malcontenti \<<nicola.malcontenti@agilebg.com>\>
2
+ - Serpent Consulting Services Pvt. Ltd. \<<support@serpentcs.com>\>
3
+ - Lois Rilo \<<lois.rilo@forgeflow.com>\>
4
+ - Juany Davila \<<juany.davila@forgeflow.com>\>
@@ -0,0 +1,2 @@
1
+ Based on product_customerinfo, this module loads in every
2
+ account invoice the customer code defined in the product.
@@ -0,0 +1,434 @@
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="product-customer-code-for-account-invoice">
370
+ <h1>Product Customer code for account invoice</h1>
371
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372
+ !! This file is generated by oca-gen-addon-readme !!
373
+ !! changes will be overwritten. !!
374
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
+ !! source digest: sha256:7d1cd804c2799c5d7eef79cd699d83757997f659f931f6cbbc596e14aa97a911
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-invoicing/tree/18.0/product_customerinfo_invoice"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-product_customerinfo_invoice"><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-invoicing&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
+ <p>Based on product_customerinfo, this module loads in every account
379
+ invoice the customer code defined in the product.</p>
380
+ <p><strong>Table of contents</strong></p>
381
+ <div class="contents local topic" id="contents">
382
+ <ul class="simple">
383
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
384
+ <li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
385
+ <li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
386
+ <li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
387
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
388
+ </ul>
389
+ </li>
390
+ </ul>
391
+ </div>
392
+ <div class="section" id="bug-tracker">
393
+ <h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
394
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoicing/issues">GitHub Issues</a>.
395
+ In case of trouble, please check there if your issue has already been reported.
396
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
397
+ <a class="reference external" href="https://github.com/OCA/account-invoicing/issues/new?body=module:%20product_customerinfo_invoice%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
398
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
399
+ </div>
400
+ <div class="section" id="credits">
401
+ <h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
402
+ <div class="section" id="authors">
403
+ <h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
404
+ <ul class="simple">
405
+ <li>Agile Business Group</li>
406
+ <li>ForgeFlow</li>
407
+ </ul>
408
+ </div>
409
+ <div class="section" id="contributors">
410
+ <h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
411
+ <ul class="simple">
412
+ <li>Nicola Malcontenti &lt;<a class="reference external" href="mailto:nicola.malcontenti&#64;agilebg.com">nicola.malcontenti&#64;agilebg.com</a>&gt;</li>
413
+ <li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
414
+ <li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
415
+ <li>Juany Davila &lt;<a class="reference external" href="mailto:juany.davila&#64;forgeflow.com">juany.davila&#64;forgeflow.com</a>&gt;</li>
416
+ </ul>
417
+ </div>
418
+ <div class="section" id="maintainers">
419
+ <h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
420
+ <p>This module is maintained by the OCA.</p>
421
+ <a class="reference external image-reference" href="https://odoo-community.org">
422
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
423
+ </a>
424
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
425
+ mission is to support the collaborative development of Odoo features and
426
+ promote its widespread use.</p>
427
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoicing/tree/18.0/product_customerinfo_invoice">OCA/account-invoicing</a> project on GitHub.</p>
428
+ <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>
429
+ </div>
430
+ </div>
431
+ </div>
432
+ </div>
433
+ </body>
434
+ </html>
@@ -0,0 +1 @@
1
+ from . import test_product_customerinfo_invoice
@@ -0,0 +1,79 @@
1
+ # Copyright 2021 ForgeFlow
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3
+
4
+ from odoo import Command
5
+ from odoo.tests.common import TransactionCase
6
+
7
+
8
+ class TestProductCustomerInfoInvoice(TransactionCase):
9
+ @classmethod
10
+ def setUpClass(cls):
11
+ super().setUpClass()
12
+ cls.move_model = cls.env["account.move"]
13
+ cls.customerinfo_model = cls.env["product.customerinfo"]
14
+ cls.pricelist_model = cls.env["product.pricelist"]
15
+ cls.customer_1 = cls._create_customer("customer1")
16
+ cls.customer_2 = cls._create_customer("customer2")
17
+
18
+ cls.company = cls.env.ref("base.main_company")
19
+ cls.product = cls.env.ref("product.product_product_4")
20
+ cls.customerinfo_1 = cls.customerinfo_model.create(
21
+ {
22
+ "partner_id": cls.customer_1.id,
23
+ "product_tmpl_id": cls.product.product_tmpl_id.id,
24
+ "product_id": cls.product.id,
25
+ "product_code": "CUST1234",
26
+ }
27
+ )
28
+
29
+ @classmethod
30
+ def _create_customer(cls, name):
31
+ return cls.env["res.partner"].create(
32
+ {"name": name, "email": "example@yourcompany.com", "phone": 123456}
33
+ )
34
+
35
+ @classmethod
36
+ def _create_invoice(cls, customer):
37
+ return cls.move_model.create(
38
+ {
39
+ "journal_id": cls.env["account.journal"]
40
+ .search([("type", "=", "sale")], limit=1)
41
+ .id,
42
+ "partner_id": customer.id,
43
+ "move_type": "out_invoice",
44
+ "invoice_line_ids": [
45
+ Command.create(
46
+ {
47
+ "product_id": cls.product.id,
48
+ "quantity": 1.0,
49
+ "name": cls.product.name,
50
+ "price_unit": 450.00,
51
+ },
52
+ ),
53
+ Command.create(
54
+ {
55
+ "name": "Line without product",
56
+ "quantity": 1.0,
57
+ "price_unit": 50.00,
58
+ },
59
+ ),
60
+ ],
61
+ }
62
+ )
63
+
64
+ def test_01_invoice_line_customer_code(self):
65
+ invoice = self._create_invoice(self.customer_1)
66
+ line = invoice.invoice_line_ids.filtered(lambda il: il.product_id)
67
+ self.assertEqual(len(line), 1)
68
+ self.assertEqual(line.product_customer_code, "CUST1234")
69
+
70
+ def test_02_invoice_line_no_customer_code(self):
71
+ invoice = self._create_invoice(self.customer_2)
72
+ line = invoice.invoice_line_ids.filtered(lambda il: il.product_id)
73
+ self.assertEqual(len(line), 1)
74
+ self.assertFalse(line.product_customer_code)
75
+ line_no_product = invoice.invoice_line_ids.filtered(
76
+ lambda il: not il.product_id
77
+ )
78
+ self.assertEqual(len(line_no_product), 1)
79
+ self.assertFalse(line_no_product.product_customer_code)
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!--Copyright 2013-2017 Agile Business Group sagl
3
+ (<http://www.agilebg.com>)
4
+ Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
5
+ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
6
+ -->
7
+ <odoo>
8
+ <record id="view_move_form" model="ir.ui.view">
9
+ <field
10
+ name="name"
11
+ >account.move.form - product_supplierinfo_for_customer_invoice</field>
12
+ <field name="model">account.move</field>
13
+ <field name="inherit_id" ref="account.view_move_form" />
14
+ <field eval="16" name="priority" />
15
+ <field name="arch" type="xml">
16
+ <xpath
17
+ expr="//field[@name='invoice_line_ids']/list/field[@name='product_id']"
18
+ position="after"
19
+ >
20
+ <field name="partner_show_customer_code" column_invisible="True" />
21
+ <field
22
+ name="product_customer_code"
23
+ column_invisible="not partner_show_customer_code"
24
+ />
25
+ </xpath>
26
+ </field>
27
+ </record>
28
+ </odoo>
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.1
2
+ Name: odoo-addon-product_customerinfo_invoice
3
+ Version: 18.0.1.0.0.2
4
+ Requires-Python: >=3.10
5
+ Requires-Dist: odoo-addon-product_customerinfo==18.0.*
6
+ Requires-Dist: odoo==18.0.*
7
+ Summary: Based on product_customerinfo, this module loads in every account invoice the customer code defined in the product
8
+ Home-page: https://github.com/OCA/account-invoicing
9
+ License: AGPL-3
10
+ Author: Agile Business Group, ForgeFlow, Odoo Community Association (OCA)
11
+ Author-email: support@odoo-community.org
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Framework :: Odoo
14
+ Classifier: Framework :: Odoo :: 18.0
15
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
16
+ Description-Content-Type: text/x-rst
17
+
18
+ .. image:: https://odoo-community.org/readme-banner-image
19
+ :target: https://odoo-community.org/get-involved?utm_source=readme
20
+ :alt: Odoo Community Association
21
+
22
+ =========================================
23
+ Product Customer code for account invoice
24
+ =========================================
25
+
26
+ ..
27
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
+ !! This file is generated by oca-gen-addon-readme !!
29
+ !! changes will be overwritten. !!
30
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
+ !! source digest: sha256:7d1cd804c2799c5d7eef79cd699d83757997f659f931f6cbbc596e14aa97a911
32
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33
+
34
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
35
+ :target: https://odoo-community.org/page/development-status
36
+ :alt: Beta
37
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
38
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
39
+ :alt: License: AGPL-3
40
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github
41
+ :target: https://github.com/OCA/account-invoicing/tree/18.0/product_customerinfo_invoice
42
+ :alt: OCA/account-invoicing
43
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
44
+ :target: https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-product_customerinfo_invoice
45
+ :alt: Translate me on Weblate
46
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
47
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&target_branch=18.0
48
+ :alt: Try me on Runboat
49
+
50
+ |badge1| |badge2| |badge3| |badge4| |badge5|
51
+
52
+ Based on product_customerinfo, this module loads in every account
53
+ invoice the customer code defined in the product.
54
+
55
+ **Table of contents**
56
+
57
+ .. contents::
58
+ :local:
59
+
60
+ Bug Tracker
61
+ ===========
62
+
63
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/issues>`_.
64
+ In case of trouble, please check there if your issue has already been reported.
65
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
66
+ `feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20product_customerinfo_invoice%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
67
+
68
+ Do not contact contributors directly about support or help with technical issues.
69
+
70
+ Credits
71
+ =======
72
+
73
+ Authors
74
+ -------
75
+
76
+ * Agile Business Group
77
+ * ForgeFlow
78
+
79
+ Contributors
80
+ ------------
81
+
82
+ - Nicola Malcontenti <nicola.malcontenti@agilebg.com>
83
+ - Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
84
+ - Lois Rilo <lois.rilo@forgeflow.com>
85
+ - Juany Davila <juany.davila@forgeflow.com>
86
+
87
+ Maintainers
88
+ -----------
89
+
90
+ This module is maintained by the OCA.
91
+
92
+ .. image:: https://odoo-community.org/logo.png
93
+ :alt: Odoo Community Association
94
+ :target: https://odoo-community.org
95
+
96
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
97
+ mission is to support the collaborative development of Odoo features and
98
+ promote its widespread use.
99
+
100
+ This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/18.0/product_customerinfo_invoice>`_ project on GitHub.
101
+
102
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,17 @@
1
+ odoo/addons/product_customerinfo_invoice/README.rst,sha256=8tqYjJVJmRWipCChua8nVrlgONU_hjOichJNAwXaIFQ,3396
2
+ odoo/addons/product_customerinfo_invoice/__init__.py,sha256=hc22Ki0_2ptmDI-lMGLDjqR6XQlG-LvG6EfKYodp5Mg,580
3
+ odoo/addons/product_customerinfo_invoice/__manifest__.py,sha256=VvGiM-SbZ1t4sgHMPXjjaQ-WgGyNsRbPpWrQihVwDgo,825
4
+ odoo/addons/product_customerinfo_invoice/i18n/product_customerinfo_invoice.pot,sha256=I8bhTK0dAiBcLE4NelIk4Nv3cA0VQT_5E_ynHnNeAX8,933
5
+ odoo/addons/product_customerinfo_invoice/models/__init__.py,sha256=mF9GDUr6-OiEO9ML3T5FLEFtNN01jg2OpdHPAqiCdKA,32
6
+ odoo/addons/product_customerinfo_invoice/models/account_move_line.py,sha256=rRlOWVY2wcl28Vo385kG7u_1NnwIZwKGfn2fojF04uY,1125
7
+ odoo/addons/product_customerinfo_invoice/readme/CONTRIBUTORS.md,sha256=aXJVzDpCgOcnfYquhaTkx-6X2vsD4JQXqXCvt9Vfo1w,216
8
+ odoo/addons/product_customerinfo_invoice/readme/DESCRIPTION.md,sha256=NIqe-7LUReTODD4fcFC3qJs143eBuVKH7oDZvyp-17I,116
9
+ odoo/addons/product_customerinfo_invoice/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
10
+ odoo/addons/product_customerinfo_invoice/static/description/index.html,sha256=Ce85Zhqhvd7smn-4tl4NilupvtQ6hCtnBWCWP-SZY50,13034
11
+ odoo/addons/product_customerinfo_invoice/tests/__init__.py,sha256=1KzQrbIk1PCX6EhQLzbwtHXid2Lw_QWnus7X-l0gDTY,48
12
+ odoo/addons/product_customerinfo_invoice/tests/test_product_customerinfo_invoice.py,sha256=NNAqf3YKWeC_c2_HsrrU1UHtXLEToZGXnPhzrZ0G5NY,2990
13
+ odoo/addons/product_customerinfo_invoice/views/account_move_view.xml,sha256=gTNyjeTEk6rkBoskxbOUgRHj4kp1xlmYm92qqG_avJY,1095
14
+ odoo_addon_product_customerinfo_invoice-18.0.1.0.0.2.dist-info/METADATA,sha256=3NzgZIIZOGq-Y0hkbJDzRSbs0nTZ5Zr7rggvjPBKomo,4125
15
+ odoo_addon_product_customerinfo_invoice-18.0.1.0.0.2.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
16
+ odoo_addon_product_customerinfo_invoice-18.0.1.0.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
17
+ odoo_addon_product_customerinfo_invoice-18.0.1.0.0.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: Whool 1.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+