Skip to Content
Menu
This question has been flagged
3 Replies
6338 Views

Hello,

to design my own invoice layout, I created a new addon which includes a custom report.

Now I want to work with an external css file what I have done as explained here: http://www.odoo.yenthevg.com/adding-static-resources-css-and-javascript-to-odoo/

This is my xml-File:

---

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
  <data>
    <!-- Adds all assets in Odoo -->
    <template id="lsgit_invoice_report_assets" name="lsgit_invoice_report assets" inherit_id="web.assets_common">
      <xpath expr="." position="inside">
        <link rel="stylesheet" href="/lsgit_invoice_report/static/src/css/lsgit_invoice_report.css"/>
        </xpath>
      </template>
    </data>
  </odoo>

----



Unfortunately I don't see any of my css rules.


I am also not really sure, what to enter as "inherit_id".


Can anybody help me?


Thanks in advance.

Lars

Avatar
Discard
Author

I finally solved it on my own. I accidentally forgot to add the xml to my manifest-file.

I already tried report.assets_common before, but it did not work either.
I also do not see the css, when using e.g. Firebug.

I know about the possibilty to use internal stylesheets, but I really want to know, why my external file is not included...

Best Answer

Try report.assets_common or try this


  .....
<div class="page">
     <style>
         // Write Your css
</style>
     ... Your report content ..
</div>




Avatar
Discard