Good morning,
How we can add a code or option to be able to remove or add (- and +) the quantity of products purchased in popover in odoo 13.
Thanks in advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Good morning,
How we can add a code or option to be able to remove or add (- and +) the quantity of products purchased in popover in odoo 13.
Thanks in advance.
In Odoo 13, you can add the option to adjust the quantity of products purchased in a popover by customizing the JavaScript and XML code. Here’s a basic example of how you might do this:
1. JavaScript Code: Extend the 'ProductConfiguratorMixin' to add the 'onClickAdd' and 'onClickRemove' methods:
odoo.define('your_module.product_configurator', function (require) {
"use strict";
var ProductConfiguratorMixin = require('sale.ProductConfiguratorMixin');
ProductConfiguratorMixin.include({
events: _.extend({}, ProductConfiguratorMixin.prototype.events, {
'click .o_add': '_onClickAdd',
'click .o_remove': '_onClickRemove',
}),
_onClickAdd: function (event) {
// Your logic to add a product
},
_onClickRemove: function (event) {
// Your logic to remove a product
},
});
});
2. XML Code: Add the + and - button
In this example, the + button calls the '_onClickAdd' method and the - button calls the '_onClickRemove' method when clicked. You should replace 'your_module.product_configurator' and other placeholders with your actual data and add your own logic to add and remove products.
Hope this helps.
Best regards,
Maciej Burzymowski
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|
1
Dec 25
|
3518 | |||
|
0
Dec 25
|
167 | |||
|
1
Dec 25
|
392 | |||
|
0
Dec 25
|
1780 | |||
|
0
Dec 25
|
2 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.