HI guys, I hope you are doing well
I'm new in odoo, Any suggestions related how to customize RewardButton?
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
HI guys, I hope you are doing well
I'm new in odoo, Any suggestions related how to customize RewardButton?
Thanks
Hi,
The template for Rewards is in addons/pos_loyalty/static/src/xml/ControlButtons/RewardButton.xml
You can either customise that, or inherit that in your custom module and customise.
To do that after creating a custom module, add your xml and inside that,
<t t-name="RewardButton" t-inherit="pos_loyality.
<xpath expr="//span[hasclass('
//Your customised code here.
</xpath>
</t>
Hope it helps
Thank you for the answer,
With this, how I can customize the RewardButton.js functions, for example:
async _applyReward()
right?
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
1
Agu 23
|
2297 | ||
|
1
Feb 25
|
2043 | ||
|
1
Mar 24
|
2134 | ||
|
2
Jun 24
|
3153 | ||
|
1
Feb 24
|
1762 |
Hi, I have been trying with this:
/** @odoo-module **/
odoo.define('point_of_sale.RewardButton', function (require) {
'use strict';
const RewardButton = require('point_of_sale.RewardButton');
const Registries = require('point_of_sale.Registries');
const ProductScreen = require('point_of_sale.ProductScreen');
const RewardButtonUp = RewardButton => class extends RewardButton {
setup() {
console.log("ENTER INTO SETUP");
super.setup();
useListener('click', this.onMiClick);
}
async onMiClick() {
console.log("My custom click");
}
};
Registries.Component.extend(RewardButton, RewardButtonUp);
return RewardButtonUp;
});
But nothing happend