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

Edit default report header - Odoo 8

By
Alejandro Perez Cosio
on 2/11/15, 1:41 PM 1,068 views

Hello all,

I would like to edit the default report.internal_layout report header, which is something like:
"2015-02-11  14:38               Your company name                   1 / 3"

I want to remove the time from there, but I cannot find where the internal_layout code is.. Do you know where can I find it?

Thank you in advance
Regards!

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 2/11/15, 2:10 PM

In report/view/layouts.xml - line with time is bold:

<template id="internal_layout">
    <!-- Multicompany -->
    <t t-if="o and 'company_id' in o">
        <t t-set="company" t-value="o.company_id"></t>
    </t>
    <t t-if="not o or not 'company_id' in o">
        <t t-set="company" t-value="res_company"></t>
    </t>

    <div class="header">
        <div class="row">
            <div class="col-xs-3">
                <span t-esc="time.strftime('%Y-%m-%d')"/>
                <span t-esc="time.strftime('%H:%M')"/>
            </div>
            <div class="col-xs-2 col-xs-offset-2 text-center">
                <span t-esc="company.name"/>
            </div>
            <div class="col-xs-2 col-xs-offset-3 text-right">
                <ul class="list-inline">
                    <li><span class="page"/></li>
                    <li>/</li>
                    <li><span class="topage"/></li>
                </ul>
            </div>
        </div>
    </div>
    <t t-raw="0" />
</template>

Thank you @zbik, it worked for me!

Alejandro Perez Cosio
on 2/12/15, 7:42 AM
2

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 2/12/15, 1:38 AM

if you want hide the time in the report use this code by ctrating a new xml file:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<template id="time_hide" inherit_id="report.internal_layout">
    <xpath expr="//div[@class='col-xs-3']" position="replace">
    </xpath>
</template>
</data>
</openerp>

Thank you @Vasanth, this is the way how I'm doing this change, but the question was "where is the file?", anyway, +1

Alejandro Perez Cosio
on 2/12/15, 7:45 AM

addons/report/views/layouts.xml...line no:124

Vasanth
on 2/12/15, 8:44 AM

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: 2/11/15, 1:41 PM
Seen: 1068 times
Last updated: 3/16/15, 8:10 AM