Browse Source

Oct 26 : [FIX] Bug Fixed 'digital_signature'

pull/295/head
AjmalCybro 2 years ago
parent
commit
9354b34d4a
  1. 7
      digital_signature/doc/RELEASE_NOTES.md
  2. 22
      digital_signature/views/invoice_report.xml
  3. 23
      digital_signature/views/purchase_report_inherit.xml
  4. 91
      digital_signature/views/stock_picking_report.xml

7
digital_signature/doc/RELEASE_NOTES.md

@ -1,7 +1,6 @@
## Module <digital_signature> ## Module <digital_signature>
#### 01.07.2022 #### 19.10.2023
#### Version 16.0.1.0.0 #### Version 16.0.1.1.0
#### ADD #### ADD
- Initial commit for Odoo 15 Digital Signature - Initial commit for Odoo 16 Digital Signature

22
digital_signature/views/invoice_report.xml

@ -1,22 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<template id="report_invoice_report_inherit_sale" <template id="report_invoice_report_inherit_sale" inherit_id="account.report_invoice_document">
inherit_id="account.report_invoice_document"> <!-- Inherits from 'account.report_invoice_document'. -->
<xpath expr="//div[@id='qrcode']" position="after"> <xpath expr="//div[@id='qrcode']" position="after">
<div id="signature" class="row justify-content-end"> <div id="signature" class="row justify-content-end">
<div class="col-4"> <div class="col-4">
<!-- Within the 'signature' div, create a column with a width of 4 units. -->
<table class="table table-sm"> <table class="table table-sm">
<div t-if="o.digital_sign" class="mt32 ml64 mr4" <!-- Check if 'o.digital_sign' exists before proceeding. -->
name="signature"> <div t-if="o.digital_sign" class="mt32 ml64 mr4" name="signature">
<!-- Display the image using 'image_data_uri(o.digital_sign)' as the source. -->
<img t-att-src="image_data_uri(o.digital_sign)" <img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm; style="max-height: 4cm; max-width: 8cm; padding-top: 50px;"/>
padding-top: 50px;"/>
</div> </div>
<tr> <tr>
<td class="text-right"> <td class="text-right" style="border: 1px solid white; background:none;">
<p t-field="o.sign_by"/> <!-- Display 'sign_by', 'sign_on', and 'designation' fields if they exist. -->
<p t-field="o.sign_on"/> <p t-if="o.sign_by" t-field="o.sign_by"/>
<p t-field="o.designation"/> <p t-if="o.sign_on" t-field="o.sign_on"/>
<p t-if="o.designation" t-field="o.designation"/>
</td> </td>
</tr> </tr>
</table> </table>

23
digital_signature/views/purchase_report_inherit.xml

@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<odoo> <odoo>
<template id="purchase_report_inherit" <!-- Inheriting from 'purchase.report_purchaseorder_document'. -->
inherit_id="purchase.report_purchaseorder_document"> <template id="purchase_report_inherit" inherit_id="purchase.report_purchaseorder_document">
<xpath expr="//div[@id='total']" position="after"> <xpath expr="//div[@id='total']" position="after">
<div id="signature" class="row justify-content-end"> <div id="signature" class="row justify-content-end">
<div class="col-4"> <div class="col-4">
<table class="table table-sm"> <table class="table table-sm">
<div t-if="o.digital_sign" class="mt32 ml64 mr4" <!-- Check if 'digital_sign' exists before proceeding. -->
name="signature"> <div t-if="o.digital_sign" class="mt32 ml64 mr4" name="signature">
<!-- Display the digital signature as an image. -->
<img t-att-src="image_data_uri(o.digital_sign)" <img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm; style="max-height: 4cm; max-width: 8cm; padding-top: 50px;"/>
padding-top: 50px;"/>
</div> </div>
<tr> <tr>
<td class="text-right"> <td class="text-right" style="border: 1px solid white; background:none;">
<p t-field="o.sign_by"/> <!-- Display 'sign_by', 'sign_on', and 'designation' fields if they exist. -->
<p t-field="o.sign_on"/> <p t-if="o.sign_by" t-field="o.sign_by"/>
<p t-field="o.designation"/> <p t-if="o.sign_on" t-field="o.sign_on"/>
<p t-if="o.designation" t-field="o.designation"/>
</td> </td>
</tr> </tr>
</table> </table>
@ -25,5 +26,3 @@
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

91
digital_signature/views/stock_picking_report.xml

@ -1,61 +1,60 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<template id="stock_picking_report_inherit" <!-- Inheriting from 'stock.report_picking'. -->
inherit_id="stock.report_picking"> <template id="stock_picking_report_inherit" inherit_id="stock.report_picking">
<xpath expr="//table" position="after"> <xpath expr="//table" position="after">
<div id="signature" class="row justify-content-end"> <div id="signature" class="row justify-content-end">
<t t-if="o.sign_applicable == 'picking_operations' or <!-- Check if 'sign_applicable' is 'picking_operations' or 'both' for displaying the signature. -->
o.sign_applicable == 'both'"> <t t-if="o.sign_applicable == 'picking_operations' or o.sign_applicable == 'both">
<div class="col-4"> <div class="col-4">
<table class="table table-sm"> <table class="table table-sm">
<div t-if="o.digital_sign" class="mt32 ml64 mr4" <!-- Check if 'digital_sign' exists before proceeding. -->
name="signature"> <div t-if="o.digital_sign" class="mt32 ml64 mr4" name="signature">
<img t-att-src="image_data_uri(o.digital_sign)" <!-- Display the digital signature as an image. -->
style="max-height: 4cm; max-width: 8cm; <img t-att-src="image_data_uri(o.digital_sign)"
padding-top: 50px;"/> style="max-height: 4cm; max-width: 8cm; padding-top: 50px;"/>
</div> </div>
<tr> <tr>
<td class="text-right"> <td class="text-right" style="border: 1px solid white; background:none;">
<p t-field="o.sign_by"/> <!-- Display 'sign_by', 'sign_on', and 'designation' fields if they exist. -->
<p t-field="o.sign_on"/> <p t-if="o.sign_by" t-field="o.sign_by"/>
<p t-field="o.designation"/> <p t-if="o.sign_on" t-field="o.sign_on"/>
</td> <p t-if="o.designation" t-field="o.designation"/>
</tr> </td>
</table> </tr>
</div> </table>
</div>
</t> </t>
</div> </div>
</xpath> </xpath>
</template> </template>
<template id="stock_delivery_slip_inherit"
inherit_id="stock.report_delivery_document"> <!-- Inheriting from 'stock.report_delivery_document'. -->
<template id="stock_delivery_slip_inherit" inherit_id="stock.report_delivery_document">
<xpath expr="//div[@name='signature']" position="before"> <xpath expr="//div[@name='signature']" position="before">
<div id="signature" class="row justify-content-end"> <div id="signature" class="row justify-content-end">
<t t-if="o.sign_applicable == 'delivery' or <!-- Check if 'sign_applicable' is 'delivery' or 'both' for displaying the signature. -->
o.sign_applicable == 'both'"> <t t-if="o.sign_applicable == 'delivery' or o.sign_applicable == 'both'">
<div class="col-4"> <div class="col-4">
<table class="table table-sm"> <table class="table table-sm">
<div t-if="o.digital_sign" class="mt32 ml64 mr4" <!-- Check if 'digital_sign' exists before proceeding. -->
name="signature"> <div t-if="o.digital_sign" class="mt32 ml64 mr4" name="signature">
<!-- Display the digital signature as an image. -->
<img t-att-src="image_data_uri(o.digital_sign)" <img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm; style="max-height: 4cm; max-width: 8cm; padding-top: 50px;"/>
padding-top: 50px;"/>
</div> </div>
<tr> <tr>
<td class="text-right"> <td class="text-right" style="border: 1px solid white; background:none;">
<p t-field="o.sign_by"/> <!-- Display 'sign_by', 'sign_on', and 'designation' fields if they exist. -->
<p t-field="o.sign_on"/> <p t-if="o.sign_by" t-field="o.sign_by"/>
<p t-field="o.designation"/> <p t-if="o.sign_on" t-field="o.sign_on"/>
<p t-if="o.designation" t-field="o.designation"/>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</t>
</t> </div>
</div>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>
Loading…
Cancel
Save