Skip to content

Commit 21b10df

Browse files
committed
Merge PR #190 into 18.0
Signed-off-by pedrobaeza
2 parents 55fccc9 + ce9ba34 commit 21b10df

28 files changed

+2765
-0
lines changed

Diff for: sale_product_pack/README.rst

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
=================
2+
Sale 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:02f83d05c13ba22d4be351b55dcb810a27c71f7032a500073a1a098a69e95d75
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/18.0/sale_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-18-0/product-pack-18-0-sale_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=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module adds *Product Pack* functionality to sales orders. You can
32+
choose a *Pack* in *sales order lines* and see different behaviors
33+
depending on "Pack type" and "Pack component price" fields options
34+
selected on this *Pack*.
35+
36+
**Table of contents**
37+
38+
.. contents::
39+
:local:
40+
41+
Usage
42+
=====
43+
44+
To use this module, you need to:
45+
46+
1. Go to *Sales > Products > Products*, create or select a product and
47+
check *Is Pack?*
48+
2. Set "Product type" and "Pack component price" fields in the *Pack*
49+
page.
50+
3. Add the products to be included in it.
51+
4. Go to *Sales > Orders > Quotations* and create a Quotation.
52+
5. Add a product that has checked "Is Pack?"
53+
6. Save data and you will see an specific behavior depending on "Pack
54+
type" and "Pack component price" fields options selected on this
55+
*Pack*. For example, for products that has *Detailed* option selected
56+
in "Pack type" field you will see one *sale order line* per component
57+
that belong to this Pack. (See *Product pack* module README.rst file)
58+
59+
Known issues / Roadmap
60+
======================
61+
62+
- If this module is installed and stock module is installed too, when
63+
you create a Sale order for a *Non detailed* Pack and you confirm it,
64+
a *Stock picking* is not created with the storable components of that
65+
Pack. So, add a new module called *sale_stock_product_pack* that adds
66+
that feature.
67+
68+
Bug Tracker
69+
===========
70+
71+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-pack/issues>`_.
72+
In case of trouble, please check there if your issue has already been reported.
73+
If you spotted it first, help us to smash it by providing a detailed and welcomed
74+
`feedback <https://github.com/OCA/product-pack/issues/new?body=module:%20sale_product_pack%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
75+
76+
Do not contact contributors directly about support or help with technical issues.
77+
78+
Credits
79+
=======
80+
81+
Authors
82+
-------
83+
84+
* NaN·tic
85+
* ADHOC SA
86+
* Tecnativa
87+
88+
Contributors
89+
------------
90+
91+
- `Tecnativa <https://www.tecnativa.com>`__:
92+
93+
- Ernesto Tejeda
94+
- Pedro M. Baeza
95+
96+
- `Akretion <https://akretion.com>`__:
97+
98+
- Raphaël Reverdy
99+
100+
- `Open Source Integrators <https://opensourceintegrators.eu>`__:
101+
102+
- Daniel Reis <[email protected]>
103+
104+
- `Acsone <https://www.acsone.eu/>`__:
105+
106+
- Maxime Franco
107+
108+
- `ADHOC SA <https://www.adhoc.com.ar>`__:
109+
110+
- Bruno Zanotti
111+
- Augusto Weiss
112+
- Nicolas Col
113+
114+
Maintainers
115+
-----------
116+
117+
This module is maintained by the OCA.
118+
119+
.. image:: https://odoo-community.org/logo.png
120+
:alt: Odoo Community Association
121+
:target: https://odoo-community.org
122+
123+
OCA, or the Odoo Community Association, is a nonprofit organization whose
124+
mission is to support the collaborative development of Odoo features and
125+
promote its widespread use.
126+
127+
.. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px
128+
:target: https://github.com/victoralmau
129+
:alt: victoralmau
130+
131+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
132+
133+
|maintainer-victoralmau|
134+
135+
This module is part of the `OCA/product-pack <https://github.com/OCA/product-pack/tree/18.0/sale_product_pack>`_ project on GitHub.
136+
137+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Diff for: sale_product_pack/__init__.py

+2
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

Diff for: sale_product_pack/__manifest__.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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": "Sale Product Pack",
5+
"version": "18.0.1.0.0",
6+
"category": "Sales",
7+
"summary": "This module allows you to sell product packs",
8+
"website": "https://github.com/OCA/product-pack",
9+
"author": "NaN·tic, ADHOC SA, Tecnativa, Odoo Community Association (OCA)",
10+
"maintainers": ["victoralmau"],
11+
"license": "AGPL-3",
12+
"depends": ["product_pack", "sale"],
13+
"data": ["security/ir.model.access.csv", "views/product_pack_line_views.xml"],
14+
"demo": [
15+
"demo/product_pack_line_demo.xml",
16+
"demo/sale_pack_demo.xml",
17+
],
18+
"installable": True,
19+
}

Diff for: sale_product_pack/demo/product_pack_line_demo.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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.pack_cpu_detailed_components_1" model="product.pack.line">
6+
<field name="sale_discount" eval="10.0" />
7+
</record>
8+
<record id="product_pack.pack_cpu_detailed_components_3" model="product.pack.line">
9+
<field name="sale_discount" eval="10.0" />
10+
</record>
11+
<record id="product_pack.pack_cpu_detailed_totalized_1" model="product.pack.line">
12+
<field name="sale_discount" eval="10.0" />
13+
</record>
14+
<record id="product_pack.pack_cpu_detailed_totalized_3" model="product.pack.line">
15+
<field name="sale_discount" eval="10.0" />
16+
</record>
17+
<record id="product_pack.pack_cpu_non_detailed_1" model="product.pack.line">
18+
<field name="sale_discount" eval="10.0" />
19+
</record>
20+
<record id="product_pack.pack_cpu_non_detailed_3" model="product.pack.line">
21+
<field name="sale_discount" eval="10.0" />
22+
</record>
23+
</odoo>

Diff for: sale_product_pack/demo/sale_pack_demo.xml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?xml version='1.0' encoding='utf-8' ?>
2+
<odoo>
3+
<!-- Sale order -->
4+
<record id="portal_sale_order_3" model="sale.order">
5+
<field name="partner_id" ref="base.partner_demo_portal" />
6+
<field name="partner_invoice_id" ref="base.partner_demo_portal" />
7+
<field name="partner_shipping_id" ref="base.partner_demo_portal" />
8+
<field name="user_id" ref="base.user_admin" />
9+
<field name="payment_term_id" ref="account.account_payment_term_30days" />
10+
<field name="team_id" ref="sales_team.team_sales_department" />
11+
<field
12+
name="date_order"
13+
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"
14+
/>
15+
<field
16+
name="message_partner_ids"
17+
eval="[(4, ref('base.partner_demo_portal'))]"
18+
/>
19+
</record>
20+
21+
<!-- Sale order lines -->
22+
<!-- Product pack: DETAILED - COMPONENTS -->
23+
<record id="portal_sale_order_line_section_1" model="sale.order.line">
24+
<field name="order_id" ref="portal_sale_order_3" />
25+
<field name="name">Detailed Displayed Components Price</field>
26+
<field name="display_type">line_section</field>
27+
<field name="sequence">1</field>
28+
</record>
29+
<record id="portal_sale_order_line_6" model="sale.order.line">
30+
<field name="order_id" ref="portal_sale_order_3" />
31+
<field
32+
name="product_id"
33+
ref="product_pack.product_pack_cpu_detailed_components"
34+
/>
35+
<field name="sequence">2</field>
36+
</record>
37+
<!-- Product pack: DETAILED - TOTALIZED -->
38+
<record id="portal_sale_order_line_section_2" model="sale.order.line">
39+
<field name="order_id" ref="portal_sale_order_3" />
40+
<field name="name">Detailed Totalized Components Price</field>
41+
<field name="display_type">line_section</field>
42+
<field name="sequence">3</field>
43+
</record>
44+
<record id="portal_sale_order_line_7" model="sale.order.line">
45+
<field name="order_id" ref="portal_sale_order_3" />
46+
<field
47+
name="product_id"
48+
ref="product_pack.product_pack_cpu_detailed_totalized"
49+
/>
50+
<field name="sequence">4</field>
51+
</record>
52+
<!-- Product pack: DETAILED - IGNORED -->
53+
<record id="portal_sale_order_line_section_3" model="sale.order.line">
54+
<field name="order_id" ref="portal_sale_order_3" />
55+
<field name="name">Detailed Ignored Components Price</field>
56+
<field name="display_type">line_section</field>
57+
<field name="sequence">5</field>
58+
</record>
59+
<record id="portal_sale_order_line_8" model="sale.order.line">
60+
<field name="order_id" ref="portal_sale_order_3" />
61+
<field name="product_id" ref="product_pack.product_pack_cpu_detailed_ignored" />
62+
<field name="sequence">6</field>
63+
</record>
64+
<!-- Product pack: NON DETAILED -->
65+
<record id="portal_sale_order_line_section_4" model="sale.order.line">
66+
<field name="order_id" ref="portal_sale_order_3" />
67+
<field name="name">Not Detailed - Totalized Components Price</field>
68+
<field name="display_type">line_section</field>
69+
<field name="sequence">7</field>
70+
</record>
71+
<record id="portal_sale_order_line_9" model="sale.order.line">
72+
<field name="order_id" ref="portal_sale_order_3" />
73+
<field name="product_id" ref="product_pack.product_pack_cpu_non_detailed" />
74+
<field name="sequence">8</field>
75+
</record>
76+
<!-- Components -->
77+
<record id="portal_sale_order_line_section_5" model="sale.order.line">
78+
<field name="order_id" ref="portal_sale_order_3" />
79+
<field name="name">COMPONENTS</field>
80+
<field name="display_type">line_section</field>
81+
<field name="sequence">9</field>
82+
</record>
83+
<record id="portal_sale_order_line_components_1" model="sale.order.line">
84+
<field name="order_id" ref="portal_sale_order_3" />
85+
<field name="product_id" ref="product.product_product_20" />
86+
<field name="sequence">10</field>
87+
</record>
88+
89+
<record id="portal_sale_order_line_components_2" model="sale.order.line">
90+
<field name="order_id" ref="portal_sale_order_3" />
91+
<field name="product_id" ref="product.product_product_16" />
92+
<field name="sequence">11</field>
93+
</record>
94+
95+
<record id="portal_sale_order_components_3" model="sale.order.line">
96+
<field name="order_id" ref="portal_sale_order_3" />
97+
<field name="product_id" ref="product.product_product_24" />
98+
<field name="sequence">12</field>
99+
</record>
100+
101+
<function
102+
model="sale.order"
103+
name="action_confirm"
104+
eval="[[
105+
ref('portal_sale_order_3'),
106+
]]"
107+
/>
108+
</odoo>

0 commit comments

Comments
 (0)