Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
90d7d49
[ADD] purchase_variant_configurator
sbidoul Nov 17, 2016
1761689
[MIG] purchase_variant_configurator: Migration to 10.0
chienandalu Jul 4, 2017
8a11cdc
[FIX] *_variant_configurator*: Adjust things for proper purchase on c…
pedrobaeza Dec 14, 2017
f5f79c6
[MIG] purchase_variant_configurator: Migration to 11.0
ernestotejeda Oct 7, 2018
711c0d9
[FIX] *_variant_configurator: don't lose attribute on save
pedrobaeza Nov 29, 2018
8c3f6dc
[FIX] sale_variant_configurator: attribute lines are not created
cubells Dec 5, 2018
2b1bae0
[11.0][FIX] Filter products according to the view
SalahAdDin Dec 12, 2018
23791c0
[MIG] purchase_variant_configurator: pre-commit
ThomasBinsfeld Jun 19, 2020
9c01236
[MIG] purchase_variant_configurator from 11.0 to 13.0
ThomasBinsfeld Jun 19, 2020
695bad7
Added translation using Weblate (Spanish (Argentina))
ibuioli Apr 4, 2021
01b0092
Translated using Weblate (Italian)
francesco-ooops Jan 2, 2023
5a8ed67
[MIG] purchase_variant_configurator: Migration to 16.0
alexbottemanne Jan 8, 2024
ef7eee5
[UPD] Update purchase_variant_configurator.pot
Apr 24, 2024
49e2f0a
Update translation files
weblate Apr 25, 2024
03d2445
Translated using Weblate (Italian)
mymage Apr 29, 2024
d477aae
Translated using Weblate (Portuguese (Brazil))
May 22, 2024
4a589f5
[MIG] purchase_variant_configurator_on_confirm: Merged into purchase_…
victoralmau Jun 25, 2024
fb8e84d
[UPD] Update purchase_variant_configurator.pot
Jun 28, 2024
3e91306
[BOT] post-merge updates
OCA-git-bot Jun 28, 2024
9cbd316
Update translation files
weblate Jun 28, 2024
3be6579
Translated using Weblate (Italian)
mymage Jul 1, 2024
7334a96
Translated using Weblate (Portuguese (Brazil))
SottomaiorMacedoTec Jul 5, 2024
9f07545
[IMP] purchase_variant_configurator: pre-commit auto fixes
BhaveshHeliconia Jan 17, 2025
8f054d8
[MIG] purchase_variant_configurator: Migration to 18.0
BhaveshHeliconia Jan 17, 2025
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
125 changes: 125 additions & 0 deletions purchase_variant_configurator/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
===========================
Purchase - Product variants
===========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5a6a8e2623d817b25248609a00674655445eb02261a631e135aee18290aa444a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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--variant-lightgray.png?logo=github
:target: https://github.com/OCA/product-variant/tree/18.0/purchase_variant_configurator
:alt: OCA/product-variant
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-variant-18-0/product-variant-18-0-purchase_variant_configurator
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-variant&target_branch=18.0
:alt: Try me on Runboat

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

This module allows you to create the product variant when a purchase
order is confirmed. It adds to the purchase line a product configurator,
so that selecting a product and its attributes can be created a new
product variant.

**Table of contents**

.. contents::
:local:

Configuration
=============

1. Go to ``Purchase > Configuration > Settings``.
2. Check the "Create variants on confirm" option if you want to delay
the creation of them until the order confirmation.

Usage
=====

1. Go to a purchase order or create a new one.
2. Create a new line
3. Set in Product Template some product with attributes and variants.
4. All product attributes will be displayed in table mode just below.
5. Set a value for all attributes.
6. A product variant (with the selected options) will be auto-set.

Only if the "Create variants on confirm" option in the configuration is
set.

1. Go to ``Purchase > Products > Product`` and create a new one.
2. Go to the "Attributes & Variants" tab.
3. Set in "Variant creation" the option "Do not create them
automatically".
4. Set some attribute and value(s)
5. Go to a purchase order or create a new one.
6. Create a new line
7. Set in Product Template the one created before and select values for
attributes.
8. Confirm orden.
9. A product variant (with the selected options) will have been created
for the Product Template.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-variant/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-variant/issues/new?body=module:%20purchase_variant_configurator%0Aversion:%2018.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
-------

* AvanzOSC
* Tecnativa
* ACSONE SA/NV

Contributors
------------

- Oihane Crucelaegui <[email protected]>
- David Díaz <[email protected]>
- Ana Juaristi <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- David Vidal
- Ernesto Tejeda

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

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-variant <https://github.com/OCA/product-variant/tree/18.0/purchase_variant_configurator>`_ project on GitHub.

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

from . import models
from .hooks import assign_product_template
24 changes: 24 additions & 0 deletions purchase_variant_configurator/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2016 Oihane Crucelaegui - AvanzOSC
# Copyright 2016 Pedro M. Baeza <[email protected]>
# Copyright 2016 ACSONE SA/NV
# Copyright 2017 David Vidal <[email protected]>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Purchase - Product variants",
"summary": "Product variants in purchase management",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"depends": ["purchase", "product_variant_configurator"],
"author": "AvanzOSC, "
"Tecnativa, "
"ACSONE SA/NV, "
"Odoo Community Association (OCA)",
"category": "Purchase Management",
"website": "https://github.com/OCA/product-variant",
"data": [
"views/inherited_purchase_order_views.xml",
"views/res_config_settings_views.xml",
],
"installable": True,
"post_init_hook": "assign_product_template",
}
15 changes: 15 additions & 0 deletions purchase_variant_configurator/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2014-2016 Oihane Crucelaegui - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html


def assign_product_template(env):
"""This post-init-hook will update all existing purchase.order.line"""

cr = env.cr
cr.execute(
"""
UPDATE purchase_order_line AS line
SET product_tmpl_id = product_product.product_tmpl_id
FROM product_product
WHERE line.product_id = product_product.id;"""
)
125 changes: 125 additions & 0 deletions purchase_variant_configurator/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_variant_configurator
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-16 02:12+0000\n"
"PO-Revision-Date: 2017-12-16 02:12+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__can_create_product
msgid "Can Create Product"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model,name:purchase_variant_configurator.model_res_company
msgid "Companies"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model,name:purchase_variant_configurator.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__create_product_variant
msgid "Create product now!"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,help:purchase_variant_configurator.field_res_company__po_confirm_create_variant
#: model:ir.model.fields,help:purchase_variant_configurator.field_res_config_settings__po_confirm_create_variant
#: model_terms:ir.ui.view,arch_db:purchase_variant_configurator.res_config_settings_view_form_purchase
msgid "Create product variants when confirming"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_res_company__po_confirm_create_variant
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_res_config_settings__po_confirm_create_variant
msgid "Create variants on confirm"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.constraint,message:purchase_variant_configurator.constraint_purchase_order_line_non_accountable_null_fields
msgid "Forbidden values on non-accountable purchase order line"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.constraint,message:purchase_variant_configurator.constraint_purchase_order_line_accountable_required_fields
msgid "Missing required fields on accountable purchase order line."
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__price_extra
msgid "Price Extra"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,help:purchase_variant_configurator.field_purchase_order_line__price_extra
msgid ""
"Price Extra: Extra price for the variant with the currently selected "
"attributes values on sale price. eg. 200 price extra, 1000 + 200 = 1200."
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model,name:purchase_variant_configurator.model_product_template
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__product_id
msgid "Product"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__product_id_configurator_domain
msgid "Product Id Configurator Domain"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__product_id_is_required
msgid "Product Id Is Required"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__product_tmpl_id
msgid "Product Template"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model,name:purchase_variant_configurator.model_product_product
msgid "Product Variant"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model.fields,field_description:purchase_variant_configurator.field_purchase_order_line__product_attribute_ids
msgid "Product attributes"
msgstr ""

#. module: purchase_variant_configurator
#: model_terms:ir.ui.view,arch_db:purchase_variant_configurator.res_config_settings_view_form_purchase
msgid "Product configurator"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model,name:purchase_variant_configurator.model_purchase_order
msgid "Purchase Order"
msgstr ""

#. module: purchase_variant_configurator
#: model:ir.model,name:purchase_variant_configurator.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Línea pedido de compra"

#. module: purchase_variant_configurator
#: model:ir.model,name:purchase_variant_configurator.model_product_supplierinfo
msgid "Supplier Pricelist"
msgstr ""
Loading