fixing report

This commit is contained in:
ahmed-nouri051 2025-08-31 19:10:13 +02:00
parent 58bde7df58
commit 7c1d92bf41
1 changed files with 33 additions and 11 deletions

View File

@ -1,18 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="report_delivery_document_user_changed_to_done" inherit_id="stock.report_delivery_document">
<xpath expr="//div[@name='signature']" position="before">
<xpath expr="//div[@name='signature']" position="replace">
<div class="mt32" style="width:100%; display:table;">
<div name="user_changed_to_done" dir="rtl" style="float:right;">
<t t-if="o.picking_type_code == 'incoming'">
<strong>مستلم بواسطة:</strong>
<strong t-esc="o.user_changed_to_done.name"/>
</t>
<t t-if="o.picking_type_code == 'outgoing'">
<strong>سلم بواسطة:</strong>
<strong t-esc="o.user_changed_to_done.name"/>
</t>
<div style="display:table-cell; width:50%; text-align:left;">
<t t-if="o.signature">
<div>
<strong>Signature</strong>
</div>
<div style="text-align:left;padding-left:0px;">
<img t-att-src="image_data_uri(o.signature)" style="max-height: 1.3cm; max-width: 8cm; display:block; margin-left:0;"/>
</div>
<div style="margin-top:5px;">
<span t-field="o.partner_id.name"/>
</div>
</t>
</div>
<!-- Right column: User who delivered / received -->
<div style="display:table-cell; width:50%; text-align:right; direction:rtl;">
<t t-if="o.picking_type_code == 'incoming'">
<strong>مستلم بواسطة:</strong>
<span t-esc="o.user_changed_to_done.name"/>
</t>
<t t-if="o.picking_type_code == 'outgoing'">
<strong>سلم بواسطة:</strong>
<span t-esc="o.user_changed_to_done.name"/>
</t>
</div>
</div>
</xpath>
</template>
</odoo>
</odoo>