Files
odoo_source/addons/stock/views/stock_template.xml
T
Thibault Delavallée eadf1270ed [MOV][IMP] purchase(_stock), (sale_)stock: reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#19366
2020-11-25 12:31:09 +00:00

122 lines
5.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="stock_assets_backend" name="mrp_workorder assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/stock/static/src/js/inventory_report_list_controller.js"></script>
<script type="text/javascript" src="/stock/static/src/js/inventory_report_list_view.js"></script>
<script type="text/javascript" src="/stock/static/src/js/inventory_singleton_list_controller.js"></script>
<script type="text/javascript" src="/stock/static/src/js/inventory_singleton_list_view.js"></script>
<script type="text/javascript" src="/stock/static/src/js/inventory_validate_button_controller.js"></script>
<script type="text/javascript" src="/stock/static/src/js/inventory_validate_button_view.js"></script>
<script type="text/javascript" src="/stock/static/src/js/report_stock_forecasted.js"/>
<script type="text/javascript" src="/stock/static/src/js/stock_orderpoint_list_controller.js"></script>
<script type="text/javascript" src="/stock/static/src/js/stock_orderpoint_list_model.js"></script>
<script type="text/javascript" src="/stock/static/src/js/stock_orderpoint_list_view.js"></script>
<script type="text/javascript" src="/stock/static/src/js/stock_traceability_report_backend.js"></script>
<script type="text/javascript" src="/stock/static/src/js/stock_traceability_report_widgets.js"></script>
<script type="text/javascript" src="/stock/static/src/js/popover_widget.js"></script>
<script type="text/javascript" src="/stock/static/src/js/forecast_widget.js"></script>
<script type="text/javascript" src="/stock/static/src/js/basic_model.js"></script>
<script type="text/javascript" src="/stock/static/src/js/stock_rescheduling_popover.js"></script>
<script type="text/javascript" src="/stock/static/tests/tours/stock_report_tests.js"></script>
<link rel="stylesheet" type="text/scss" href="/stock/static/src/scss/forecast_widget.scss"/>
<link rel="stylesheet" type="text/scss" href="/stock/static/src/scss/stock_traceability_report.scss"/>
<link rel="stylesheet" type="text/scss" href="/stock/static/src/scss/stock_empty_screen.scss"/>
</xpath>
</template>
<template id="qunit_suite" name="stock tests" inherit_id="web.qunit_suite_tests">
<xpath expr="." position="inside">
<script type="text/javascript" src="/stock/static/tests/singleton_list_tests.js"/>
<script type="text/javascript" src="/stock/static/tests/popover_widget_tests.js"/>
<script type="text/javascript" src="/stock/static/tests/stock_traceability_report_backend_tests.js"/>
</xpath>
</template>
<template id="message_head">
<t t-if="move.state != 'done'">
<strong>The initial demand has been updated.</strong>
</t>
<t t-if="move.state == 'done'">
<strong>
The done move line has been corrected.
</strong>
</t>
</template>
<template id="message_body">
<ul>
<li>
<t t-esc="move.product_id.display_name"/>:
</li>
<t t-if="move.state != 'done'">
<t t-if="'product_uom_qty' in vals">
<li>
Quantity : <t t-esc="move.product_uom_qty"/> -&gt; <t t-esc="float(vals.get('product_uom_qty'))"/>
</li>
</t>
</t>
<t t-if="'qty_done' in vals">
<li>
Quantity : <t t-esc="move.qty_done"/> -&gt; <t t-esc="float(vals.get('qty_done'))"/>
</li>
</t>
<t t-if="'location_id' in vals">
<li>
Source Location:
<t t-if="move.location_id">
<t t-esc="move.location_id.name"/> -&gt;
</t>
<t t-esc="vals['location_name']"/>
</li>
</t>
<t t-if="'location_dest_id' in vals">
<li>
Destination Location:
<t t-if="move.location_dest_id">
<t t-esc="move.location_dest_id.name"/> -&gt;
</t>
<t t-esc="vals['location_dest_name']"/>
</li>
</t>
<t t-if="'lot_name' in vals">
<li>
Lot/Serial :
<t t-if="move.lot_id">
<t t-esc="move.lot_id.name"/> -&gt;
</t>
<t t-esc="vals['lot_name']"/>
</li>
</t>
<t t-if="'package_name' in vals">
<li>
Source Package :
<t t-if="move.package_id">
<t t-esc="move.package_id.name"/> -&gt;
</t>
<t t-esc="vals['package_name']"/>
</li>
</t>
<t t-if="'result_package_name' in vals">
<li>
Destination Package :
<t t-if="move.result_package_id">
<t t-esc="move.result_package_id.name"/> -&gt;
</t>
<t t-esc="vals['result_package_name']"/>
</li>
</t>
<t t-if="'owner_name' in vals">
<li>
Owner :
<t t-if="move.owner_id">
<t t-esc="move.owner_id.name"/> -&gt;
</t>
<t t-esc="vals['owner_name']"/>
</li>
</t>
</ul>
</template>
</odoo>