+1 vote

I have a notes field with a type of text.

On the screen I enter: Note1 Note2 Note3

On the report it comes out as Note1 Note2 Note3

How can I get the line return to be honored in the printed output

in App by (10.2k points) | 13 views

1 Answer

0 votes
Best answer

Split the string into an array, and iterate over them:

<t t-if="isinstance(o.field, str)">
   <t t-set="string_to_output" t-value="o.field.split('\n')" />
   <t t-foreach="string_to_output" t-as="string_line">
      <span t-esc="string_line"/>
      <br />
by (8.6k points)
selected by
192 questions
163 answers
38,830 users