Odoo Help


Problem adding website builder module to enable new widgets

on 2/5/17, 12:03 PM 889 views

I have installed a new app my odoo 10 installation on my local server.

The readme file of the module is the follow:

 Countdown Widget================
This module add functionality to add widget directly to datetime field on website template.
Add   t-field="obj.datetime_field" 
t-field-options='{"widget": "countdown"}'

Any idea what are the step to enable that widget? Where I should add that code?


Akhil P Sivan

--Akhil P Sivan--

| 5 4 7
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 2/5/17, 1:52 PM


You are talking about following addon right?:


But I found a small bug on that, when you try to use that widget, will get internal server error telling that template not found.

To fix it, goto website_countdown >> views >> countdown.xml

Then change <template id="front_countdown"> to <template id="countdown">

May be the authors gona update that, since I posted the bug on app page. So please check the above thing before installing.

After fixing that, you can use that widget in the templates used for building pages in website modules. For eg: website_sale, website_event etc

It can be used on datetime fields in the object. Then it displays a countdown till that date. For example, on website_event module, in the template used for event details, I can add this widget on the event start date, then it shows count down till that date which event begins, like this:

To get like above, am using the widget on event_details template which you can find in website_event >>views>>website_event_templates.xml. For eg: 

<template id="event_details">        
    <t t-call="website_event.layout">
        <div itemscope="itemscope" itemtype="http://schema.org/Event" class="container">
            <h1 itemprop="name" class="text-center" t-field="event.name"></h1>     
            <div class="text-center">
                <small t-if="event.is_participating" class="label label-info">Participating</small>
            <div class="text-center">
                <span t-field="event.with_context(tz=event.date_tz).date_begin" t-options='{"widget": "countdown"}'/>
            <h4 class="text-center text-muted">
                <i class="fa fa-clock-o"></i>
                    <span itemprop="startDate" t-field="event.with_context(tz=event.date_tz).date_begin" t-options='{"hide_seconds":"True"}'/> to
                    <span itemprop="endDate" t-field="event.with_context(tz=event.date_tz).date_end" t-options='{"hide_seconds":"True"}'/>
                    <t t-if="event.date_tz">(<span t-field="event.date_tz"/>)</t>
            <h4 class="text-center text-muted"
                 "widget": "contact",
                 "fields": ["city"]
            <div class="row mt32 mb32">
                <t t-raw="0"/>

is it possible to put that in the home page?

on 2/11/17, 4:50 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/5/17, 12:03 PM
Seen: 889 times
Last updated: 2/11/17, 4:48 PM