Daily updates from Odoo
Friday, March 29, 2019
1 change · master
Enhancements to existing features
Sales users and online shoppers now get a smoother product configuration experience, with configuration options appearing directly when selecting products instead of through a separate link. The update also improves product option availability messages, keeps sales order lines editable inline, and adds a dedicated event configuration flow for event-related products.
Original PR description
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…
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