Skip to content
Snippets Groups Projects
Commit 30b1af79 authored by Dharmraj Jhala's avatar Dharmraj Jhala Committed by Alexandre Kühn
Browse files

[IMP] * : enable static string edition using report editor


*:
	delivery
	hr_timesheet
	mrp
	sale
	sale_coupon
	stock

This commit makes the static strings / labels editable with studio
by wrapping them in appropriate tag (mostly span) whenever needed.

Task-Id 2030430

closes odoo/odoo#34685

Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
parent fef7ec7c
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@
<template id="report_package_barcode_small_delivery" inherit_id="stock.report_package_barcode_small">
<xpath expr="//div[hasclass('o_packaging_type')]" position="after">
<div class="row o_package_shipping_weight" t-if="o.shipping_weight">
<div class="col-12 text-center" style="font-size:24px; font-weight:bold;">Shipping Weight: <span t-field="o.shipping_weight"/> <t t-esc="env['product.template']._get_weight_uom_id_from_ir_config_parameter().display_name"/></div>
<div class="col-12 text-center" style="font-size:24px; font-weight:bold;"><span>Shipping Weight: </span><span t-field="o.shipping_weight"/> <t t-esc="env['product.template']._get_weight_uom_id_from_ir_config_parameter().display_name"/></div>
</div>
</xpath>
</template>
......
......@@ -26,8 +26,8 @@
<th><span>Date</span></th>
<th><span>Responsible</span></th>
<th><span>Description</span></th>
<th t-if="show_project">Project</th>
<th t-if="show_task">Task</th>
<th t-if="show_project"><span>Project</span></th>
<th t-if="show_task"><span>Task</span></th>
<th class="text-right"><span>Time</span></th>
</tr>
</thead>
......
......@@ -41,8 +41,8 @@
<div t-if="o.workorder_ids">
<h3>
<t t-if="o.state == 'done'">Operations Done</t>
<t t-else="">Operations Planned</t>
<span t-if="o.state == 'done'">Operations Done</span>
<span t-else="">Operations Planned</span>
</h3>
<table class="table table-sm">
<tr>
......@@ -62,12 +62,12 @@
</div>
<h3 t-if="o.move_raw_ids">
<t t-if="o.state == 'done'">
<span t-if="o.state == 'done'">
Consumed Products
</t>
<t t-else="">
</span>
<span t-else="">
Products to Consume
</t>
</span>
</h3>
<table class="table table-sm" t-if="o.move_raw_ids">
......@@ -124,7 +124,7 @@
</tr>
<tr>
<td>
Quantity:
<span>Quantity:</span>
<span t-esc="ml.product_uom_qty" t-if="ml.state !='done'"/>
<span t-esc="ml.qty_done" t-if="ml.state =='done'"/>
<span t-field="ml.product_uom_id" groups="uom.group_uom"/>
......
......@@ -74,8 +74,8 @@
</th>
<th name="th_taxes" class="text-right">Taxes</th>
<th name="th_subtotal" class="text-right">
<t groups="account.group_show_line_subtotals_tax_excluded">Amount</t>
<t groups="account.group_show_line_subtotals_tax_included">Total Price</t>
<span groups="account.group_show_line_subtotals_tax_excluded">Amount</span>
<span groups="account.group_show_line_subtotals_tax_included">Total Price</span>
</th>
</tr>
</thead>
......
......@@ -48,11 +48,11 @@
<strong class="bg-success" t-esc="o.code"></strong>
</h3>
<h4 t-if="o.program_id.rule_min_quantity > 1">
Minimum purchase of
<strong t-esc="o.program_id.rule_min_quantity"/> products
<span>Minimum purchase of</span>
<strong t-esc="o.program_id.rule_min_quantity"/> <span>products</span>
</h4>
<h4 t-if="o.program_id.rule_minimum_amount">
Valid for purchase above
<span>Valid for purchase above</span>
<strong t-esc="o.program_id.rule_minimum_amount" t-options="{'widget': 'monetary', 'display_currency': o.program_id.currency_id}"/>
</h4>
<p t-if="display_specific_products">
......
......@@ -94,9 +94,9 @@
</tbody>
</table>
<p>
<t t-if="o.backorder_ids and o.backorder_ids.filtered(lambda x: x.state not in ('done', 'cancel'))">
<span t-if="o.backorder_ids and o.backorder_ids.filtered(lambda x: x.state not in ('done', 'cancel'))">
All items couldn't be shipped, the remaining ones will be shipped as soon as they become available.
</t>
</span>
</p>
</div>
</t>
......
......@@ -17,7 +17,7 @@
</tr>
<tr>
<td>
LN/SN:
<span>LN/SN:</span>
<span t-field="o.name"/>
</td>
</tr>
......
......@@ -71,7 +71,7 @@
</div>
</div>
<div class="row o_packaging_type" t-if="o.packaging_id">
<div class="col-12 text-center" style="font-size:24px; font-weight:bold;">Package Type: <span t-field="o.packaging_id.name"/></div>
<div class="col-12 text-center" style="font-size:24px; font-weight:bold;"><span>Package Type: </span><span t-field="o.packaging_id.name"/></div>
</div>
</div>
</t>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment