In the new report module we have the company external header in /views/layouts.xml. Its ID is report.external_layout_header. If I edit the view directly in Odoo, it changes but now I want to inherit it in a module and I am not able to do that. I am not a coder so maybe it's a dummy problem.
This is the original view:
<t t-name="report.external_layout_header">
<div class="header">
<div class="row">
<div class="col-xs-3">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/>
</div>
<div class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"/>
</div>
</div>
<div class="row">
<div class="col-xs-3">
<div t-field="company.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}" style="border-bottom: 1px solid black;"/>
</div>
</div>
</div>
</t>
So I create my module with empty __init__.py and I call the qweb view in __openerp__.py like this:
'qweb': ['views/my_layouts.xml',],
In my_layouts.xml I extend the view like this:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<templates>
<t t-extend="report.external_layout_header">
<t t-jquery="div.header" t-operation="replace">
<<MY CODE>>
</t>
</t>
</templates>
</data>
</openerp>
But not works. I can install my module without error but the header doesn't change. I don't know where is the error so any help is appreciated. Thank you.