← Back to team overview

openerp-community team mailing list archive

Re: 回覆: Js files in v8

 

Thanks for the explanation Kevin,

I will try that, BTW doc.openerp.com still says that we should use
__openerp__.py, it's official that Js are now loaded via qweb templates?
El 22/05/2014 18:38, "Kevin Wang" <kevin_327@xxxxxxx> escribió:

> HI,
>
> In version 8.0, the place to loading js files was move into qweb template.
> In qweb template files to inherit [web.assets_backend] base template to
> place stylesheet or script labs.
>
> For example:
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <!-- vim:fdn=3:
>
> -->
>
> <openerp>
>
>     <data>
>
>         <template id="assets_backend" name="pad assets"
> inherit_id="web.assets_backend">
>
>             <xpath expr="." position="inside">
>
>                 <link rel="stylesheet"
> href="/pad/static/src/css/etherpad.css"/>
>
>                 <script type="text/javascript"
> src="/pad/static/src/js/pad.js"></script>
>
>             </xpath>
>
>         </template>
>
>     </data>
>
> </openerp>
>
>
>
> KEVIN WANG
>
>
>
> *寄件者**:* openerp-community-bounces+kevin_327=163.com@xxxxxxxxxxxxxxxxxxx[mailto:
> openerp-community-bounces+kevin_327=163.com@xxxxxxxxxxxxxxxxxxx] *代理* Aristobulo
> Meneses
> *寄件日期**:* 2014年5月23日 4:40
> *收件者**:* openerp-community@xxxxxxxxxxxxxxxxxxx
> *主旨**:* [Openerp-community] Js files in v8
>
>
>
> Hello community,
>
>
>
> I'm trying to fix my odoo-addons and make it work with latest revision but
> it isn't loading any javascript declared in __openerp__.py file at 'js' key.
>
>
>
> Has anyone faced the same problem?
>
>
>
> --
> La experiencia es la más dura maestra;
> primero pone la prueba, luego dá la explicación...
> -------------------------------------------------------------------------
>

Follow ups

References