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

[MERGE][IMP] (website)_sale_(product_configurator): improve p. configurator & exclusions #28310

Closed

Conversation

Projects
None yet
8 participants
@awa-odoo
Copy link
Contributor

commented Oct 31, 2018

Task #1891970
Original p. configurator commit d3530eb

Main purpose

The main purpose of this merge is to improve the product configurator usability by removing the "Configure a product" link to make it dynamic based on the selected product.
It also cleans the (website_)sale modules by moving the configurator specific code into its own modules: (website)_sale_product_configurator.

Detailed changes

Here is a more detailed list of the things done in this merge:

  • Moved the product_configurator into its own module now that we have a specific option for it.
    The option only enables the p. configurator in the SO form.
    The e-commerce should always allow customer to configure their products, even if the option is not
    checked.

    This allows moving some of the code specific to the p. configurator into its own module.
    However, a lot of the code has to remain in "sale" module since the e-commerce does not require the
    option checked and needs the "configure product" feature in the shop by default.

    (This is why the fields "product_custom_attribute_value_ids" and
    "product_no_variant_attribute_value_ids" are still in the "sale" module)

  • Since we now have the product_configurator in its own module, we can add a bridge module for the
    website_sale to override the necessary controller routes in a cleaner way.
    This commit adds the bridge module and move files and code around.

  • The sale order lines will now always be editable directly from the tree view.
    Installing some modules would force a popup form, which leads to a significant drop
    in productivity when filling in multiple sale order lines.

  • This commit will add an event configurator widget that will open a wizard when the selected product is
    'event_ok'.
    The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely
    removed from the sale order line tree view.
    The user can also edit the event configuration by using a button next to the product_id dropdown field
    if the product is configured as 'event_ok'.

  • The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
    The widget is only used on the added "product_template_id" field on the SO line.

    This widget controls the opening of the configuration window and removes the need of a "Configure a
    product" button.
    The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

    The widget is also responsible for handling the configuration provided by the p. configurator form
    and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

  • Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js

    • 'MULTI' allows to batch multiple operations at once
    • 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field
  • A message will be displayed when hovering a disabled attribute value's input to explain why it's
    disabled.
    e.g: Not available with Color: Black

    This works for both exclusions within the product and exclusions from a reference product.

  • The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".

  • The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
    to avoid the stock warning when adding these products in a SO through the product configurator.

  • The _name_search of product.template fallbacks by default on product.product
    In case there are no product.products yet (dynamic product variants configuration), we need to
    include the base product.template _name_search in the results

  • The "ProductConfiguratorMixin" was named like that for historical reasons.
    It had no direct link to the product configurator anymore since the latter was moved in its own module.
    The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
    This commit just move files around, there should not be any functional change.

Spec

  • remove "configure a product" from sale order lines
    When the product configurator is active, replace the product_product_id by a product_template_id
    in the sale order line. When we select a template without variants, it sets the variant automatically,
    but when we select a product template having variants, it opens the configurator dialog.
  • add a widget to modify the product configuration in the sale order line (next to product template field)
  • UX improvements:
    • Invert image and configuration in the main screen
    • If the product doesn't have an image, hide it instead of showing the placeholder (only for first
      screen?)
  • new independent option in sales settings to activate product configurator.
    (same in e-commerce)
  • demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
  • If only one attribute value that is Custom, don't display radio, selection or even color box
  • show exclusions in both sides in the configurator
    -> SOLUTION: auto populate other way around (Black not for XL -> XL not for Black)
  • don't allow to select an excluded value in the configurator (frustrating).
    Replace with an uncomaptibility message on hover (e.g. Not available for Color: Black, Size: XL)
  • apply the same mechanism for optional & suggested products: e.g. Not available for Customizable
    Table (Color: Black)
    --
    I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo robodoo added the CI 🤖 label Oct 31, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Oct 31, 2018

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Oct 31, 2018

@C3POdoo C3POdoo added the RD label Nov 2, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Nov 2, 2018

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Nov 2, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Nov 2, 2018

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Nov 2, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Nov 2, 2018

@robodoo robodoo removed the CI 🤖 label Nov 2, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Nov 5, 2018

@robodoo robodoo added the CI 🤖 label Nov 5, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Nov 5, 2018

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Nov 5, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Nov 14, 2018

@robodoo robodoo removed the CI 🤖 label Nov 14, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch 5 times, most recently Nov 14, 2018

@robodoo robodoo added the CI 🤖 label Nov 16, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch Nov 20, 2018

@robodoo robodoo removed the CI 🤖 label Nov 20, 2018

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch 2 times, most recently Nov 20, 2018

awa-odoo added some commits Mar 5, 2019

[IMP] event_sale: add an event configurator on SO lines
Purpose
=======

Commit 92b9e3684607fbb0c9a7d3f2331292eac51ebdea removed the SO line popup form and added all the event
information fields directly in the sale order line tree view.

The event information should be hidden by default because they are only relevant for 'event_ok' products.

This commit will add an event configurator widget that will open a wizard when the selected product is 'event_ok'.
The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely removed
from the sale order line tree view.

The user can also edit the event configuration by using a button next to the product_id dropdown field
if the product is configured as 'event_ok'.
[ADD/MOV] sale_product_configurator: new module and files move
Purpose
=======
- Moved the product_configurator into its own module now that we have a specific option for it.
  The option only enables the p. configurator in the SO form.
  The e-commerce should always allow customer to configure their products, even if the option is not checked.

  This allows moving some of the code specific to the p. configurator into its own module.
  However, a lot of the code has to remain in "sale" module since the e-commerce does not require the option
  checked and needs the "configure product" feature in the shop by default.
  (This is why the fields "product_custom_attribute_value_ids" and "product_no_variant_attribute_value_ids"
  are still in the "sale" module)
[ADD/MOV] website_sale_product_configurator: new module and files move
Purpose
=======
Since we now have the product_configurator in its own module, we can add a bridge module for the website_sale
to override the necessary controller routes in a cleaner way.

This commit just adds the bridge module and move files and code around, there should not be any functional change.

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch from 098fb1b to 5f98ea0 Mar 27, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 27, 2019

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch from 5f98ea0 to 0dc3e40 Mar 28, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 28, 2019

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch from 0dc3e40 to bcfb7f0 Mar 28, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 28, 2019

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch from bcfb7f0 to fae302d Mar 28, 2019

@robodoo robodoo removed the CI 🤖 label Mar 28, 2019

awa-odoo added some commits Jan 21, 2019

[REF] (website_)sale,*_product_configurator: rename p_c_mixin to vari…
…ant_mixin

Task #1891970

Purpose
=======

The "ProductConfiguratorMixin" was named like that for historical reasons.
It had no direct link to the product configurator anymore since the latter was moved in its own module.

The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
This commit just move files around, there should not be any functional change.
[IMP] sale_product_configurator: improve p. configurator
Task #1891970
Original p. configurator commit d3530eb

Purpose
=======
- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
  The widget is only used on the added "product_template_id" field on the SO line.

  This widget controls the opening of the configuration window and removes the need of a "Configure a product" button.
  The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

  The widget is also responsible for handling the configuration provided by the p. configurator form
  and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
  - 'MULTI' allows to batch multiple operations at once
  - 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field

Spec
=======
- remove "configure a product" from sale order lines
  When the product configurator is active, replace the product_product_id by a product_template_id
  in the sale order line. When we select a template without variants, it sets the variant automatically,
  but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
    - Invert image and configuration in the main screen
    - If the product doesn't have an image, hide it instead of showing the placeholder (only for first screen?)
- new independent option in sales settings to activate product configurator.
  (same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
[REF] *_product_configurator,website_sale: remove deprecated methods/…
…params

Task #1891970

Purpose
=======

This commit cleans up the deprecated methods introduced during the product configurator
post v12 fix (ref: f8dad1b).
[IMP] *_product_configurator: improve optional products naming
Task #1891970

Purpose
=======

The name of the optional products displayed in the modal now change dynamically based on the selected
variants configuration.
You do not have to wait until the product is in the cart to see the full name anymore.

Ex: Conference Chair -> Conference Chair (Steel)
[IMP] (w_)sale_product_configurator: improve single custom value layout
Purpose
=======

When a single custom value is configured in an attribute, use the 'value' label
as a placeholder to have a full width input.

@awa-odoo awa-odoo force-pushed the odoo-dev:master-product-configurator-v13-awa branch from fae302d to 70c9a73 Mar 28, 2019

@robodoo robodoo added the CI 🤖 label Mar 28, 2019

@tde-banana-odoo

This comment has been minimized.

Copy link
Contributor

commented Mar 29, 2019

@robodoo r+ rebase-merge

@robodoo robodoo added the r+ 👌 label Mar 29, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

commented Mar 29, 2019

Merge method set to rebase and merge, using the PR as merge commit message

robodoo added a commit that referenced this pull request Mar 29, 2019

[MERGE][IMP] (website)_sale_(product_configurator): improve p. config…
…urator & exclusions

Task #1891970
Original p. configurator commit d3530eb

Main purpose
------------------

The main purpose of this merge is to improve the product configurator usability by removing the "Configure a product" link to make it dynamic based on the selected product.
It also cleans the (website_)sale modules by moving the configurator specific code into its own modules: (website)_sale_product_configurator.

Detailed changes
-----------------------

Here is a more detailed list of the things done in this merge:

- Moved the product_configurator into its own module now that we have a specific option for it.
  The option only enables the p. configurator in the SO form.
  The e-commerce should always allow customer to configure their products, even if the option is not
  checked.

  This allows moving some of the code specific to the p. configurator into its own module.
  However, a lot of the code has to remain in "sale" module since the e-commerce does not require the
  option checked and needs the "configure product" feature in the shop by default.

  (This is why the fields "product_custom_attribute_value_ids" and
  "product_no_variant_attribute_value_ids" are still in the "sale" module)

- Since we now have the product_configurator in its own module, we can add a bridge module for the
  website_sale to override the necessary controller routes in a cleaner way.
  This commit adds the bridge module and move files and code around.

- The sale order lines will now always be editable directly from the tree view.
  Installing some modules would force a popup form, which leads to a significant drop
  in productivity when filling in multiple sale order lines.

- This commit will add an event configurator widget that will open a wizard when the selected product is
  'event_ok'.
  The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely
  removed from the sale order line tree view.
  The user can also edit the event configuration by using a button next to the product_id dropdown field
  if the product is configured as 'event_ok'.

- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
  The widget is only used on the added "product_template_id" field on the SO line.

  This widget controls the opening of the configuration window and removes the need of a "Configure a
  product" button.
  The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

  The widget is also responsible for handling the configuration provided by the p. configurator form
  and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
  - 'MULTI' allows to batch multiple operations at once
  - 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field

- A message will be displayed when hovering a disabled attribute value's input to explain why it's
  disabled.
  e.g: Not available with Color: Black

  This works for both exclusions within the product and exclusions from a reference product.

- The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".

- The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
  to avoid the stock warning when adding these products in a SO through the product configurator.

- The _name_search of product.template fallbacks by default on product.product
  In case there are no product.products yet (dynamic product variants configuration), we need to
  include the base product.template _name_search in the results

- The "ProductConfiguratorMixin" was named like that for historical reasons.
  It had no direct link to the product configurator anymore since the latter was moved in its own module.
  The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
  This commit just move files around, there should not be any functional change.

Spec
=======
- remove "configure a product" from sale order lines
  When the product configurator is active, replace the product_product_id by a product_template_id
  in the sale order line. When we select a template without variants, it sets the variant automatically,
  but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
    - Invert image and configuration in the main screen
    - If the product doesn't have an image, hide it instead of showing the placeholder (only for first
      screen?)
- new independent option in sales settings to activate product configurator.
  (same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
- show exclusions in both sides in the configurator
  -> SOLUTION: auto populate other way around (Black not for XL -> XL not for Black)
- don't allow to select an excluded value in the configurator (frustrating).
  Replace with an uncomaptibility message on hover (e.g. Not available for Color: Black, Size: XL)
- apply the same mechanism for optional & suggested products: e.g. Not available for Customizable
  Table (Color: Black)
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes #28310

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
@robodoo

This comment has been minimized.

Copy link
Contributor

commented Mar 29, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.