[REF] point_of_sale: clean up assets views

This commit handles 2 things:

- The line odoo._modules = <t t-raw="get_modules_order()"/>; used to be in
assets_backend but is now directly added to the web.bootsrap (the odoo
index template). Since pos has its own index, we add it there.

- An "id" attribute has been removed from a link tag which was used to
indentify said link as an xpath target. The xpath has been adapted to
target the href instead.

This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit is contained in:
Julien Mougenot
2021-03-31 13:57:17 +02:00
co-authored by Simon Genin
parent 6b87c77502
commit 26dea77c72
4 changed files with 4 additions and 2 deletions
@@ -4,7 +4,7 @@
<template id="point_of_sale.assets" name="point_of_sale assets">
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/fonts.scss"/>
<link rel="stylesheet" href="/web/static/lib/fontawesome/css/font-awesome.css"/>
<link rel="stylesheet" href="/point_of_sale/static/src/css/pos.css" id="pos-stylesheet"/>
<link rel="stylesheet" href="/point_of_sale/static/src/css/pos.css"/>
<link rel="stylesheet" href="/point_of_sale/static/src/css/keyboard.css"/>
<link rel="stylesheet" href="/point_of_sale/static/src/css/pos_receipts.css"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/scss/fontawesome_overridden.scss"/>
@@ -58,6 +58,7 @@
'login_number': login_number,
'debug': debug,
})"/>;
odoo._modules = <t t-raw="get_modules_order()"/>;
</script>
<t t-call="point_of_sale.assets_common"/>
@@ -69,6 +69,7 @@
'session_info': session_info,
'debug': debug,
})"/>;
odoo._modules = <t t-raw="get_modules_order()"/>;
</script>
<t t-call="point_of_sale.assets_common" />
@@ -33,7 +33,7 @@
<script type="text/javascript" src="/pos_restaurant/static/src/js/Screens/PaymentScreen.js"></script>
<script type="text/javascript" src="/pos_restaurant/static/src/js/Screens/TipScreen.js"></script>
</xpath>
<xpath expr="//link[@id='pos-stylesheet']" position="after">
<xpath expr="//link[@href='/point_of_sale/static/src/css/pos.css']" position="after">
<link rel="stylesheet" href="/pos_restaurant/static/src/css/restaurant.css"/>
</xpath>
</template>