Odoo Help


How to get "HTML" code into a Html field by method

Lucas Huber
on 3/2/16, 9:26 AM 964 views

I have a simple method to return HTML text to a field.Html but get always unwanted character on each line:

# call:
self.agenda = self._meeting_type_agenda(self.meeting_type)
@api.one  # Getting the default text for agendas depending on Meeting-type
def _meeting_type_agenda(self, meeting_type):
if meeting_type == "daily": # Daily Scrum Agenda
    return str("""<h3 style="color:blue">What did I do yesterday that helped the Development Team meet the Sprint Goal?</h3>
     <li>-</li> <li>-</li>
    </ul><h3 style="color:blue">What will I do today to help the Development Team meet the Sprint Goal?</h3>
     </ul><h3 style="color:blue">Do I see any impediment that prevents me or the Development Team from meeting the Sprint Goal?</h3>
elif meeting_type == "planning": # Planning Agenda
    return """
     <h3 style="color:blue"><ul>What is the goal of this sprint?</ul></h3>
     <h3 style="color:blue"><ul>Which tasks does it include?</ul></h3>
     <h3 style="color:blue"><ul>Which Def. of Done does it include?</ul></h3><br/>

What is worn or missing?

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: 3/2/16, 9:26 AM
Seen: 964 times
Last updated: 3/2/16, 9:26 AM