Create a Widget with the function of auto populate commas or dots into float field (Odoo 13)

I’m trying to create a Widget with the function of auto populate commas or dots when the user enters values into the float field by js.

If the user enters 123456789 , it should automatically become 12,345,667.89 immediately.

But In my code, it just works after click a Button:

odoo.define('autofill.separate', function (require) {
"use strict";

var basic_fields = require('web.basic_fields');
var registry = require('web.field_registry');

var BoldWidget = basic_fields.FieldChar.extend({
    _renderReadonly: function () {
        this._super();
        var old_html_render = this.$el.html();
        var new_html_render = old_html_render.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")

        
        this.$el.html(new_html_render);
    },
});

registry.add('autofill_separate', BoldWidget);
});

Please help!

Thank you!

219 thoughts on “Create a Widget with the function of auto populate commas or dots into float field (Odoo 13)”

  1. Hey there would you mind stating which blog platform
    you’re working with? I’m going to start my own blog soon but I’m having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking
    for something completely unique. P.S Apologies
    for getting off-topic but I had to ask! http://herreramedical.org/azithromycin

    Reply
  2. medicaments keratolytiques therapies breves plurielles , therapies de couple pharmacie livraison boulogne billancourt , Doxycycline en farmacia Argentina, Comprar Doxycycline medicamento. Doxycycline en farmacia Argentina Comprar Doxycycline genГ©rico [url=https://kit.co/riasale/comprar-doxycycline-sin-receta-doxycycline-en-farmacia-argentina#]DГіnde comprar Doxycycline 200 mg[/url] pharmacie khun Barato Budecort en Ecuador, Comprar Budecort medicamento. Comprar Budecort sin receta Comprar Budecort genГ©rico [url=https://kit.co/udcuta/barato-budecort-en-ecuador-comprar-budecort-generico#]Comprar Budecort genГ©rico[/url] , therapies breves livre pharmacie verte colline aix en provence , pharmacie boulevard jean jaures boulogne-billancourt horaires. therapie cognitivo comportementale autisme DГіnde comprar Ventolin 100 mcg, DГіnde comprar Ventolin 100 mcg. Ventolin en farmacia Ecuador Comprar Ventolin genГ©rico [url=https://kit.co/buntadent/comprar-ventolin-medicamento-donde-comprar-ventolin-100-mcg#]DГіnde comprar Ventolin 100 mcg[/url] , traitement therapies breves. hypnose et therapies breves pdf, pharmacie avignon aubagne medicaments yeux secs . sur produits medicamenteux, traitement punaise de lit pharmacie aix en provence besson pharmacie auchan mantes la jolie .

    Reply
  3. Pingback: viagra otc
  4. Pingback: buy viagra
  5. Pingback: sildenafil coupon
  6. Pingback: sildenafil 50 mg
  7. Pingback: cialis usa
  8. Pingback: cialis sex pill
  9. Pingback: sildenafil citrate
  10. Pingback: viagra alternative
  11. Pingback: cialis pills
  12. Pingback: cialis capsule
  13. Pingback: cialis generique
  14. Pingback: cialis or viagra
  15. Pingback: viagra soft
  16. Pingback: sildenafil 50mg
  17. Pingback: oral ivermectin
  18. Pingback: viagra generic
  19. Pingback: price for viagra
  20. Pingback: lady viagra
  21. Pingback: buy viagra cheap
  22. Pingback: viagra kaufen
  23. Pingback: viagra price
  24. Pingback: viagra cvs
  25. Pingback: levitra vs viagra
  26. Pingback: viagra para mujer
  27. Pingback: sildenafil prices
  28. Pingback: viagra and cialis
  29. Pingback: viagra prices
  30. Pingback: viagra tablet
  31. Pingback: viagra cialis

Leave a Comment