How to add custom integer word count in html header in odoo 12
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
Hi Sunanda,
You could create an onchange on the HTML field and in that onchange simply calculate the amount of words. Something along the lines of:
@api.onchange('your_html_field')
def compute_word_count(self):
self.number_of_words = len(s.split())
This should give you the length of all words for a specific field (in the most basic form). You might want to add logic or regular expressions to this.
Regards,
Yenthe
Hello Yenthe,
I need to add wordcount using summernote i.e. in html header where there is bold, italitc etx functionality is there. For example: I put field in html header and value as max 200 word count so in description(html field) user should not exceed words more than 200.
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire