Skip to content

Commit 49c9518

Browse files
committed
[MIG] sale_product_set: Migration to 19.0
1 parent 2fd70bf commit 49c9518

9 files changed

Lines changed: 227 additions & 153 deletions

File tree

sale_product_set/README.rst

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
15
=================
26
Sales product set
37
=================
@@ -13,17 +17,17 @@ Sales product set
1317
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1418
:target: https://odoo-community.org/page/development-status
1519
:alt: Beta
16-
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
1721
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822
:alt: License: AGPL-3
1923
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
20-
:target: https://github.com/OCA/sale-workflow/tree/18.0/sale_product_set
24+
:target: https://github.com/OCA/sale-workflow/tree/19.0/sale_product_set
2125
:alt: OCA/sale-workflow
2226
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_product_set
27+
:target: https://translation.odoo-community.org/projects/sale-workflow-19-0/sale-workflow-19-0-sale_product_set
2428
:alt: Translate me on Weblate
2529
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=19.0
2731
:alt: Try me on Runboat
2832

2933
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -46,29 +50,28 @@ updated or removed as any other sales order lines.
4650
Usage
4751
=====
4852

49-
- Define a *product set* as sales manager:
50-
51-
- choose products
52-
- for each product, define a quantity.
53-
- for each product (if Discounts setting is active), define a discount
54-
or leave default value
55-
- Sort *set* lines, this order will be the default when added into the
56-
quotation
53+
- Define a *product set* as sales manager:
5754

58-
- Then you can remove or update added lines as any other sales order
59-
lines.
55+
- choose products
56+
- for each product, define a quantity.
57+
- for each product (if Discounts setting is active), define a
58+
discount or leave default value
59+
- Sort *set* lines, this order will be the default when added into
60+
the quotation
6061

61-
|Sale order|
62+
- Then you can remove or update added lines as any other sales order
63+
lines.
6264

63-
.. |Sale order| image:: https://raw.githubusercontent.com/sale_product_set/static/description/sale_order.png
65+
.. image:: https://raw.githubusercontent.com/sale_product_set/static/description/sale_order.png
66+
:alt: Sale order
6467

6568
Bug Tracker
6669
===========
6770

6871
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
6972
In case of trouble, please check there if your issue has already been reported.
7073
If you spotted it first, help us to smash it by providing a detailed and welcomed
71-
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_product_set%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
74+
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_product_set%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
7275

7376
Do not contact contributors directly about support or help with technical issues.
7477

@@ -83,27 +86,21 @@ Authors
8386
Contributors
8487
------------
8588

86-
- Clovis Nzouendjou <clovis@anybox.fr>
87-
- Pierre Verkest <pverkest@anybox.fr>
88-
- Denis Leemann <denis.leemann@camptocamp.com>
89-
- Simone Orsi <simone.orsi@camptocamp.com>
90-
- Souheil Bejaoui <souheil.bejaoui@acsone.eu>
91-
- Adria Gil Sorribes <adria.gil@forgeflow.com>
92-
- Phuc (Tran Thanh) <phuc@trobz.com>
93-
- Manuel Regidor <manuel.regidor@sygel.es>
94-
- `Tecnativa <https://www.tecnativa.com>`__:
95-
96-
- Pilar Vargas
97-
- Juan Carlos Oñate
98-
99-
- Nils Coenen <nils.coenen@nico-solutions.de>
100-
101-
Other credits
102-
-------------
89+
- Clovis Nzouendjou <clovis@anybox.fr>
90+
- Pierre Verkest <pverkest@anybox.fr>
91+
- Denis Leemann <denis.leemann@camptocamp.com>
92+
- Simone Orsi <simone.orsi@camptocamp.com>
93+
- Souheil Bejaoui <souheil.bejaoui@acsone.eu>
94+
- Adria Gil Sorribes <adria.gil@forgeflow.com>
95+
- Phuc (Tran Thanh) <phuc@trobz.com>
96+
- Manuel Regidor <manuel.regidor@sygel.es>
97+
- `Tecnativa <https://www.tecnativa.com>`__:
10398

104-
The development of this module has been financially supported by:
99+
- Pilar Vargas
100+
- Juan Carlos Oñate
105101

106-
- Camptocamp
102+
- Nils Coenen <nils.coenen@nico-solutions.de>
103+
- Christopher Rogos <crogos@gmail.com>
107104

108105
Maintainers
109106
-----------
@@ -118,6 +115,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
118115
mission is to support the collaborative development of Odoo features and
119116
promote its widespread use.
120117

121-
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sale_product_set>`_ project on GitHub.
118+
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/19.0/sale_product_set>`_ project on GitHub.
122119

123120
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

sale_product_set/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"category": "Sales",
77
"license": "AGPL-3",
88
"author": "Anybox, Odoo Community Association (OCA)",
9-
"version": "18.0.1.0.0",
9+
"version": "19.0.1.0.0",
1010
"website": "https://github.com/OCA/sale-workflow",
1111
"depends": ["sale", "sale_management", "product_set"],
1212
"data": [

sale_product_set/models/product_set_line.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ class ProductSetLine(models.Model):
99

1010
discount = fields.Float(string="Discount (%)", digits="Discount", default=0.0)
1111

12-
def prepare_sale_order_line_values(self, order, quantity, max_sequence=0):
12+
def prepare_sale_order_line_values(self, order, quantity, sequence=0):
1313
self.ensure_one()
14+
15+
if self.display_type:
16+
return {"name": self.name, "display_type": self.display_type}
1417
return {
1518
"order_id": order.id,
1619
"product_id": self.product_id.id,
1720
"product_uom_qty": self.quantity * quantity,
18-
"product_uom": self.product_id.uom_id.id,
19-
"sequence": max_sequence + self.sequence,
21+
"product_uom_id": self.uom_id.id,
22+
"name": self.name
23+
or self.product_id.description_sale
24+
or self.product_id.name,
25+
"sequence": sequence,
2026
"discount": self.discount,
2127
"company_id": self.company_id.id,
2228
}

sale_product_set/readme/CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
- Pilar Vargas
1111
- Juan Carlos Oñate
1212
- Nils Coenen \<<nils.coenen@nico-solutions.de>\>
13+
- Christopher Rogos \<<crogos@gmail.com>\>

sale_product_set/readme/CREDITS.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

sale_product_set/static/description/index.html

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>Sales product set</title>
6+
<title>README.rst</title>
77
<style type="text/css">
88

99
/*
@@ -360,16 +360,21 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document" id="sales-product-set">
364-
<h1 class="title">Sales product set</h1>
363+
<div class="document">
365364

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="sales-product-set">
370+
<h1>Sales product set</h1>
366371
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367372
!! This file is generated by oca-gen-addon-readme !!
368373
!! changes will be overwritten. !!
369374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370375
!! source digest: sha256:2f7beee55c7bf24a53bdf20c9eaa6dec4098d084c0bdb197a8b3702fae33e2a1
371376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_product_set"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_product_set"><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/sale-workflow&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
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/sale-workflow/tree/19.0/sale_product_set"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-19-0/sale-workflow-19-0-sale_product_set"><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/sale-workflow&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373378
<p>A <strong>product set</strong> is a list of products which end customers aren’t
374379
aware, this list is defined by sales manager.</p>
375380
<p>This module aims to load a product set in a sales order though a wizard.
@@ -385,47 +390,46 @@ <h1 class="title">Sales product set</h1>
385390
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
386391
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
387392
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
388-
<li><a class="reference internal" href="#other-credits" id="toc-entry-6">Other credits</a></li>
389-
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
393+
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
390394
</ul>
391395
</li>
392396
</ul>
393397
</div>
394398
<div class="section" id="usage">
395-
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
399+
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
396400
<ul class="simple">
397401
<li>Define a <em>product set</em> as sales manager:<ul>
398402
<li>choose products</li>
399403
<li>for each product, define a quantity.</li>
400-
<li>for each product (if Discounts setting is active), define a discount
401-
or leave default value</li>
402-
<li>Sort <em>set</em> lines, this order will be the default when added into the
403-
quotation</li>
404+
<li>for each product (if Discounts setting is active), define a
405+
discount or leave default value</li>
406+
<li>Sort <em>set</em> lines, this order will be the default when added into
407+
the quotation</li>
404408
</ul>
405409
</li>
406410
<li>Then you can remove or update added lines as any other sales order
407411
lines.</li>
408412
</ul>
409-
<p><img alt="Sale order" src="https://raw.githubusercontent.com/sale_product_set/static/description/sale_order.png" /></p>
413+
<img alt="Sale order" src="https://raw.githubusercontent.com/sale_product_set/static/description/sale_order.png" />
410414
</div>
411415
<div class="section" id="bug-tracker">
412-
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
416+
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
413417
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/issues">GitHub Issues</a>.
414418
In case of trouble, please check there if your issue has already been reported.
415419
If you spotted it first, help us to smash it by providing a detailed and welcomed
416-
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_product_set%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
420+
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_product_set%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
417421
<p>Do not contact contributors directly about support or help with technical issues.</p>
418422
</div>
419423
<div class="section" id="credits">
420-
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
424+
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
421425
<div class="section" id="authors">
422-
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
426+
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
423427
<ul class="simple">
424428
<li>Anybox</li>
425429
</ul>
426430
</div>
427431
<div class="section" id="contributors">
428-
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
432+
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
429433
<ul class="simple">
430434
<li>Clovis Nzouendjou &lt;<a class="reference external" href="mailto:clovis&#64;anybox.fr">clovis&#64;anybox.fr</a>&gt;</li>
431435
<li>Pierre Verkest &lt;<a class="reference external" href="mailto:pverkest&#64;anybox.fr">pverkest&#64;anybox.fr</a>&gt;</li>
@@ -441,28 +445,23 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
441445
</ul>
442446
</li>
443447
<li>Nils Coenen &lt;<a class="reference external" href="mailto:nils.coenen&#64;nico-solutions.de">nils.coenen&#64;nico-solutions.de</a>&gt;</li>
444-
</ul>
445-
</div>
446-
<div class="section" id="other-credits">
447-
<h2><a class="toc-backref" href="#toc-entry-6">Other credits</a></h2>
448-
<p>The development of this module has been financially supported by:</p>
449-
<ul class="simple">
450-
<li>Camptocamp</li>
448+
<li>Christopher Rogos &lt;<a class="reference external" href="mailto:crogos&#64;gmail.com">crogos&#64;gmail.com</a>&gt;</li>
451449
</ul>
452450
</div>
453451
<div class="section" id="maintainers">
454-
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
452+
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
455453
<p>This module is maintained by the OCA.</p>
456454
<a class="reference external image-reference" href="https://odoo-community.org">
457455
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
458456
</a>
459457
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
460458
mission is to support the collaborative development of Odoo features and
461459
promote its widespread use.</p>
462-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_product_set">OCA/sale-workflow</a> project on GitHub.</p>
460+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/19.0/sale_product_set">OCA/sale-workflow</a> project on GitHub.</p>
463461
<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>
464462
</div>
465463
</div>
466464
</div>
465+
</div>
467466
</body>
468467
</html>

0 commit comments

Comments
 (0)