Skip to Content
मेन्यू
This question has been flagged
1 Reply
2886 Views

Hi,

I want to patch memoized const exported function of js file (like luxonToMomentFormat in @web/core/l10n/dates).

How can i do that?
Note: i tried the usual patch and did not work.

Avatar
Discard

Can you please share the patching code you tried?

Best Answer

Hi,

You could try the below mentioned method to patch js.
/** @odoo-module **/

import { patch } from "@web/core/utils/patch";
import { luxonToMomentFormat } from "@web/core/l10n/dates";

patch(luxonToMomentFormat, 'module_name.luxonToMomentFormat', {
    start() {
        return this._super();
    }
});

Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
2
जुल॰ 24
2722
0
अप्रैल 23
1707
0
मार्च 15
2909
2
जुल॰ 24
2888
1
नव॰ 24
4897