diff options
| author | Aurélien Warnon <awa@odoo.com> | 2018-08-30 11:59:54 +0200 |
|---|---|---|
| committer | Aurélien Warnon <awa@odoo.com> | 2018-09-25 18:39:32 +0200 |
| commit | 856c2e9008f1af7bc1327d9c2900db1e109ab0fa (patch) | |
| tree | 7ec14601948c0dab4607417c0043d75cd83c0549 /addons/product/data | |
| parent | fd07990b85cfc87ee0c9a8353bb6c966d403f6bf (diff) | |
[IMP] product,(website_)sale: Move product options configurator into sale module
Task #1871557
Purpose
=======
- Configure a product from a sales order as easily as in the ecommerce
The backend uses the same template as the frontend to configure a products and its options
- Display optionnal products of optionnal products in the "sale options" section
- Allow adding exlusions to some combinations of the product and/or
to some combinations of the optionnal and accessory products
Specification
=============
PHASE I
1. Improve the "Add to cart" with optional products
- When you add an option to cart, move the product to the cart & show the options of this option
- Don't open the option wizard if no option available (in case this module becomes generic,
it's better to skip this step when it's not needed)
- Display the options right under their related product in the cart
2. Do not allow to add the product as an optional product for itself
Why ?
- No functional sense
- Creates issues in the add to cart wizard
3. Exclude some attribute combinations within the product or with related options and accessory products
- Rename VARIANT PRICES button -> CONFIGURE VARIANTS
- When you click this button and select a value, open form view rather than inline edition
- Form view of variant values:
- Attribute
- Value
- HTML Color Index
- Attribute Price Extra
- Not Compatible with: o2m tab with 2 fields: Product AND Attribute Value (of this product)
[m2m tag selection]
- in any new line, autocomplete the current product by default
- Tooltip: A list of product and attribute values that you want to exclude for
this product's attribue value. Also applies on optionnal and accessory products.
4. New option to configure a product in a sales order line
- This option is only visible if the corresponding option is activated in the sales settings
- It opens a wizard to select a product template, configure related attribute values
and select optional products (based on frontend view)
- Attributes not compatible with other selected attributes should not be selectable
- Must work like in the frontend
Diffstat (limited to 'addons/product/data')
| -rw-r--r-- | addons/product/data/product_demo.xml | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/addons/product/data/product_demo.xml b/addons/product/data/product_demo.xml index dd730d92904..0a2ac250e55 100644 --- a/addons/product/data/product_demo.xml +++ b/addons/product/data/product_demo.xml @@ -212,16 +212,6 @@ <field name="attribute_line_ids" eval="[(6,0,[ref('product.product_attribute_line_1'), ref('product.product_attribute_line_2')])]"/> </record> - <record id="product_product_4d" model="product.product"> - <field name="active" eval="False"/> - </record> - - <record id="product_attribute_price_1" model="product.attribute.price"> - <field name="product_tmpl_id" ref="product_product_4_product_template"/> - <field name="value_id" ref="product_attribute_value_2"/> - <field name="price_extra">50.40</field> - </record> - <record id="product_product_5" model="product.product"> <field name="name">Corner Desk Right Sit</field> <field name="categ_id" ref="product_category_5"/> @@ -320,14 +310,34 @@ <field name="attribute_id" ref="product_attribute_1"/> <field name="value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_2')])]"/> </record> - + <record id="product_product_11_product_template" model="product.template"> <field name="attribute_line_ids" eval="[(6,0,[ref('product.product_attribute_line_4')])]"/> </record> - <record id="product_attribute_price_2" model="product.attribute.price"> - <field name="product_tmpl_id" ref="product_product_11_product_template"/> - <field name="value_id" ref="product_attribute_value_2"/> + <!-- + Handle automatically created product.product.attribute.value. + Meaning that the combination between the "customizable desk" and the attribute value "black" will be materialized + into a "product.product.attribute.value" with the ref "product.product_product_attribute_value_1". + This will allow setting fields like "price_extra" and "exclude_for" + --> + <function model="ir.model.data" name="_update_xmlids"> + <value model="base" eval="[{ + 'xml_id': 'product.product_product_attribute_value_1', + 'record': obj().env.ref('product.product_attribute_line_1').product_value_ids[1], + 'noupdate': True, + }, { + 'xml_id': 'product.product_product_attribute_value_2', + 'record': obj().env.ref('product.product_attribute_line_4').product_value_ids[1], + 'noupdate': True, + }]"/> + </function> + + <record id="product_product_attribute_value_1" model="product.product.attribute.value"> + <field name="price_extra">50.40</field> + </record> + + <record id="product_product_attribute_value_2" model="product.product.attribute.value"> <field name="price_extra">6.40</field> </record> |
