How css and js inheritance works on Odoo v8?

Hello everyone.

I've been working with OpenERP (now Odoo) for a long time. But now I'm a little bit confused. I used to inherit point_of_sale and add css on But now that it changed and now css files are called inside html_template under point_of_sale/controllers/ and also js files are inserted on point_of_sale/views/point_of_sale.xml I am really confused about how this works and how should I add css from my multiple POS addons. I don't want to override and add my css because this should be inheritable. So please can someone explain me how this works?

In v8 adding of static files is different as v7.

You must define static files in view, where you inheriting core views.

1. in module folder create folder named views

2. create in where file named: you_module_name.xml

3. in __openerp.py__ add: 'data': ['views/you_module_name.xml']

4. in you_module_name.xml add: 

<?xml version="1.0" encoding="utf-8"?>
        <template id="assets_backend" name="you_module_name assets" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                <link rel="stylesheet" href="/you_module_name/static/src/css/you_module_name.css"/>
                <script type="text/javascript" src="/you_module_name/static/src/js/you_module_name.js"></script>

Need more info?

This documentation page has been extracted from the Q&A section where you can discuss it and get feedback.
Related question