Skip to content

Commit f1957f9

Browse files
committed
Merge PR #223 into 19.0
Signed-off-by pedrobaeza
2 parents dba1b86 + 9d39efe commit f1957f9

35 files changed

+4260
-0
lines changed

product_pack/README.rst

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
============
2+
Product Pack
3+
============
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:6412314c32b470ebaa9ba73edd671e2513bf0b8c9faa4703dcb22faf76692670
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--pack-lightgray.png?logo=github
20+
:target: https://github.com/OCA/product-pack/tree/16.0/product_pack
21+
:alt: OCA/product-pack
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/product-pack-16-0/product-pack-16-0-product_pack
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-pack&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows you to define a product as a *Product Pack*. Each
32+
*Product Pack* has a list of products that are part of this pack.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Usage
40+
=====
41+
42+
To use this module, you need to:
43+
44+
#. Go to *Sales > Products > Products*, create a product and set "Is Pack?".
45+
#. Set *Pack Type* and *Pack component price*.
46+
#. Then choose the products to include in the pack.
47+
48+
`Product pack` is a base module for `sale_product_pack` and other modules that
49+
needs to use packs. `Pack type` and `Pack component price` are used to define
50+
the behavior that the packs will have when it is selected in the sales order
51+
lines (if `sale_product_pack` module is installed).
52+
The options of this field are the followings:
53+
54+
`Pack type`:
55+
56+
* Detailed: It allows you to select an option defined in
57+
`Pack component price` field.
58+
* Non Detailed: Will not show the components information,
59+
only the pack product and the price will be the its price plus the sum of
60+
all the components prices.
61+
62+
`Pack component price`:
63+
64+
* Detailed per component: will show each components and its prices,
65+
including the pack product itself with its price.
66+
* Totalized in main product: will show each component but will not show
67+
components prices. The pack product will be the only one that has price
68+
and this one will be its price plus the sum of all the components prices.
69+
* Ignored: will show each components but will not show
70+
components prices. The pack product will be the only one that has price
71+
and this one will be the price set in the pack product.
72+
73+
+-----------------------------+-----------------------------+---------------------------------+-----------------------------------------+----------------------+
74+
| **Pack type** | **Show components on SO?** | **Sale price** | **Discount** | **Can be modified?** |
75+
+=============================+=============================+=================================+=========================================+======================+
76+
| **Detailed per components** | Yes, with their prices | Components + Pack | Applies to the price of the pack and | Yes, configurable |
77+
| | | | the components | |
78+
+-----------------------------+-----------------------------+---------------------------------+-----------------------------------------+----------------------+
79+
| **Detailed - Totalized** | Yes, with their prices at 0 | Components | Applies to the total (pack + components)| No |
80+
+-----------------------------+-----------------------------+---------------------------------+-----------------------------------------+----------------------+
81+
| **Detailed - Ignored** | Yes, with their prices at 0 | Only Pack | Applies to the pack | No |
82+
+-----------------------------+-----------------------------+---------------------------------+-----------------------------------------+----------------------+
83+
| **No detailed** | No | Components | Applies to the total (pack + components)| No |
84+
+-----------------------------+-----------------------------+---------------------------------+-----------------------------------------+----------------------+
85+
86+
**Note:** If pricelist enabled, Odoo will display the price according to the corresponding pricelist. In the case of a pricelist with discount policy "Show public price & discount to the customer" keep in mind that the "Non Detailed" and "Detailed - Totalized in main product" packs do not display the discount.
87+
88+
Known issues / Roadmap
89+
======================
90+
91+
* It could add another *Pack Type* called maybe *merged* in *Packs*, in which
92+
the calculation of the related sale order line *Unit Price* is equal to
93+
*main product Pack price* + *sum of all its component*
94+
* Make *product.pack.line* multi-company
95+
96+
Bug Tracker
97+
===========
98+
99+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-pack/issues>`_.
100+
In case of trouble, please check there if your issue has already been reported.
101+
If you spotted it first, help us to smash it by providing a detailed and welcomed
102+
`feedback <https://github.com/OCA/product-pack/issues/new?body=module:%20product_pack%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
103+
104+
Do not contact contributors directly about support or help with technical issues.
105+
106+
Credits
107+
=======
108+
109+
Authors
110+
~~~~~~~
111+
112+
* NaN·tic
113+
* ADHOC SA
114+
* Tecnativa
115+
116+
Contributors
117+
~~~~~~~~~~~~
118+
119+
* `ADHOC SA <https://www.adhoc.com.ar>`_:
120+
121+
* Juan José Scarafía
122+
* Nicolas Mac Rouillon
123+
* Katherine Zaoral
124+
* Bruno Zanotti
125+
* Augusto Weiss
126+
* Nicolas Col
127+
* `NaN·TIC <http://www.nan-tic.com>`_
128+
* `Tecnativa <https://www.tecnativa.com>`_:
129+
130+
* Ernesto Tejeda
131+
* Pedro M. Baeza
132+
* Jairo Llopis
133+
* Sergio Teruel
134+
* `Sygel <https://www.sygel.es>`_:
135+
136+
* Manuel Regidor
137+
138+
* `Acsone <https://www.acsone.eu/>`_:
139+
140+
* Maxime Franco
141+
142+
Maintainers
143+
~~~~~~~~~~~
144+
145+
This module is maintained by the OCA.
146+
147+
.. image:: https://odoo-community.org/logo.png
148+
:alt: Odoo Community Association
149+
:target: https://odoo-community.org
150+
151+
OCA, or the Odoo Community Association, is a nonprofit organization whose
152+
mission is to support the collaborative development of Odoo features and
153+
promote its widespread use.
154+
155+
.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px
156+
:target: https://github.com/ernestotejeda
157+
:alt: ernestotejeda
158+
159+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
160+
161+
|maintainer-ernestotejeda|
162+
163+
This module is part of the `OCA/product-pack <https://github.com/OCA/product-pack/tree/16.0/product_pack>`_ project on GitHub.
164+
165+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

product_pack/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
2+
from . import models

product_pack/__manifest__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2019 NaN (http://www.nan-tic.com) - Àngel Àlvarez
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Product Pack",
5+
"version": "19.0.1.0.0",
6+
"category": "Product",
7+
"summary": "This module allows you to set a product as a Pack",
8+
"website": "https://github.com/OCA/product-pack",
9+
"author": "NaN·tic, ADHOC SA, Tecnativa, Odoo Community Association (OCA)",
10+
"maintainers": ["pedrobaeza"],
11+
"license": "AGPL-3",
12+
"depends": ["product"],
13+
"data": [
14+
"security/ir.model.access.csv",
15+
"views/product_pack_line_views.xml",
16+
"views/product_template_views.xml",
17+
"views/product_product_views.xml",
18+
],
19+
"demo": ["demo/product_product_demo.xml", "demo/product_pack_line_demo.xml"],
20+
"installable": True,
21+
"auto_install": False,
22+
"application": False,
23+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2019 Tecnativa - Ernesto Tejeda
3+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4+
<odoo noupdate="1">
5+
<record id="pack_cpu_detailed_components_1" model="product.pack.line">
6+
<field name="parent_product_id" ref="product_pack_cpu_detailed_components" />
7+
<field name="product_id" ref="product.product_product_20" />
8+
<field name="quantity" eval="1.0" />
9+
</record>
10+
<record id="pack_cpu_detailed_components_3" model="product.pack.line">
11+
<field name="parent_product_id" ref="product_pack_cpu_detailed_components" />
12+
<field name="product_id" ref="product.product_product_16" />
13+
<field name="quantity" eval="1.0" />
14+
</record>
15+
<record id="pack_cpu_detailed_components_4" model="product.pack.line">
16+
<field name="parent_product_id" ref="product_pack_cpu_detailed_components" />
17+
<field name="product_id" ref="product.product_product_24" />
18+
<field name="quantity" eval="1.0" />
19+
</record>
20+
<record id="pack_cpu_detailed_totalized_1" model="product.pack.line">
21+
<field name="parent_product_id" ref="product_pack_cpu_detailed_totalized" />
22+
<field name="product_id" ref="product.product_product_20" />
23+
<field name="quantity" eval="1.0" />
24+
</record>
25+
<record id="pack_cpu_detailed_totalized_3" model="product.pack.line">
26+
<field name="parent_product_id" ref="product_pack_cpu_detailed_totalized" />
27+
<field name="product_id" ref="product.product_product_16" />
28+
<field name="quantity" eval="1.0" />
29+
</record>
30+
<record id="pack_cpu_detailed_totalized_4" model="product.pack.line">
31+
<field name="parent_product_id" ref="product_pack_cpu_detailed_totalized" />
32+
<field name="product_id" ref="product.product_product_24" />
33+
<field name="quantity" eval="1.0" />
34+
</record>
35+
<record id="pack_cpu_detailed_ignored_1" model="product.pack.line">
36+
<field name="parent_product_id" ref="product_pack_cpu_detailed_ignored" />
37+
<field name="product_id" ref="product.product_product_20" />
38+
<field name="quantity" eval="1.0" />
39+
</record>
40+
<record id="pack_cpu_detailed_ignored_3" model="product.pack.line">
41+
<field name="parent_product_id" ref="product_pack_cpu_detailed_ignored" />
42+
<field name="product_id" ref="product.product_product_16" />
43+
<field name="quantity" eval="1.0" />
44+
</record>
45+
<record id="pack_cpu_detailed_ignored_4" model="product.pack.line">
46+
<field name="parent_product_id" ref="product_pack_cpu_detailed_ignored" />
47+
<field name="product_id" ref="product.product_product_24" />
48+
<field name="quantity" eval="1.0" />
49+
</record>
50+
<record id="pack_cpu_non_detailed_1" model="product.pack.line">
51+
<field name="parent_product_id" ref="product_pack_cpu_non_detailed" />
52+
<field name="product_id" ref="product.product_product_20" />
53+
<field name="quantity" eval="1.0" />
54+
</record>
55+
<record id="pack_cpu_non_detailed_3" model="product.pack.line">
56+
<field name="parent_product_id" ref="product_pack_cpu_non_detailed" />
57+
<field name="product_id" ref="product.product_product_16" />
58+
<field name="quantity" eval="1.0" />
59+
</record>
60+
<record id="pack_cpu_non_detailed_4" model="product.pack.line">
61+
<field name="parent_product_id" ref="product_pack_cpu_non_detailed" />
62+
<field name="product_id" ref="product.product_product_24" />
63+
<field name="quantity" eval="1.0" />
64+
</record>
65+
<record id="pack_pc_detailed_components_1" model="product.pack.line">
66+
<field name="parent_product_id" ref="product_pack_pc_detailed_components" />
67+
<field name="product_id" ref="product.product_product_12" />
68+
<field name="quantity" eval="1.0" />
69+
</record>
70+
<record id="pack_pc_detailed_components_3" model="product.pack.line">
71+
<field name="parent_product_id" ref="product_pack_pc_detailed_components" />
72+
<field name="product_id" ref="product_pack_cpu_detailed_components" />
73+
<field name="quantity" eval="1.0" />
74+
</record>
75+
<record id="pack_pc_detailed_totalized_1" model="product.pack.line">
76+
<field name="parent_product_id" ref="product_pack_pc_detailed_totalized" />
77+
<field name="product_id" ref="product.product_product_12" />
78+
<field name="quantity" eval="1.0" />
79+
</record>
80+
<record id="pack_pc_detailed_totalized_3" model="product.pack.line">
81+
<field name="parent_product_id" ref="product_pack_pc_detailed_totalized" />
82+
<field name="product_id" ref="product_pack_cpu_detailed_totalized" />
83+
<field name="quantity" eval="1.0" />
84+
</record>
85+
<record id="pack_pc_detailed_ignored_1" model="product.pack.line">
86+
<field name="parent_product_id" ref="product_pack_pc_detailed_ignored" />
87+
<field name="product_id" ref="product.product_product_12" />
88+
<field name="quantity" eval="1.0" />
89+
</record>
90+
<record id="pack_pc_detailed_ignored_3" model="product.pack.line">
91+
<field name="parent_product_id" ref="product_pack_pc_detailed_ignored" />
92+
<field name="product_id" ref="product_pack_cpu_detailed_ignored" />
93+
<field name="quantity" eval="1.0" />
94+
</record>
95+
</odoo>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2019 Tecnativa - Ernesto Tejeda
3+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4+
<odoo noupdate="1">
5+
<record id="product_pack_cpu_detailed_components" model="product.product">
6+
<field name="name">Pack CPU (Detailed - Displayed Components Price)</field>
7+
<field name="categ_id" ref="product.product_category_services" />
8+
<field name="pack_ok" eval="True" />
9+
<field name="pack_type">detailed</field>
10+
<field name="pack_component_price">detailed</field>
11+
<field name="standard_price">20.5</field>
12+
<field name="list_price">30.75</field>
13+
<field name="type">service</field>
14+
</record>
15+
<record id="product_pack_cpu_detailed_totalized" model="product.product">
16+
<field name="name">Pack CPU (Detailed - Totalized Components Price)</field>
17+
<field name="categ_id" ref="product.product_category_services" />
18+
<field name="pack_ok" eval="True" />
19+
<field name="pack_type">detailed</field>
20+
<field name="pack_component_price">totalized</field>
21+
<field name="standard_price">20.5</field>
22+
<field name="list_price">30.75</field>
23+
<field name="type">service</field>
24+
</record>
25+
<record id="product_pack_cpu_detailed_ignored" model="product.product">
26+
<field name="name">Pack CPU (Detailed - Ignored Components Price)</field>
27+
<field name="categ_id" ref="product.product_category_services" />
28+
<field name="pack_ok" eval="True" />
29+
<field name="pack_type">detailed</field>
30+
<field name="pack_component_price">ignored</field>
31+
<field name="standard_price">20.5</field>
32+
<field name="list_price">30.75</field>
33+
<field name="type">service</field>
34+
</record>
35+
<record id="product_pack_cpu_non_detailed" model="product.product">
36+
<field name="name">Pack CPU (Non Detailed - Totalized Components Price)</field>
37+
<field name="categ_id" ref="product.product_category_services" />
38+
<field name="pack_ok" eval="True" />
39+
<field name="pack_type">non_detailed</field>
40+
<field name="standard_price">20.5</field>
41+
<field name="list_price">30.75</field>
42+
<field name="type">service</field>
43+
</record>
44+
<record id="product_pack_pc_detailed_components" model="product.product">
45+
<field name="name">Pack PC (Detailed - Displayed Components Price)</field>
46+
<field name="categ_id" ref="product.product_category_services" />
47+
<field name="pack_ok" eval="True" />
48+
<field name="pack_type">detailed</field>
49+
<field name="pack_component_price">detailed</field>
50+
<field name="standard_price">20.5</field>
51+
<field name="list_price">30.75</field>
52+
<field name="type">service</field>
53+
</record>
54+
<record id="product_pack_pc_detailed_totalized" model="product.product">
55+
<field name="name">Pack PC (Detailed - Totalized Components Price)</field>
56+
<field name="categ_id" ref="product.product_category_services" />
57+
<field name="pack_ok" eval="True" />
58+
<field name="pack_type">detailed</field>
59+
<field name="pack_component_price">totalized</field>
60+
<field name="standard_price">20.5</field>
61+
<field name="list_price">30.75</field>
62+
<field name="type">service</field>
63+
</record>
64+
<record id="product_pack_pc_detailed_ignored" model="product.product">
65+
<field name="name">Pack PC (Detailed - Ignored Components Price)</field>
66+
<field name="categ_id" ref="product.product_category_services" />
67+
<field name="pack_ok" eval="True" />
68+
<field name="pack_type">detailed</field>
69+
<field name="pack_component_price">ignored</field>
70+
<field name="standard_price">20.5</field>
71+
<field name="list_price">30.75</field>
72+
<field name="type">service</field>
73+
</record>
74+
</odoo>

0 commit comments

Comments
 (0)