-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] website_product_configurator_mrp: Migration to 16.0
- Loading branch information
1 parent
c752963
commit d2c3ddb
Showing
9 changed files
with
84 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* `Aion Tech <https://aiontech.company/>`_: | ||
|
||
* Simone Rubino <simone.rubino@aion-tech.it> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
website_product_configurator_mrp/static/src/js/website_sale.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** @odoo-module **/ | ||
|
||
import {WebsiteSale} from "website_sale.website_sale"; | ||
|
||
WebsiteSale.include({ | ||
/** | ||
* Override to inject product assembly | ||
* | ||
* @override | ||
*/ | ||
// eslint-disable-next-line no-unused-vars | ||
_updateRootProduct($form, productId) { | ||
this._super(...arguments); | ||
const assembly = $form.find('select[name="assembly"]').val(); | ||
if (assembly) this.rootProduct.assembly = assembly; | ||
}, | ||
}); |
18 changes: 0 additions & 18 deletions
18
website_product_configurator_mrp/static/src/js/website_sale.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<data> | ||
<template | ||
id="cfg_session" | ||
inherit_id="website_product_configurator.cfg_product" | ||
name="Configuration Session MRP" | ||
> | ||
<xpath expr="//a[@id='add_to_cart']" position="before"> | ||
<t | ||
t-set="componant_products" | ||
t-value="product_variant.product_template_attribute_value_ids.mapped('product_attribute_value_id.product_id')" | ||
/> | ||
<div class="input-group mt8" t-if="componant_products"> | ||
<select name="assembly" class='form-control'> | ||
<option value="assembled">Assembled</option> | ||
<option value="kit">Kit</option> | ||
</select> | ||
</div> | ||
</xpath> | ||
</template> | ||
</data> | ||
<template | ||
id="cfg_session" | ||
inherit_id="website_product_configurator.cfg_product" | ||
name="Configuration Session MRP" | ||
> | ||
<xpath expr="//a[@id='add_to_cart']/.." position="before"> | ||
<t | ||
t-set="component_products" | ||
t-value="product_variant.product_template_attribute_value_ids.mapped('product_attribute_value_id.product_id')" | ||
/> | ||
<div class="input-group mt8" t-if="component_products"> | ||
<select name="assembly" class='form-control'> | ||
<option value="assembled">Assembled</option> | ||
<option value="kit">Kit</option> | ||
</select> | ||
</div> | ||
</xpath> | ||
</template> | ||
</odoo> |