Skip to content

Commit

Permalink
Merge 4bb6278 into 28adcd8
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestotejeda committed Sep 18, 2019
2 parents 28adcd8 + 4bb6278 commit f76f9ae
Show file tree
Hide file tree
Showing 19 changed files with 1,453 additions and 0 deletions.
113 changes: 113 additions & 0 deletions product_pack/README.rst
@@ -0,0 +1,113 @@
============
Product Pack
============

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/12.0/product_pack
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_pack
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/135/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to define a product as a *Product Pack*. Each
*Product Pack* has a list of products that are part of this pack.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

#. Go to *Sales > Products > Products*, create a product and set "Is Pack?".
#. Then set the products has to include in the product pack of the product.
#. Set *Pack Type*.

`Product pack` is a base module for `sale_product_pack` and others modules that
needs to use packs. `Pack type` is used to define the behavior that the
packs will have when it is selected in the sales order lines
(if `sale_product_pack` module is installed). The options of this field are the
followings:

* Detailed - Components Prices: will show each components and its prices,
including the pack product itself with its price.
* Detailed - Totalized Price: will show each component but will not show
components prices. The pack product will be the only one that has price
and this one will be the sum of all the components prices.
* Detailed - Fixed Price: will show each components but will not show
components prices. The pack product will be the only one that has price
and this one will be the price set in the pack product.
* None Detailed - Totalized Price: Will not show the components information,
only the pack product and the price will be the sum of all the components

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_pack%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* NaN·tic
* ADHOC SA
* Tecnativa

Contributors
~~~~~~~~~~~~

* `ADHOC SA <https://www.adhoc.com.ar>`_:

* Juan José Scarafía
* Nicolas Mac Rouillon
* Katherine Zaoral
* `NaN·TIC <http://www.nan-tic.com>`_
* `Tecnativa <https://www.tecnativa.com>`_:

* Ernesto Tejeda
* Pedro M. Baeza
* Jairo Llopis
* Sergio Teruel

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/12.0/product_pack>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions product_pack/__init__.py
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
30 changes: 30 additions & 0 deletions product_pack/__manifest__.py
@@ -0,0 +1,30 @@
# Copyright 2019 NaN (http://www.nan-tic.com) - Àngel Àlvarez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
'name': 'Product Pack',
'version': '12.0.1.0.0',
'category': 'Product',
'summary': 'This module allows you to set a product as a product pack',
'website': 'https://github.com/OCA/product-attribute',
'author': 'NaN·tic, '
'ADHOC SA, '
'Tecnativa, '
'Odoo Community Association (OCA)',
'license': 'AGPL-3',
'depends': [
'product',
],
'data': [
'security/ir.model.access.csv',
'views/product_pack_line_views.xml',
'views/product_template_views.xml',
'views/product_product_views.xml',
],
'demo': [
'demo/product_product_demo.xml',
'demo/product_pack_line_demo.xml',
],
'installable': True,
'auto_install': False,
'application': False,
}
96 changes: 96 additions & 0 deletions product_pack/demo/product_pack_line_demo.xml
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

<odoo noupdate="1">
<record id="pack_cpu_detailed_components_1" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_components"/>
<field name="product_id" ref="product.product_product_20"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_components_3" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_components"/>
<field name="product_id" ref="product.product_product_16"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_components_4" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_components"/>
<field name="product_id" ref="product.product_product_24"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_totalized_1" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_totalized"/>
<field name="product_id" ref="product.product_product_20"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_totalized_3" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_totalized"/>
<field name="product_id" ref="product.product_product_16"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_totalized_4" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_totalized"/>
<field name="product_id" ref="product.product_product_24"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_fixed_1" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_fixed"/>
<field name="product_id" ref="product.product_product_20"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_fixed_3" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_fixed"/>
<field name="product_id" ref="product.product_product_16"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_detailed_fixed_4" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_detailed_fixed"/>
<field name="product_id" ref="product.product_product_24"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_none_detailed_totalized_1" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_none_detailed_totalized"/>
<field name="product_id" ref="product.product_product_20"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_none_detailed_totalized_3" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_none_detailed_totalized"/>
<field name="product_id" ref="product.product_product_16"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_cpu_none_detailed_totalized_4" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_cpu_none_detailed_totalized"/>
<field name="product_id" ref="product.product_product_24"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_pc_detailed_components_1" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_pc_detailed_components"/>
<field name="product_id" ref="product.product_product_12"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_pc_detailed_components_3" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_pc_detailed_components"/>
<field name="product_id" ref="product_pack_cpu_detailed_components"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_pc_detailed_totalized_1" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_pc_detailed_totalized"/>
<field name="product_id" ref="product.product_product_12"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_pc_detailed_totalized_3" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_pc_detailed_totalized"/>
<field name="product_id" ref="product_pack_cpu_detailed_totalized"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_pc_detailed_fixed_1" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_pc_detailed_fixed"/>
<field name="product_id" ref="product.product_product_12"/>
<field name="quantity" eval="1.0"/>
</record>
<record id="pack_pc_detailed_fixed_3" model="product.pack.line">
<field name="parent_product_id" ref="product_pack_pc_detailed_fixed"/>
<field name="product_id" ref="product_pack_cpu_detailed_fixed"/>
<field name="quantity" eval="1.0"/>
</record>
</odoo>
69 changes: 69 additions & 0 deletions product_pack/demo/product_product_demo.xml
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

<odoo noupdate="1">
<record id="product_pack_cpu_detailed_components" model="product.product">
<field name="name">Pack CPU (Detailed Components Price)</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="pack_ok" eval="True"/>
<field name="pack_type">components_price</field>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
</record>
<record id="product_pack_cpu_detailed_totalized" model="product.product">
<field name="name">Pack CPU (Detailed Totalized Price)</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="pack_ok" eval="True"/>
<field name="pack_type">totalized_price</field>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
</record>
<record id="product_pack_cpu_detailed_fixed" model="product.product">
<field name="name">Pack CPU (Detailed Fixed Price)</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="pack_ok" eval="True"/>
<field name="pack_type">fixed_price</field>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
</record>
<record id="product_pack_cpu_none_detailed_totalized" model="product.product">
<field name="name">Pack CPU (None Detailed Totalized Price)</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="pack_ok" eval="True"/>
<field name="pack_type">none_detailed_totalized_price</field>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
</record>
<record id="product_pack_pc_detailed_components" model="product.product">
<field name="name">Pack PC (Detailed Components Price)</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="pack_ok" eval="True"/>
<field name="pack_type">components_price</field>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
</record>
<record id="product_pack_pc_detailed_totalized" model="product.product">
<field name="name">Pack PC (Detailed Totalized Price)</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="pack_ok" eval="True"/>
<field name="pack_type">totalized_price</field>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
</record>
<record id="product_pack_pc_detailed_fixed" model="product.product">
<field name="name">Pack PC (Detailed Fixed Price)</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="pack_ok" eval="True"/>
<field name="pack_type">fixed_price</field>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
</record>
</odoo>

0 comments on commit f76f9ae

Please sign in to comment.