Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] sale_product_pack_assisted: Migration to 17.0 #172

Open
wants to merge 5 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions sale_product_pack_assisted/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
=================
Sale 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--pack-lightgray.png?logo=github
:target: https://github.com/OCA/product-pack/tree/12.0/sale_product_pack
:alt: OCA/product-pack
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-sale_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/286/12.0
:alt: Try me on Runbot

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

This module adds *Product Pack* functionality to sales orders. You can choose
a *Pack* in *sales order lines* and see different behaviors depending on
"Pack type" and "Pack component price" fields options selected on this *Pack*.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

#. Go to *Sales > Products > Products*, create or select a product and check
*Is Pack?*
#. Set "Product type" and "Pack component price" fields in the *Pack* page.
#. Add the products to be included in it.
#. Go to *Sales > Orders > Quotations* and create a Quotation.
#. Add a product that has checked "Is Pack?"
#. Save data and you will see an specific behavior depending on "Pack type" and
"Pack component price" fields options selected on this *Pack*. For example,
for products that has *Detailed* option selected in "Pack type" field you
will see one *sale order line* per component that belong to this Pack.
(See *Product pack* module README.rst file)

Known issues / Roadmap
======================

* If this module is installed and stock module is installed too, when you
create a Sale order for a *Non detailed* Pack and you confirm it,
a *Stock picking* is not created with the storable components of that Pack.
So, add a new module called *sale_stock_product_pack* that adds that feature.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-pack/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-pack/issues/new?body=module:%20sale_product_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
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

* Ernesto Tejeda
* Pedro M. Baeza

* `Akretion <https://akretion.com>`_:

* Raphaël Reverdy

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.

.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px
:target: https://github.com/ernestotejeda
:alt: ernestotejeda

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ernestotejeda|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions sale_product_pack_assisted/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
21 changes: 21 additions & 0 deletions sale_product_pack_assisted/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2019 NaN (http://www.nan-tic.com) - Àngel Àlvarez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Assisted Sale product Pack",
"version": "17.0.1.0.0",
"category": "Sales",
"website": "https://github.com/OCA/product-pack",
"author": "NaN·tic, ADHOC SA, Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["jjscarafia"],
"license": "AGPL-3",
"depends": ["sale_product_pack"],
"data": [
"views/sale_order_line_pack_line_views.xml",
"views/sale_order_line_views.xml",
"views/sale_order_views.xml",
"security/ir.model.access.csv",
],
"installable": True,
"auto_install": False,
"application": False,
}
170 changes: 170 additions & 0 deletions sale_product_pack_assisted/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_product_pack_assisted
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-06 10:57+0000\n"
"PO-Revision-Date: 2020-07-06 10:57+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line__
msgid "Assisted Pack Lines"
msgstr "Líneas de Pack Asistido"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line__assisted_pack_total
msgid "Assisted Pack Total"
msgstr "Tota de Pack Asistido"

#. module: sale_product_pack_assisted
#: model_terms:ir.ui.view,arch_db:sale_product_pack_assisted.view_order_line_form2
msgid "Cancel"
msgstr "Cancelar"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__create_uid
msgid "Created by"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__create_date
msgid "Created on"
msgstr ""

#. module: sale_product_pack_assisted
#: model_terms:ir.ui.view,arch_db:sale_product_pack_assisted.view_order_stock_form
msgid "Detail"
msgstr "Detalle"

#. module: sale_product_pack_assisted
#: code:addons/sale_product_pack_assisted/models/sale_order_line.py:0
#, python-format
msgid "Details"
msgstr "Detalles"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__discount
msgid "Discount (%)"
msgstr "Descuento (%s)"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__display_name
msgid "Display Name"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__id
msgid "ID"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line____last_update
msgid "Last Modified on"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__write_uid
msgid "Last Updated by"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__write_date
msgid "Last Updated on"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model.fields.selection,name:sale_product_pack_assisted.selection__product_template__pack_type__non_detailed_assisted
msgid "Non Detailed - Assisted"
msgstr "No Detallado - Asistido"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,help:sale_product_pack_assisted.field_product_product__pack_type
#: model:ir.model.fields,help:sale_product_pack_assisted.field_product_template__pack_type
msgid ""
"On sale orders or purchase orders:\n"
"* Detailed: Display components individually in the sale order.\n"
"* Non Detailed: Do not display components individually in the sale order.\n"
"* Non Detailed - Assisted: Do not display components individually in the sale order but gives a template that user can edit to calculate pack amount"
msgstr ""
"En órdenes de venta u órdenes de compra:\n"
"* Detallado: Muestra los componentes individualmente en lineas de la Orden "
"de Venta/Orden de Compra\n"
"* No Detallado: No muestra los componentes individualmente en lineas de la "
"Orden de Venta/Orden de Compra\n"
"* No Detallado - Asistido: No muestra los componentes individualmente en lineas de la "
"Orden de Venta/Orden de Compra pero ofrece una plantilla que el usuario puede utilizar para calcular el importe del pack"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__order_line_id
msgid "Order Line"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_product_product__pack_type
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_product_template__pack_type
msgid "Pack Type"
msgstr "Tipo de Pack"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__product_id
msgid "Product"
msgstr "Producto"

#. module: sale_product_pack_assisted
#: model:ir.model,name:sale_product_pack_assisted.model_product_template
msgid "Product Template"
msgstr "Plantilla de producto"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__product_uom_qty
msgid "Quantity"
msgstr "Cantidad"

#. module: sale_product_pack_assisted
#: model:ir.model,name:sale_product_pack_assisted.model_sale_order_line_pack_line
msgid "Sale Order None Detailed Pack Lines"
msgstr ""

#. module: sale_product_pack_assisted
#: model:ir.model,name:sale_product_pack_assisted.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de pedido de venta"

#. module: sale_product_pack_assisted
#: model_terms:ir.ui.view,arch_db:sale_product_pack_assisted.view_sale_line_pack_line_tree
msgid "Sales Order Line Pack Lines"
msgstr ""

#. module: sale_product_pack_assisted
#: model_terms:ir.ui.view,arch_db:sale_product_pack_assisted.view_order_line_form2
msgid "Sales Order Lines"
msgstr ""

#. module: sale_product_pack_assisted
#: model_terms:ir.ui.view,arch_db:sale_product_pack_assisted.view_order_line_form2
msgid "Save"
msgstr "Guardar"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__price_subtotal
msgid "Subtotal"
msgstr "Subtotal"

#. module: sale_product_pack_assisted
#: model:ir.model.fields,field_description:sale_product_pack_assisted.field_sale_order_line_pack_line__price_unit
msgid "Unit Price"
msgstr "Precio Unitario"

#. module: sale_product_pack_assisted
#: model_terms:ir.ui.view,arch_db:sale_product_pack_assisted.view_order_line_form2
msgid "or"
msgstr "o"
5 changes: 5 additions & 0 deletions sale_product_pack_assisted/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import sale_order_line_pack_line
from . import sale_order_line
from . import product_template
18 changes: 18 additions & 0 deletions sale_product_pack_assisted/models/product_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 ADHOC SA - Juan José Scarafía
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class ProductTemplate(models.Model):
_inherit = "product.template"

pack_type = fields.Selection(
selection_add=[("non_detailed_assisted", "Non Detailed - Assisted")],
help="On sale orders or purchase orders:\n"
"* Detailed: Display components individually in the sale order.\n"
"* Non Detailed: Do not display components individually in the"
" sale order.\n"
"* Non Detailed - Assisted: Do not display components individually in the"
" sale order but gives a template that user can edit to calculate pack amount",
)
Loading
Loading