Skip to Content
Menu
This question has been flagged
2 Replies
3084 Views

Hello I am using V14 I made a sales order report with the attributes as a column.  Currently when they come in the the attributes are listed with their values and are separated by a comma.   Is there a way to have a line break at each column?   

For example it currently returns:  attribute 1, attribute 2, attribute 3  I am trying to get it to display:

attribute 1

attribute 2

attribute 3


Thanks


 

Avatar
Discard

Please share your code.

Best Answer

Hello Doug,

I would imagine it's because you have used an HTML element with a display of inline instead of block. I would imagine your code looks like "<span t-field='attribute1'/>" if you could change it to "<p t-field='attribute1'/>. This should fix your issue. 

This might help you. 

If I am incorrect, could you share the code you have used.

Thanks, 

Avatar
Discard
Author Best Answer

Hello 

I tried replacing the span with p as shown below.   The report is still showing the attributes separated by a comma.  

 <xpath expr="/t/t/div/table/thead/tr/th" position="after">

    <th>

      <p>Attributes</p>

    </th>

  </xpath>

  <xpath expr="/t/t/div/table/tbody/tr/td" position="after">

    <td>

      <p t-field="table_line.x_studio_bay_2_width"/>

    </td>

  </xpath>

  <xpath expr="/t[1]/t[1]/div[1]/table[1]/tbody[1]/tr[1]/td[2]/p[1]" position="attributes">

    <attribute name="t-field">table_line.product_template_attribute_value_ids</attribute>

  </xpath>

  <xpath expr="/t/t/div/table/thead/tr/th[2]/p" position="replace">

    <p>Attributes</p>

  </xpath>

Thanks

Doug

Avatar
Discard