Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
15610
Lượt xem
1. Store files correctly:
CSS and JS files should be reside under 'static' directory in the module(the rest of subdirectory tree under 'static' is an optional convention):
- static/src/css/your_file.css
- static/src/js/your_file.js
2. Add files in manifest (v7.0) or in XML(v8.0)
- Openerp v7.0 way is to add following entries in manifest (in __openerp__.py):
...
'css': ['static/src/css/your_file.css'],
'js': [static/src/js/your_file.js'],
... - Odoo v8.0 way is to add corresponding record in the XML:
- Add XML to the manifest (__openerp__.py):
...
'data': [ 'your_file.xml'],
... - Then add following record in 'your_file.xml':
<openerp>
<data>
<template id="assets_backend" name="your_module_name assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel='stylesheet' href="/your_module_name/static/src/css/your_file.css"/>
<script type="text/javascript" src="/your_module_name/static/src/js/your_file.js"></script>
</xpath>
</template>
....
....
</data>
</openerp>
- Add XML to the manifest (__openerp__.py):
With the similar way, we can add css/js to the public website, for doing so, we use
inherit_id="website.assets_frontend"instead of
inherit_id="web.assets_backend"replacing "assets_backend" with "assets_frontend" and "web" with "website"...
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
how to read field values using js
Đã xử lý
|
|
1
thg 5 25
|
7781 | |
|
1
thg 11 24
|
4204 | ||
|
0
thg 5 24
|
1564 | ||
Odoo 14: Reload Point Of Sale
Đã xử lý
|
|
1
thg 4 24
|
1721 | |
|
0
thg 8 21
|
8683 |
Thanks for downvote @Dr Obx!
@Dr Obx, any suggestions to improve this Q/A? What you do not like exactly? Please share your thoughts with us