Odoo Help

Welcome!

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.

0

QWeb format text and field in same line

By
E.M.
on 9/18/15, 5:53 AM 1,320 views

The following code prints the label "Invoice Date" and the actual date in separate lines.

So,

<div class="col-xs-8" t-if="o.date_invoice">

<strong>Invoice Date:</strong>

<p t-field="o.date_invoice"/>

</div>


Generates:

Invoice Date:

05/05/2015


What should be done to generate:

Invoice Date: 05/05/2015

(just one line)

2

Anil R. Kesariya

--Anil R. Kesariya--
4321
| 6 5 8
Gandhinagar, India
--Anil R. Kesariya--
ERP Consultant

Key Skill
-
Technical & Functional Expert
Anil R. Kesariya
On 9/18/15, 7:14 AM

Hi Em,

Here you go!

Any of these can help.

<strong>Invoice Date: <span t-field="o.date_invoice" /></strong>

or:

<strong> Invoice Date: </strong> <span t-field="o.date_invoice" />

or

<table>
<tr>
<td>
            <strong>Invoice Date: </strong> <span t-field='o.date_invoice'/>
        </td>
    </tr>
</table>


Note : You have used <p> tag that's why its moving to next line.

Rgds,

Anil.

Thanks, it is so simple once you see it.

E.M.
on 9/18/15, 6:47 PM

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)

Stats

Asked: 9/18/15, 5:53 AM
Seen: 1320 times
Last updated: 9/18/15, 6:47 PM