Odoo Help


This community 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.


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

Lucas Huber
on 3/2/16, 9:26 AM 389 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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 3/2/16, 9:26 AM
Seen: 389 times
Last updated: 3/2/16, 9:26 AM