Browse Source

Feb 01 : [UPDT] Module Updated 'digital_signature'

pull/267/merge
RisvanaCybro 1 year ago
parent
commit
4f7d108e2e
  1. 29
      digital_signature/README.rst
  2. 4
      digital_signature/__init__.py
  3. 40
      digital_signature/__manifest__.py
  4. 9
      digital_signature/doc/RELEASE_NOTES.md
  5. 11
      digital_signature/models/__init__.py
  6. 131
      digital_signature/models/account_move.py
  7. 72
      digital_signature/models/inventory.py
  8. 80
      digital_signature/models/invoice.py
  9. 80
      digital_signature/models/purchase_order.py
  10. 37
      digital_signature/models/res_company.py
  11. 71
      digital_signature/models/res_config_settings.py
  12. 117
      digital_signature/models/stock_picking.py
  13. 0
      digital_signature/static/description/assets/icons/check.png
  14. 0
      digital_signature/static/description/assets/icons/chevron.png
  15. 0
      digital_signature/static/description/assets/icons/cogs.png
  16. 0
      digital_signature/static/description/assets/icons/consultation.png
  17. 0
      digital_signature/static/description/assets/icons/ecom-black.png
  18. 0
      digital_signature/static/description/assets/icons/education-black.png
  19. 0
      digital_signature/static/description/assets/icons/hotel-black.png
  20. 0
      digital_signature/static/description/assets/icons/license.png
  21. 0
      digital_signature/static/description/assets/icons/lifebuoy.png
  22. 0
      digital_signature/static/description/assets/icons/manufacturing-black.png
  23. 0
      digital_signature/static/description/assets/icons/pos-black.png
  24. 0
      digital_signature/static/description/assets/icons/puzzle.png
  25. 0
      digital_signature/static/description/assets/icons/restaurant-black.png
  26. 0
      digital_signature/static/description/assets/icons/service-black.png
  27. 0
      digital_signature/static/description/assets/icons/trading-black.png
  28. 0
      digital_signature/static/description/assets/icons/training.png
  29. 0
      digital_signature/static/description/assets/icons/update.png
  30. 0
      digital_signature/static/description/assets/icons/user.png
  31. 0
      digital_signature/static/description/assets/icons/wrench.png
  32. BIN
      digital_signature/static/description/assets/modules/1.png
  33. BIN
      digital_signature/static/description/assets/modules/2.png
  34. BIN
      digital_signature/static/description/assets/modules/3.png
  35. BIN
      digital_signature/static/description/assets/modules/4.png
  36. BIN
      digital_signature/static/description/assets/modules/5.gif
  37. BIN
      digital_signature/static/description/assets/modules/6.png
  38. BIN
      digital_signature/static/description/assets/modules/l1.png
  39. BIN
      digital_signature/static/description/assets/modules/l2.png
  40. BIN
      digital_signature/static/description/assets/modules/l3.png
  41. BIN
      digital_signature/static/description/assets/modules/l4.png
  42. BIN
      digital_signature/static/description/assets/modules/l5.png
  43. BIN
      digital_signature/static/description/assets/modules/l6.png
  44. BIN
      digital_signature/static/description/assets/screenshots/1.png
  45. BIN
      digital_signature/static/description/assets/screenshots/10.png
  46. BIN
      digital_signature/static/description/assets/screenshots/11.png
  47. BIN
      digital_signature/static/description/assets/screenshots/12.png
  48. BIN
      digital_signature/static/description/assets/screenshots/13.png
  49. BIN
      digital_signature/static/description/assets/screenshots/14.png
  50. BIN
      digital_signature/static/description/assets/screenshots/15.png
  51. BIN
      digital_signature/static/description/assets/screenshots/16.png
  52. BIN
      digital_signature/static/description/assets/screenshots/17.png
  53. BIN
      digital_signature/static/description/assets/screenshots/2.png
  54. BIN
      digital_signature/static/description/assets/screenshots/3.png
  55. BIN
      digital_signature/static/description/assets/screenshots/4.png
  56. BIN
      digital_signature/static/description/assets/screenshots/5.png
  57. BIN
      digital_signature/static/description/assets/screenshots/6.png
  58. BIN
      digital_signature/static/description/assets/screenshots/8.png
  59. BIN
      digital_signature/static/description/assets/screenshots/9.png
  60. BIN
      digital_signature/static/description/assets/screenshots/Screenshot1.png
  61. BIN
      digital_signature/static/description/assets/screenshots/Screenshot10.png
  62. BIN
      digital_signature/static/description/assets/screenshots/Screenshot11.png
  63. BIN
      digital_signature/static/description/assets/screenshots/Screenshot2.png
  64. BIN
      digital_signature/static/description/assets/screenshots/Screenshot3.png
  65. BIN
      digital_signature/static/description/assets/screenshots/Screenshot4.png
  66. BIN
      digital_signature/static/description/assets/screenshots/Screenshot5.png
  67. BIN
      digital_signature/static/description/assets/screenshots/Screenshot6.png
  68. BIN
      digital_signature/static/description/assets/screenshots/Screenshot7.png
  69. BIN
      digital_signature/static/description/assets/screenshots/Screenshot8.png
  70. BIN
      digital_signature/static/description/assets/screenshots/Screenshot9.png
  71. BIN
      digital_signature/static/description/assets/screenshots/hero.gif
  72. BIN
      digital_signature/static/description/banner.png
  73. BIN
      digital_signature/static/description/icon.png
  74. 680
      digital_signature/static/description/index.html
  75. 25
      digital_signature/static/src/css/signature_stamp.css
  76. 173
      digital_signature/views/account_move_templates.xml
  77. 7
      digital_signature/views/account_move_views.xml
  78. 31
      digital_signature/views/inventory.xml
  79. 29
      digital_signature/views/invoice_report.xml
  80. 31
      digital_signature/views/purchase_order.xml
  81. 112
      digital_signature/views/purchase_order_templates.xml
  82. 33
      digital_signature/views/purchase_order_views.xml
  83. 28
      digital_signature/views/purchase_report_inherit.xml
  84. 20
      digital_signature/views/res_company_views.xml
  85. 215
      digital_signature/views/res_config_settings.xml
  86. 313
      digital_signature/views/res_config_settings_views.xml
  87. 60
      digital_signature/views/stock_picking_report.xml
  88. 416
      digital_signature/views/stock_picking_templates.xml
  89. 32
      digital_signature/views/stock_picking_views.xml

29
digital_signature/README.rst

@ -1,29 +1,35 @@
.. image:: https://img.shields.io/badge/licence-LGPL--3-green.svg
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Digital Signature In Purchase Order, Invoice, Inventory Digital Signature In Purchase Order, Invoice, Inventory
======================================================= =======================================================
* Digital Signature in Purchase Order, Invoice, Inventory * This module provide feature to add the digital signature and company stamp on
purchase order, invoice, and inventory.
Installation Installation
============ ============
- www.odoo.com/documentation/15.0/setup/install.html - www.odoo.com/documentation/16.0/setup/install.html
- Install our custom addon - Install our custom addon
License License
------- -------
General Public License, Version 3 (LGPL v3). General Public License, Version 3 (LGPL-3).
(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) (https://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Company Company
------- -------
* 'Cybrosys Techno Solutions <https://cybrosys.com/>`__ * `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits Credits
------- -------
* Developer: * Developers: (V16) LAJINA,Ranjith R Contact : odoo@cybrosys.com
(V15) Noorjahan @ Cybrosys
Contacts Contacts
-------- --------
* Mail Contact : odoo@cybrosys.com * Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker Bug Tracker
----------- -----------
@ -31,11 +37,12 @@ Bugs are tracked on GitHub Issues. In case of trouble, please check there if you
Maintainer Maintainer
========== ==========
This module is maintained by Cybrosys Technologies. .. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
For support and more information, please visit https://www.cybrosys.com This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information Further information
=================== ===================
HTML Description: `<static/description/index.html>`__ HTML Description: `<static/description/index.html>`__

4
digital_signature/__init__.py

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################# #############################################################################
#
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER
@ -19,5 +18,4 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################# #############################################################################
from . import models from . import models

40
digital_signature/__manifest__.py

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################# #############################################################################
#
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER
@ -19,28 +18,37 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################# #############################################################################
{ {
'name': 'Digital Signature In Purchase Order, Invoice, Inventory', 'name': 'Digital Signature In Purchase Order, Invoice, Inventory',
'summary': 'Digital Signature in Purchase Order, Invoice, Inventory V15', 'version': '16.0.2.1.0',
'version': '16.0.1.0.0', 'category': 'Extra Tools',
'category': 'Tools', 'summary': """This module provide feature to add the digital signature and
'description': """Digital Signature in Purchase Order, Invoice, Inventory V15""", company stamp.""",
'description': """Module helps to add the digital signature and company
stamp to the report of the purchase order, invoice, and inventory.""",
'author': 'Cybrosys Techno Solutions', 'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['purchase', 'stock', 'account'], 'depends': ['purchase', 'stock', 'account'],
'data': [ 'data': [
'views/res_config_settings.xml', 'views/purchase_order_views.xml',
'views/purchase_order.xml', 'views/account_move_views.xml',
'views/inventory.xml', 'views/purchase_order_templates.xml',
'views/invoice.xml', 'views/stock_picking_views.xml',
'views/purchase_report_inherit.xml', 'views/account_move_templates.xml',
'views/stock_picking_report.xml', 'views/res_company_views.xml',
'views/invoice_report.xml', 'views/stock_picking_templates.xml',
'views/res_config_settings_views.xml',
], ],
'installable': True, 'assets': {
'application': False, 'web.report_assets_common': [
'digital_signature/static/src/css/signature_stamp.css',
],
},
'images': ['static/description/banner.png'], 'images': ['static/description/banner.png'],
'license': 'LGPL-3', 'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
} }

9
digital_signature/doc/RELEASE_NOTES.md

@ -1,6 +1,11 @@
## Module <digital_signature> ## Module <digital_signature>
#### 19.10.2023 #### 01.07.2022
#### Version 16.0.1.1.0 #### Version 16.0.1.1.0
#### ADD #### ADD
- Initial commit for Odoo 16 Digital Signature - Initial commit for Digital Signature In Purchase Order, Invoice, Inventory
#### 26.10.2023
#### Version 16.0.2.1.0
#### UPDT
- Added the company stamp feature in Purchase Order, Invoice and Inventory

11
digital_signature/models/__init__.py

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################# #############################################################################
#
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER
@ -19,8 +18,8 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################# #############################################################################
from . import account_move
from . import res_config_settings
from . import purchase_order from . import purchase_order
from . import inventory from . import res_company
from . import invoice from . import res_config_settings
from . import stock_picking

131
digital_signature/models/account_move.py

@ -0,0 +1,131 @@
# -*- coding: utf-8 -*-
#############################################################################
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class AccountMove(models.Model):
"""Inherited the account move model for showing the digital signature
and company stamp in both invoice and bill"""
_inherit = "account.move"
_description = 'Account Move'
@api.model
def _default_show_signature(self):
""" Returns the value of digital sign from Invoice setting
for invoice"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_digital_sign_invoice')
@api.model
def _default_enable_sign(self):
"""Returns the value of enable options from Invoice setting"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.enable_options_invoice')
@api.model
def _default_show_sign_bill(self):
""" Returns the value of signature from Invoice setting for bill"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_digital_sign_bill')
@api.model
def _default_show_stamp_invoice(self):
""" Returns the value of company stamp from Invoice setting
for invoice"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_company_stamp_invoice')
@api.model
def _default_show_stamp_bill(self):
""" Returns the value of company stamp from Invoice setting
for bill"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_company_stamp_bill')
digital_sign = fields.Binary(string='Signature',
help="Signature of accounting management "
"person")
sign_by = fields.Char(string='Signed By', help="Name of signed person")
designation = fields.Char(string='Designation',
help="Designation for signed person")
sign_on = fields.Datetime(string='Signed On', help="Date of sign")
show_signature = fields.Boolean('Show Signature',
default=_default_show_signature,
compute='_compute_show_signature',
help="Field to get the value in setting"
" to current model")
show_sign_bill = fields.Boolean('Show Signature',
default=_default_show_sign_bill,
compute='_compute_show_sign_bill',
help="Field to get the value in setting to "
"current model")
enable_others = fields.Boolean(default=_default_enable_sign,
compute='_compute_enable_others',
help="Field to get the value in setting to "
"current model")
show_stamp_invoice = fields.Boolean(default=_default_show_stamp_invoice,
compute='_compute_show_stamp_invoice',
help="Field to get the value in setting"
" to current model")
stamp_invoicing = fields.Selection([
('customer_invoice', 'Customer Invoice'),
('vendor_bill', 'Vendor Bill'), ('both', 'Both'),
], string="Company Stamp Applicable",
compute='_compute_stamp_invoicing', help="Field to get the value in "
"setting to current model")
def _compute_show_signature(self):
""" Compute the value of digital signature"""
for record in self:
record.show_signature = self._default_show_signature()
def _compute_enable_others(self):
""" Compute the value of enable options from the invoicing setting"""
for record in self:
record.enable_others = self._default_enable_sign()
def _compute_show_sign_bill(self):
""" Compute the value of digital signature in bill"""
for record in self:
record.show_sign_bill = self._default_show_sign_bill()
def _compute_stamp_invoicing(self):
""" Compute the value, which report has applied the stamp"""
for invoice in self:
invoice.stamp_invoicing = self.env['ir.config_parameter']. \
sudo().get_param(
'digital_signature.company_stamp_applicable_invoicing')
def _compute_show_stamp_invoice(self):
""" Compute the value of company stamp"""
for invoice in self:
invoice.show_stamp_invoice = self._default_show_stamp_invoice()
def action_post(self):
"""Validate the signature is missing or not"""
res = super(AccountMove, self).action_post()
if self.env[
'ir.config_parameter'].sudo().get_param(
'digital_signature.confirm_sign_invoice') and \
self.digital_sign is False:
raise UserError(_("Signature is missing"))
return res

72
digital_signature/models/inventory.py

@ -1,72 +0,0 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api, _
from odoo.exceptions import Warning, UserError
class InventoryInherit(models.Model):
_inherit = "stock.picking"
def _default_show_sign(self):
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_digital_sign_inventory')
def _default_enable_options(self):
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.enable_options_inventory')
digital_sign = fields.Binary(string='Signature')
sign_by = fields.Char(string='Signed By')
designation = fields.Char(string='Designation')
sign_on = fields.Datetime(string='Signed On')
show_sign = fields.Boolean(default=_default_show_sign,
compute='_compute_show_sign')
enable_option = fields.Boolean(default=_default_enable_options,
compute='_compute_enable_optiion')
sign_applicable = fields.Selection([
('picking_operations', 'Picking Operations'),
('delivery', 'Delivery Slip'),
('both', 'Both'),
], string="Sign Applicable inside", compute='_compute_sign_applicable')
def button_validate(self):
res = super(InventoryInherit, self).button_validate()
if self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.confirm_sign_inventory') and self.digital_sign is False:
raise UserError('Signature is missing')
return res
def _compute_show_sign(self):
show_signature = self._default_show_sign()
for record in self:
record.show_sign = show_signature
def _compute_enable_optiion(self):
enable_others = self._default_enable_options()
for record in self:
record.enable_option = enable_others
def _compute_sign_applicable(self):
for rec in self:
rec.sign_applicable = self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.sign_applicable')

80
digital_signature/models/invoice.py

@ -1,80 +0,0 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api, _
from odoo.exceptions import Warning, UserError
class InvoiceInherit(models.Model):
_inherit = "account.move"
@api.model
def _default_show_sign(self):
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_digital_sign_invoice')
@api.model
def _default_enable_sign(self):
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.enable_options_invoice')
@api.model
def _default_show_sign_bill(self):
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_digital_sign_bill')
digital_sign = fields.Binary(string='Signature')
sign_by = fields.Char(string='Signed By')
designation = fields.Char(string='Designation')
sign_on = fields.Datetime(string='Signed On')
show_signature = fields.Boolean('Show Signature',
default=_default_show_sign,
compute='_compute_show_signature')
show_sign_bill = fields.Boolean('Show Signature',
default=_default_show_sign_bill,
compute='_compute_show_sign_bill')
enable_others = fields.Boolean(default=_default_enable_sign,
compute='_compute_enable_others')
def action_post(self):
res = super(InvoiceInherit, self).action_post()
if self.env[
'ir.config_parameter'].sudo().get_param(
'digital_signature.confirm_sign_invoice') and self.digital_sign is False:
raise UserError(_("Signature is missing"))
return res
def _compute_show_signature(self):
show_signature = self._default_show_sign()
for record in self:
record.show_signature = show_signature
def _compute_enable_others(self):
enable_others = self._default_enable_sign()
for record in self:
record.enable_others = enable_others
def _compute_show_sign_bill(self):
show_sign_bill = self._default_show_sign_bill()
for record in self:
record.show_sign_bill = show_sign_bill

80
digital_signature/models/purchase_order.py

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################# #############################################################################
#
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER
@ -19,49 +18,76 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################# #############################################################################
from odoo import api, fields, models, _
from odoo import models, fields, api, _ from odoo.exceptions import UserError
from odoo.exceptions import Warning, UserError
class PurchaseOrderInherit(models.Model): class PurchaseOrder(models.Model):
"""Inherited the purchase order model for showing the digital signature
and company stamp in the purchase report"""
_inherit = "purchase.order" _inherit = "purchase.order"
_description = 'Purchase Order'
@api.model @api.model
def _default_show_sign(self): def _default_show_sign(self):
""" Returns the value of digital sign from Purchase setting"""
return self.env['ir.config_parameter'].sudo().get_param( return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_digital_sign_po') 'digital_signature.show_digital_sign_po')
@api.model @api.model
def _default_enable_sign(self): def _default_enable_sign(self):
"""Returns the value of enable options from Purchase setting"""
return self.env['ir.config_parameter'].sudo().get_param( return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.enable_options_po') 'digital_signature.enable_options_po')
digital_sign = fields.Binary(string='Signature') @api.model
sign_by = fields.Char(string='Signed By') def _default_show_stamp_po(self):
designation = fields.Char(string='Designation') """ Returns the value of company stamp from purchase setting"""
sign_on = fields.Datetime(string='Signed On') return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_company_stamp_po')
digital_sign = fields.Binary(string='Signature', help="Signature of "
"purchase management"
"person")
sign_by = fields.Char(string='Signed By', help="Name of signed person")
designation = fields.Char(string='Designation',
help="Designation for signed person")
sign_on = fields.Datetime(string='Signed On', help="Date of sign")
show_signature = fields.Boolean('Show Signature', show_signature = fields.Boolean('Show Signature',
default=_default_show_sign, default=_default_show_sign,
compute='_compute_show_signature') compute='_compute_show_signature',
enable_others = fields.Boolean(default=_default_enable_sign, help="Field to get the value in setting to "
compute='_compute_enable_others') "current model")
enable_sign = fields.Boolean(default=_default_enable_sign,
def button_confirm(self): compute='_compute_enable_sign',
res = super(PurchaseOrderInherit, self).button_confirm() help="Field to get the value in setting to "
if self.env[ "current model")
'ir.config_parameter'].sudo().get_param( show_stamp_po = fields.Boolean(default=_default_show_stamp_po,
'digital_signature.confirm_sign_po') and self.digital_sign is False: compute='_compute_show_stamp_po',
raise UserError(_("Signature is missing")) help="Field to get the value in setting to "
"current model")
return res
def _compute_show_signature(self): def _compute_show_signature(self):
show_signature = self._default_show_sign() """ Compute the value of digital signature"""
for record in self: for record in self:
record.show_signature = show_signature record.show_signature = self._default_show_sign()
def _compute_enable_others(self): def _compute_enable_sign(self):
enable_others = self._default_enable_sign() """ Compute the value of enable options from the purchase settings"""
for record in self: for record in self:
record.enable_others = enable_others record.enable_sign = self._default_enable_sign()
def _compute_show_stamp_po(self):
""" Compute the value of company stamp"""
for record in self:
record.show_stamp_po = self._default_show_stamp_po()
def button_confirm(self):
"""Validate the signature is missing or not"""
res = super(PurchaseOrder, self).button_confirm()
if self.env[
'ir.config_parameter'].sudo(). \
get_param('digital_signature.confirm_sign_po') \
and self.digital_sign is False:
raise UserError(_("Signature is missing"))
return res

37
digital_signature/models/res_company.py

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
#############################################################################
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class ResCompany(models.Model):
"""Inherited the res company for setting the company stamp"""
_inherit = 'res.company'
_description = 'Company'
stamp = fields.Binary(string="Stamp", help="Company stamp")
position = fields.Selection(selection=[
('left', 'Left'),
('right', 'Right'),
('center', 'Center'),
], string='Position', tracking=True, default="left",
help="The position is used to position the signature and company "
"stamp in reports")

71
digital_signature/models/res_config_settings.py

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################# #############################################################################
#
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER
@ -19,36 +18,76 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################# #############################################################################
from odoo import fields, models
from odoo import models, fields, api, _
class ResConfigurationInherit(models.TransientModel): class ResConfigSettings(models.TransientModel):
"""Inherited the res config settings for returning the value of digital
signature and company stamp from settings"""
_inherit = 'res.config.settings' _inherit = 'res.config.settings'
show_digital_sign_po = fields.Boolean( show_digital_sign_po = fields.Boolean(
config_parameter='digital_signature.show_digital_sign_po') config_parameter='digital_signature.show_digital_sign_po',
help="Enable to show sign in purchase order")
enable_options_po = fields.Boolean( enable_options_po = fields.Boolean(
config_parameter='digital_signature.enable_options_po') config_parameter='digital_signature.enable_options_po',
help="Enable to option in purchase order")
confirm_sign_po = fields.Boolean( confirm_sign_po = fields.Boolean(
config_parameter='digital_signature.confirm_sign_po') config_parameter='digital_signature.confirm_sign_po',
help="Enable to confirm sign in purchase order")
show_digital_sign_inventory = fields.Boolean( show_digital_sign_inventory = fields.Boolean(
config_parameter='digital_signature.show_digital_sign_inventory') config_parameter='digital_signature.show_digital_sign_inventory',
help="Enable to show sign in inventory")
enable_options_inventory = fields.Boolean( enable_options_inventory = fields.Boolean(
config_parameter='digital_signature.enable_options_inventory') config_parameter='digital_signature.enable_options_inventory',
help="Enable to option in inventory")
sign_applicable = fields.Selection([ sign_applicable = fields.Selection([
('picking_operations', 'Picking Operations'), ('picking_operations', 'Picking Operations'),
('delivery', 'Delivery Slip'), ('both', 'Both'), ('delivery', 'Delivery Slip'), ('both', 'Both'),
], string="Sign Applicable inside", ], string="Sign Applicable inside",
default="picking_operations", default="picking_operations",
config_parameter='digital_signature.sign_applicable') config_parameter='digital_signature.sign_applicable',
help="Options to whether the feature have to available")
confirm_sign_inventory = fields.Boolean( confirm_sign_inventory = fields.Boolean(
config_parameter='digital_signature.confirm_sign_inventory') config_parameter='digital_signature.confirm_sign_inventory',
help="Enable to confirm sign in inventory")
show_digital_sign_invoice = fields.Boolean( show_digital_sign_invoice = fields.Boolean(
config_parameter='digital_signature.show_digital_sign_invoice') config_parameter='digital_signature.show_digital_sign_invoice',
help="Enable to show sign in invoice")
enable_options_invoice = fields.Boolean( enable_options_invoice = fields.Boolean(
config_parameter='digital_signature.enable_options_invoice') config_parameter='digital_signature.enable_options_invoice',
help="Enable to option in invoice")
confirm_sign_invoice = fields.Boolean( confirm_sign_invoice = fields.Boolean(
config_parameter='digital_signature.confirm_sign_invoice') config_parameter='digital_signature.confirm_sign_invoice',
help="Enable to confirm sign in inventory"
)
show_digital_sign_bill = fields.Boolean( show_digital_sign_bill = fields.Boolean(
config_parameter='digital_signature.show_digital_sign_bill') config_parameter='digital_signature.show_digital_sign_bill',
help="Enable to confirm sign in bill")
show_company_stamp_po = fields.Boolean(
config_parameter='digital_signature.show_company_stamp_po',
help="Enable to confirm stamp in purchase order")
show_company_stamp_inventory = fields.Boolean(
config_parameter='digital_signature.show_company_stamp_inventory',
help="Enable to confirm stamp in inventory")
show_company_stamp_invoice = fields.Boolean(
config_parameter='digital_signature.show_company_stamp_invoice',
help="Enable to confirm stamp in invoice")
show_company_stamp_bill = fields.Boolean(
config_parameter='digital_signature.show_company_stamp_bill',
help="Enable to confirm stamp in bill")
company_stamp_applicable = fields.Selection([
('picking_stamp', 'Picking Operations'),
('delivery_stamp', 'Delivery Slip'), ('both_stamp', 'Both'),
], string="Company Stamp Applicable",
default="picking_stamp",
config_parameter='digital_signature.company_stamp_applicable',
help="Options to whether the feature have to available"
)
company_stamp_applicable_invoicing = fields.Selection([
('customer_invoice', 'Customer Invoice'),
('vendor_bill', 'Vendor Bill'), ('both', 'Both'),
], string="Company Stamp Applicable",
default="customer_invoice",
config_parameter='digital_signature.company_stamp_applicable_invoicing',
help="Options to whether the feature have to available")

117
digital_signature/models/stock_picking.py

@ -0,0 +1,117 @@
# -*- coding: utf-8 -*-
#############################################################################
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
from odoo.exceptions import UserError
class StockPicking(models.Model):
"""Inherited the stock picking for showing the digital signature
and company stamp in both report of picking operations and delivery slip"""
_inherit = "stock.picking"
def _default_show_sign(self):
""" Returns the value of digital sign from inventory setting"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_digital_sign_inventory')
def _default_enable_option(self):
"""Returns the value of enable options from inventory setting"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.enable_options_inventory')
def _default_show_stamp(self):
"""Returns the value of company stampfrom inventory setting"""
return self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.show_company_stamp_inventory')
digital_sign = fields.Binary(string='Signature',
help="Signature of inventory "
"management person")
sign_by = fields.Char(string='Signed By',
help="Name of signed person")
designation = fields.Char(string='Designation',
help="Designation for signed person")
sign_on = fields.Datetime(string='Signed On', help="Date of sign")
show_sign = fields.Boolean(default=_default_show_sign,
compute='_compute_show_sign',
help="Field to get the value in setting to "
"current model")
enable_option = fields.Boolean(default=_default_enable_option,
compute='_compute_enable_option',
help="Field to get the value in setting to "
"current model")
sign_applicable = fields.Selection([
('picking_operations', 'Picking Operations'),
('delivery', 'Delivery Slip'),
('both', 'Both'),
], string="Sign Applicable inside", compute='_compute_sign_applicable',
help="Field to get the value in setting to current model")
stamp_applicable = fields.Selection([
('picking_stamp', 'Picking Operations'),
('delivery_stamp', 'Delivery Slip'),
('both_stamp', 'Both')], string="stamp",
compute='_compute_stamp_applicable')
show_stamp = fields.Boolean(default=_default_show_stamp,
compute='_compute_show_stamp',
help="Field to get the value in setting "
"to current model")
def _compute_show_sign(self):
"""Function to compute the value of digital signature"""
for record in self:
record.show_sign = self._default_show_sign()
def _compute_enable_option(self):
"""Function to compute the value of enable options from the
inventory setting"""
for record in self:
record.enable_option = self._default_enable_option()
def _compute_sign_applicable(self):
"""Function to compute the value, which report has applied
the signature"""
for rec in self:
rec.sign_applicable = self.env['ir.config_parameter'].sudo(). \
get_param(
'digital_signature.sign_applicable')
def _compute_stamp_applicable(self):
"""Function to compute the value which report has applied
the signature"""
for rec in self:
rec.stamp_applicable = self.env['ir.config_parameter'].sudo(). \
get_param(
'digital_signature.company_stamp_applicable')
def _compute_show_stamp(self):
"""Function to compute the value which report has applied the stamp"""
for stamp in self:
stamp.show_stamp = self._default_show_stamp()
def button_validate(self):
""" Function to validate the signature is missing or not"""
res = super(StockPicking, self).button_validate()
if self.env['ir.config_parameter'].sudo().get_param(
'digital_signature.confirm_sign_inventory') and \
self.digital_sign is False:
raise UserError('Signature is missing')
return res

0
digital_signature/static/description/assets/icons/check.png

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

0
digital_signature/static/description/assets/icons/chevron.png

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

0
digital_signature/static/description/assets/icons/cogs.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
digital_signature/static/description/assets/icons/consultation.png

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
digital_signature/static/description/assets/icons/ecom-black.png

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

0
digital_signature/static/description/assets/icons/education-black.png

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 733 B

0
digital_signature/static/description/assets/icons/hotel-black.png

Before

Width:  |  Height:  |  Size: 911 B

After

Width:  |  Height:  |  Size: 911 B

0
digital_signature/static/description/assets/icons/license.png

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
digital_signature/static/description/assets/icons/lifebuoy.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
digital_signature/static/description/assets/icons/manufacturing-black.png

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

0
digital_signature/static/description/assets/icons/pos-black.png

Before

Width:  |  Height:  |  Size: 878 B

After

Width:  |  Height:  |  Size: 878 B

0
digital_signature/static/description/assets/icons/puzzle.png

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 653 B

0
digital_signature/static/description/assets/icons/restaurant-black.png

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 905 B

0
digital_signature/static/description/assets/icons/service-black.png

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 839 B

0
digital_signature/static/description/assets/icons/trading-black.png

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B

0
digital_signature/static/description/assets/icons/training.png

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

0
digital_signature/static/description/assets/icons/update.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
digital_signature/static/description/assets/icons/user.png

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 988 B

0
digital_signature/static/description/assets/icons/wrench.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
digital_signature/static/description/assets/modules/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

BIN
digital_signature/static/description/assets/modules/2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

BIN
digital_signature/static/description/assets/modules/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

BIN
digital_signature/static/description/assets/modules/4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

BIN
digital_signature/static/description/assets/modules/5.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

BIN
digital_signature/static/description/assets/modules/6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
digital_signature/static/description/assets/modules/l1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
digital_signature/static/description/assets/modules/l2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
digital_signature/static/description/assets/modules/l3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
digital_signature/static/description/assets/modules/l4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
digital_signature/static/description/assets/modules/l5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
digital_signature/static/description/assets/modules/l6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
digital_signature/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
digital_signature/static/description/assets/screenshots/10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
digital_signature/static/description/assets/screenshots/11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
digital_signature/static/description/assets/screenshots/12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
digital_signature/static/description/assets/screenshots/13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
digital_signature/static/description/assets/screenshots/14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
digital_signature/static/description/assets/screenshots/15.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
digital_signature/static/description/assets/screenshots/16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

BIN
digital_signature/static/description/assets/screenshots/17.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
digital_signature/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
digital_signature/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
digital_signature/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

BIN
digital_signature/static/description/assets/screenshots/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
digital_signature/static/description/assets/screenshots/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
digital_signature/static/description/assets/screenshots/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
digital_signature/static/description/assets/screenshots/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot11.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

BIN
digital_signature/static/description/assets/screenshots/Screenshot9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

BIN
digital_signature/static/description/assets/screenshots/hero.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 345 KiB

BIN
digital_signature/static/description/banner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 152 KiB

BIN
digital_signature/static/description/icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 22 KiB

680
digital_signature/static/description/index.html

File diff suppressed because it is too large

25
digital_signature/static/src/css/signature_stamp.css

@ -0,0 +1,25 @@
.left{
max-height: 4cm;
max-width: 4cm;
padding-top: 50px;
float:left;
}
.right {
max-height: 4cm;
max-width: 4cm;
padding-top: 50px;
float:right
}
.center {
max-height: 4cm;
max-width: 4cm;
padding-top: 50px;
margin-left: 300px;
}
.center_sign {
max-height: 4cm;
max-width: 6cm;
padding-top: 50px;
margin-left: 400px;
margin-top: -153px;
}

173
digital_signature/views/account_move_templates.xml

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Report template for invoice -->
<template id="account_report_invoice_document_inherit_digital_signature"
inherit_id="account.report_invoice_document">
<xpath expr="//div[@id='qrcode']" position="after">
<div id="signature" class="row justify-content-end">
<t t-if="o.company_id.position == 'left'">
<div>
<t t-if="o.move_type == 'out_invoice' and o.stamp_invoicing =='customer_invoice'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_signature and o.digital_sign" >
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
<t t-if="o.move_type == 'in_invoice' and o.stamp_invoicing =='vendor_bill'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
<t t-if="o.stamp_invoicing =='both'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'right'">
<div>
<t t-if="o.move_type == 'out_invoice' and o.stamp_invoicing =='customer_invoice'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm;
padding-top: 50px;" class="right"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
<p t-field="o.sign_by"
style="padding-top: 100px;margin-left: 650px;"/>
<p t-field="o.sign_on"
style="margin-left: 650px;"/>
<p t-field="o.designation"
style="margin-left: 650px;"/>
</t>
</t>
<t t-if="o.move_type == 'in_invoice' and o.stamp_invoicing =='vendor_bill'">
<t t-if="o.show_stamp_invoice">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm;
padding-top: 50px;" class="right"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
<p t-field="o.sign_by"
style="padding-top: 100px;margin-left: 650px;"/>
<p t-field="o.sign_on"
style="margin-left: 650px;"/>
<p t-field="o.designation"
style="margin-left: 650px;"/>
</t>
</t>
<t t-if="o.stamp_invoicing =='both'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm;
padding-top: 50px;" class="right"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
<p t-field="o.sign_by"
style="padding-top: 100px;margin-left: 650px;"/>
<p t-field="o.sign_on"
style="margin-left: 650px;"/>
<p t-field="o.designation"
style="margin-left: 650px;"/>
</t>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'center'">
<div>
<t t-if="o.move_type == 'out_invoice' and o.stamp_invoicing =='customer_invoice'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
class="center_sign"/>
<p t-field="o.sign_by" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.sign_on" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.designation" style="margin-left: 420px;
margin-top: -10px;"/>
</t>
</t>
<t t-if="o.move_type == 'in_invoice' and o.stamp_invoicing =='vendor_bill'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
class="center_sign"/>
<p t-field="o.sign_by" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.sign_on" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.designation" style="margin-left: 420px;
margin-top: -10px;"/>
</t>
</t>
<t t-if="o.stamp_invoicing =='both'">
<t t-if="o.show_stamp_invoice and o.company_id.stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_signature and o.digital_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
class="center_sign"/>
<p t-field="o.sign_by" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.sign_on" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.designation" style="margin-left: 420px;
margin-top: -10px;"/>
</t>
</t>
</div>
</t>
</div>
</xpath>
</template>
</odoo>

7
digital_signature/views/invoice.xml → digital_signature/views/account_move_views.xml

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<record model="ir.ui.view" id="account_move_inherit"> <!-- Inheriting view account move form -->
<field name="name">account.move.inherit</field> <record id="view_move_form" model="ir.ui.view">
<field name="name">account.move.view.form.inherit.digital.signature
</field>
<field name="model">account.move</field> <field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/> <field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//page[@id='invoice_tab']" position="after"> <xpath expr="//page[@id='invoice_tab']" position="after">
<field name="show_signature" invisible="1"/> <field name="show_signature" invisible="1"/>
<field name="show_sign_bill" invisible="1"/>
<page string="Digital Signature" <page string="Digital Signature"
attrs="{'invisible': ['|', ('show_signature','=',False), attrs="{'invisible': ['|', ('show_signature','=',False),
('move_type', '!=', 'out_invoice')]}"> ('move_type', '!=', 'out_invoice')]}">

31
digital_signature/views/inventory.xml

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="inventory_view_form_inherit" model="ir.ui.view">
<field name="name">inventory.view.form.inherit</field>
<field name="model">stock.picking</field>
<field name="priority" eval="20"/>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_ids_without_package']"
position="after">
<group>
<field name="show_sign" invisible="1"/>
<field name="enable_option" invisible="1"/>
<field name="sign_applicable" invisible="1"/>
<group name="inventory_signature" string="Digital Signature"
attrs="{'invisible': [('show_sign','=',False)]}">
<field name="digital_sign"/>
<field name="sign_by"
attrs="{'invisible': [('enable_option','=',
False)]}"/>
<field name="designation"
attrs="{'invisible': [('enable_option','=',False)]}"/>
<field name="sign_on"
attrs="{'invisible': [('enable_option','=',False)]}"/>
</group>
</group>
</xpath>
</field>
</record>
</odoo>

29
digital_signature/views/invoice_report.xml

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

31
digital_signature/views/purchase_order.xml

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="purchase_order_view_form_inherit" model="ir.ui.view">
<field name="name">purchase.order.view.form.inherit</field>
<field name="model">purchase.order</field>
<field name="priority" eval="20"/>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('clearfix')]" position="before">
<group>
<group name="purchase_signature" string="Digital Signature"
attrs="{'invisible': [('show_signature','=',False)]}">
<field name="show_signature" invisible="1"/>
<field name="enable_others" invisible="1"/>
<field name="digital_sign"/>
<field name="sign_by"
attrs="{'invisible': [
('enable_others','=',False)]}"
/>
<field name="designation"
attrs="{'invisible': [
('enable_others','=',False)]}"/>
<field name="sign_on"
attrs="{'invisible': [
('enable_others','=',False)]}"/>
</group>
</group>
</xpath>
</field>
</record>
</odoo>

112
digital_signature/views/purchase_order_templates.xml

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Report template for purchase order report -->
<template
id="purchase_report_purchaseorder_document_inherit_digital_signature"
inherit_id="purchase.report_purchaseorder_document">
<xpath expr="//div[@id='total']" position="after">
<div id="signature" class="row justify-content-end">
<t t-if="o.company_id.position == 'left'">
<div>
<t t-if="o.company_id.stamp and o.show_stamp_po and
o.digital_sign and o.show_signature">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
<t t-elif="o.company_id.stamp and o.show_stamp_po">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-elif="o.digital_sign and o.show_signature">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 50px;"/>
<p t-field="o.sign_by"
style="margin-left:50px;"/>
<p t-field="o.sign_on"
style="margin-left:50px;"/>
<p t-field="o.designation"
style="margin-left:50px;"/>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'right'">
<div>
<t t-if="o.company_id.stamp and o.digital_sign and
o.show_stamp_po and o.show_signature">
<t t-if="o.company_id.stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm;
padding-top: 50px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px; margin-left: 650px;"/>
<p t-field="o.sign_on"
style="margin-left: 650px;"/>
<p t-field="o.designation"
style="margin-left: 650px;"/>
</t>
<t t-elif="o.company_id.stamp and o.show_stamp_po">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<t t-elif="o.digital_sign and o.show_signature">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 8cm;
padding-top: 50px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px;margin-left:700px;"/>
<p t-field="o.sign_on"
style="margin-left: 700px;"/>
<p t-field="o.designation"
style="margin-left: 700px;"/>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'center'">
<div>
<t t-if="o.company_id.stamp and o.digital_sign and
o.show_stamp_po and o.show_signature">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
<img t-att-src="image_data_uri(o.digital_sign)"
class="center_sign"/>
<p t-field="o.sign_by" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.sign_on" style="margin-left: 420px;
margin-top: -10px;"/>
<p t-field="o.designation" style="margin-left: 420px;
margin-top: -10px;"/>
</t>
<t t-elif="o.company_id.stamp and o.show_stamp_po">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-elif="o.digital_sign and o.show_signature">
<img t-att-src="image_data_uri(o.digital_sign)"
class="center"/>
<p t-field="o.sign_by" style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.sign_on" style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.designation" style="margin-left: 320px;
margin-top: -10px;"/>
</t>
</div>
</t>
</div>
</xpath>
</template>
</odoo>

33
digital_signature/views/purchase_order_views.xml

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inheriting view for purchase order form -->
<record id="purchase_order_form" model="ir.ui.view">
<field name="name">purchase.order.view.form.inherit.digital.signature
</field>
<field name="model">purchase.order</field>
<field name="priority" eval="20"/>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('clearfix')]" position="before">
<group>
<group name="purchase_signature" string="Digital Signature"
attrs="{'invisible': [('show_signature','=',False)]}">
<field name="show_signature" invisible="1"/>
<field name="enable_sign" invisible="1"/>
<field name="digital_sign"/>
<field name="sign_by"
attrs="{'invisible': [
('enable_sign','=',False)]}"
/>
<field name="designation"
attrs="{'invisible': [
('enable_sign','=',False)]}"/>
<field name="sign_on"
attrs="{'invisible': [
('enable_sign','=',False)]}"/>
</group>
</group>
</xpath>
</field>
</record>
</odoo>

28
digital_signature/views/purchase_report_inherit.xml

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Inheriting from 'purchase.report_purchaseorder_document'. -->
<template id="purchase_report_inherit" inherit_id="purchase.report_purchaseorder_document">
<xpath expr="//div[@id='total']" position="after">
<div id="signature" class="row justify-content-end">
<div class="col-4">
<table class="table table-sm">
<!-- Check if 'digital_sign' exists before proceeding. -->
<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)"
style="max-height: 4cm; max-width: 8cm; padding-top: 50px;"/>
</div>
<tr>
<td class="text-right" style="border: 1px solid white; background:none;">
<!-- Display 'sign_by', 'sign_on', and 'designation' fields if they exist. -->
<p t-if="o.sign_by" t-field="o.sign_by"/>
<p t-if="o.sign_on" t-field="o.sign_on"/>
<p t-if="o.designation" t-field="o.designation"/>
</td>
</tr>
</table>
</div>
</div>
</xpath>
</template>
</odoo>

20
digital_signature/views/res_company_views.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Inheriting view for res company form -->
<record id="view_company_form" model="ir.ui.view">
<field name="name">res.company.view.form.inherit.digital_signature
</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='general_info']" position="after">
<page name="stamp" string="Stamp">
<group>
<field name="stamp" widget="image"/>
<field name="position"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>

215
digital_signature/views/res_config_settings.xml

@ -1,215 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form_purchase_inherit"
model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.purchase</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="10"/>
<field name="inherit_id"
ref="purchase.res_config_settings_view_form_purchase" />
<field name="arch" type="xml">
<xpath expr="//div[@data-key='purchase']/div[
@name='matrix_setting_container']"
position="after">
<h2>Digital Signature</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_po"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_po"
string="Show Digital Sign
in Purchase Orders?"/>
<div class="text-muted">
Show digital sign inside purchase orders
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_po', '==', False)]}">
<div class="o_setting_left_pane">
<field name="enable_options_po"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_options_po"
string="Enable Other Sign Options"/>
<div class="text-muted">
Enable Other Sign Option
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_po', '==', False)]}">
<div class="o_setting_left_pane">
<field name="confirm_sign_po"/>
</div>
<div class="o_setting_right_pane">
<label for="confirm_sign_po"
string="Check Sign
before confirmation"/>
<div class="text-muted">
Check Sign before confirmation
purchase Order
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="res_config_settings_view_form_stock_inherit" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.stock</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="stock.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@data-key='stock']/div[
@name='warehouse_setting_container']" position="after">
<h2>Digital Signature</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_inventory"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_inventory"
string="Show Digital Sign in Inventory?"/>
<div class="text-muted">
Show digital sign inside inventory
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_inventory', '==', False)]}">
<div class="o_setting_left_pane">
<field name="enable_options_inventory"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_options_inventory"
string="Enable Other Sign Options"/>
<div class="text-muted">
Enable Other Sign Option
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
id="show_sign_in_inventory"
attrs="{'invisible': [
('show_digital_sign_inventory', '==', False)]}">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<label for="sign_applicable"/>
<div class="text-muted">
Show digital sign inside delivery slip,
inventory options or both
</div>
<div class="content-group">
<div class="mt16">
<field name="sign_applicable"
class="o_light_label"
widget="radio"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_inventory', '==', False)]}">
<div class="o_setting_left_pane">
<field name="confirm_sign_inventory"/>
</div>
<div class="o_setting_right_pane">
<label for="confirm_sign_inventory"
string="Check Sign before confirmation"/>
<div class="text-muted">
Check Sign before confirmation
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="res_config_settings_view_form_invoice_inherit"
model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.invoice</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='account']/div[
@id='print_vendor_checks_setting_container']" position="after">
<h2>Digital Signature</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_invoice"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_invoice"
string="Show Digital Sign in
Customer Invoice?"/>
<div class="text-muted">
Show digital sign inside customer invoice
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_invoice', '==', False),
('show_digital_sign_bill', '==', False)]}">
<div class="o_setting_left_pane">
<field name="enable_options_invoice"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_options_invoice"
string="Enable Other Sign Options"/>
<div class="text-muted">
Enable Other Sign Option
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_invoice', '==', False),
('show_digital_sign_bill', '==', False)]}">
<div class="o_setting_left_pane">
<field name="confirm_sign_invoice"/>
</div>
<div class="o_setting_right_pane">
<label for="confirm_sign_invoice"
string="Check Sign before confirmation"/>
<div class="text-muted">
Check Sign before confirmation
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_bill"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_bill"
string="Show Digital Sign in Vendor Bill?"/>
<div class="text-muted">
Show digital sign inside vendor bill
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

313
digital_signature/views/res_config_settings_views.xml

@ -0,0 +1,313 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inheriting view for purchase order settings -->
<record id="res_config_settings_view_form_purchase"
model="ir.ui.view">
<field name="name">
res.config.settings.view.form.inherit.digital.signature
</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="10"/>
<field name="inherit_id"
ref="purchase.res_config_settings_view_form_purchase"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='purchase']/div[
@name='matrix_setting_container']"
position="after">
<h2>Digital Signature</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_po"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_po"
string="Show Digital Sign
in Purchase Orders?"/>
<div class="text-muted">
Enable to show digital sign inside purchase orders
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_po', '==', False)]}">
<div class="o_setting_left_pane">
<field name="enable_options_po"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_options_po"
string="Other Sign Options"/>
<div class="text-muted">
Enable to show other sign option
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_po', '==', False)]}">
<div class="o_setting_left_pane">
<field name="confirm_sign_po"/>
</div>
<div class="o_setting_right_pane">
<label for="confirm_sign_po"
string="Check Sign
Before Confirmation"/>
<div class="text-muted">
Check Sign Before Confirmation
Purchase Order
</div>
</div>
</div>
</div>
</xpath>
<xpath expr="//div[@data-key='purchase']/div[
@name='matrix_setting_container']" position="after">
<h2>Company Stamp</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_company_stamp_po"/>
</div>
<div class="o_setting_right_pane">
<label for="show_company_stamp_po"
string="Show Company Stamp
in Purchase Orders?"/>
<div class="text-muted">
Enable to show company stamp inside purchase orders
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<!--Inheriting view for inventory setting form -->
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">
res.config.settings.view.form.inherit.digital.signature
</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="stock.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='stock']/div[
@name='warehouse_setting_container']" position="after">
<h2>Digital Signature</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_inventory"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_inventory"
string="Show Digital Sign in Inventory?"/>
<div class="text-muted">
Enable to show digital signature inside inventory
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_inventory', '==', False)]}">
<div class="o_setting_left_pane">
<field name="enable_options_inventory"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_options_inventory"
string="Other Sign Options"/>
<div class="text-muted">
Enable to get Other Sign Option
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
id="show_sign_in_inventory"
attrs="{'invisible': [
('show_digital_sign_inventory', '==', False)]}">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<label for="sign_applicable"/>
<div class="text-muted">
Enable to show digital sign inside delivery slip,
inventory options or both
</div>
<div class="content-group">
<div class="mt16">
<field name="sign_applicable"
class="o_light_label"
widget="radio"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_inventory', '==', False)]}">
<div class="o_setting_left_pane">
<field name="confirm_sign_inventory"/>
</div>
<div class="o_setting_right_pane">
<label for="confirm_sign_inventory"
string="Check Sign Before Confirmation"/>
<div class="text-muted">
Enable to Check Sign Before Confirmation
</div>
</div>
</div>
</div>
</xpath>
<xpath expr="//div[@data-key='stock']/div[
@name='warehouse_setting_container']" position="after">
<h2>Company Stamp</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_company_stamp_inventory"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_inventory"
string="Show Company Stamp in Inventory?"/>
<div class="text-muted">
Enable to show company stamp inside inventory
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
id="show_company_stamp_inventory"
attrs="{'invisible': [
('show_company_stamp_inventory', '==', False)]}">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<label for="company_stamp_applicable"/>
<div class="text-muted">
Enable to show company stamp inside delivery slip,
inventory options or both
</div>
<div class="content-group">
<div class="mt16">
<field name="company_stamp_applicable"
class="o_light_label"
widget="radio"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<!-- View for account move settings form -->
<record id="res_config_settings_view_form_account"
model="ir.ui.view">
<field name="name">
res.config.settings.view.form.inherit.digital.signature
</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='account']/div[
@id='print_vendor_checks_setting_container']" position="after">
<h2>Digital Signature</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_invoice"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_invoice"
string="Show Digital Sign in
Customer Invoice?"/>
<div class="text-muted">
Enable to show digital sign inside customer invoice
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_invoice', '==', False),
('show_digital_sign_bill', '==', False)]}">
<div class="o_setting_left_pane">
<field name="enable_options_invoice"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_options_invoice"
string="Other Sign Options"/>
<div class="text-muted">
Enable to Get Other Sign Option
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
attrs="{'invisible': [
('show_digital_sign_invoice', '==', False),
('show_digital_sign_bill', '==', False)]}">
<div class="o_setting_left_pane">
<field name="confirm_sign_invoice"/>
</div>
<div class="o_setting_right_pane">
<label for="confirm_sign_invoice"
string="Check Sign Before Confirmation"/>
<div class="text-muted">
Enable to Check Sign Before Confirmation
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_digital_sign_bill"/>
</div>
<div class="o_setting_right_pane">
<label for="show_digital_sign_bill"
string="Show Digital Sign in Vendor Bill?"/>
<div class="text-muted">
Enable to show digital sign inside vendor bill
</div>
</div>
</div>
</div>
</xpath>
<xpath expr="//div[@data-key='account']/div[
@id='print_vendor_checks_setting_container']" position="after">
<h2>Company stamp</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_company_stamp_invoice"/>
</div>
<div class="o_setting_right_pane">
<label for="show_company_stamp_invoice"
string="Show Company Stamp in Invoicing?"/>
<div class="text-muted">
Enable to show company stamp inside invoicing
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
id="show_company_stamp_inventory"
attrs="{'invisible': [
('show_company_stamp_invoice', '==', False)]}">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<label for="company_stamp_applicable"/>
<div class="text-muted">
Enable to show company stamp inside customer invoice,
vendor bill
or both
</div>
<div class="content-group">
<div class="mt16">
<field name="company_stamp_applicable_invoicing"
class="o_light_label"
widget="radio"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

60
digital_signature/views/stock_picking_report.xml

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Inheriting from 'stock.report_picking'. -->
<template id="stock_picking_report_inherit" inherit_id="stock.report_picking">
<xpath expr="//table" position="after">
<div id="signature" class="row justify-content-end">
<!-- Check if 'sign_applicable' is 'picking_operations' or 'both' for displaying the signature. -->
<t t-if="o.sign_applicable == 'picking_operations' or o.sign_applicable == 'both">
<div class="col-4">
<table class="table table-sm">
<!-- Check if 'digital_sign' exists before proceeding. -->
<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)"
style="max-height: 4cm; max-width: 8cm; padding-top: 50px;"/>
</div>
<tr>
<td class="text-right" style="border: 1px solid white; background:none;">
<!-- Display 'sign_by', 'sign_on', and 'designation' fields if they exist. -->
<p t-if="o.sign_by" t-field="o.sign_by"/>
<p t-if="o.sign_on" t-field="o.sign_on"/>
<p t-if="o.designation" t-field="o.designation"/>
</td>
</tr>
</table>
</div>
</t>
</div>
</xpath>
</template>
<!-- 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">
<div id="signature" class="row justify-content-end">
<!-- Check if 'sign_applicable' is 'delivery' or 'both' for displaying the signature. -->
<t t-if="o.sign_applicable == 'delivery' or o.sign_applicable == 'both'">
<div class="col-4">
<table class="table table-sm">
<!-- Check if 'digital_sign' exists before proceeding. -->
<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)"
style="max-height: 4cm; max-width: 8cm; padding-top: 50px;"/>
</div>
<tr>
<td class="text-right" style="border: 1px solid white; background:none;">
<!-- Display 'sign_by', 'sign_on', and 'designation' fields if they exist. -->
<p t-if="o.sign_by" t-field="o.sign_by"/>
<p t-if="o.sign_on" t-field="o.sign_on"/>
<p t-if="o.designation" t-field="o.designation"/>
</td>
</tr>
</table>
</div>
</t>
</div>
</xpath>
</template>
</odoo>

416
digital_signature/views/stock_picking_templates.xml

@ -0,0 +1,416 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Report template for picking operation -->
<template id="stock_report_picking_inherit_digital_signature"
inherit_id="stock.report_picking">
<xpath expr="//table" position="after">
<div id="signature" class="row justify-content-end">
<t t-if="o.company_id.position == 'left'">
<div>
<t t-if="o.company_id.stamp and
o.stamp_applicable == 'picking_stamp'
and o.sign_applicable == 'picking_operations'
and o.digital_sign and o.show_sign and o.show_stamp or
o.sign_applicable=='both' and o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
<t t-elif="o.company_id.stamp and
o.stamp_applicable == 'picking_stamp' and
o.show_stamp or o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
<t t-elif="o.digital_sign and
o.sign_applicable == 'picking_operations' and o.show_sign
or o.sign_applicable == 'both' and o.digital_sign ">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'right'">
<div>
<t t-if="o.company_id.stamp and
o.stamp_applicable == 'picking_stamp' and
o.sign_applicable == 'picking_operations' and
o.digital_sign and o.show_sign and o.show_stamp or
o.sign_applicable=='both' and
o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px;margin-left: 550px;"/>
<p t-field="o.sign_on"
style="margin-left: 550px;"/>
<p t-field="o.designation"
style="margin-left: 550px;"/>
</t>
</t>
<t t-elif="o.company_id.stamp and
o.stamp_applicable == 'picking_stamp' and
o.show_stamp or o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px;margin-left: 550px;"/>
<p t-field="o.sign_on"
style="margin-left: 550px;"/>
<p t-field="o.designation"
style="margin-left: 550px;"/>
</t>
</t>
<t t-elif="o.digital_sign and
o.sign_applicable == 'picking_operations' and
o.show_sign or o.sign_applicable == 'both'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px;margin-left: 550px;"/>
<p t-field="o.sign_on"
style="margin-left: 550px;"/>
<p t-field="o.designation"
style="margin-left: 550px;"/>
</t>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'center'">
<div>
<t t-if="o.company_id.stamp and
o.stamp_applicable == 'picking_stamp' and
o.sign_applicable == 'picking_operations' and
o.digital_sign and o.show_sign and o.show_stamp or
o.sign_applicable=='both' and
o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 50px;" class="center"/>
<p t-field="o.sign_by"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.sign_on"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.designation"
style="margin-left: 320px;
margin-top: -10px;"/>
</t>
</t>
<t t-elif="o.company_id.stamp and
o.stamp_applicable == 'picking_stamp' and
o.show_stamp or o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 50px;" class="center"/>
<p t-field="o.sign_by"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.sign_on"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.designation"
style="margin-left: 320px;
margin-top: -10px;"/>
</t>
</t>
<t t-elif="o.digital_sign and
o.sign_applicable == 'picking_operations' and
o.show_sign or o.sign_applicable== 'both' ">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 50px;" class="center"/>
<p t-field="o.sign_by"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.sign_on"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.designation"
style="margin-left: 320px;
margin-top: -10px;"/>
</t>
</t>
</div>
</t>
</div>
</xpath>
</template>
<!-- Report template for delivery slip-->
<template id="stock_report_delivery_document_inherit_digital_signature"
inherit_id="stock.report_delivery_document">
<xpath expr="//div[@name='signature']" position="before">
<div id="signature" class="row justify-content-end">
<t t-if="o.company_id.position == 'left'">
<div>
<t t-if="o.company_id.stamp and
o.stamp_applicable == 'delivery_stamp' and
o.digital_sign and o.show_sign and
o.sign_applicable == 'delivery' or
o.sign_applicable=='both' and o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
<t t-elif="o.company_id.stamp and
o.stamp_applicable == 'delivery_stamp' and
o.show_stamp or o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
<t t-elif="o.digital_sign and o.sign_applicable == 'delivery'
and o.show_sign or o.sign_applicable == 'both'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="left"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;"/>
<p t-field="o.sign_by"
style="margin-left:160px;"/>
<p t-field="o.sign_on"
style="margin-left:160px;"/>
<p t-field="o.designation"
style="margin-left:160px;"/>
</t>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'right'">
<div>
<t t-if="o.company_id.stamp and
o.stamp_applicable == 'delivery_stamp' and o.digital_sign
and o.show_sign and o.sign_applicable == 'delivery' and
o.show_stamp or o.sign_applicable=='both' and
o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px;margin-left: 550px;"/>
<p t-field="o.sign_on"
style="margin-left: 550px;"/>
<p t-field="o.designation"
style="margin-left: 550px;"/>
</t>
</t>
<t t-elif="o.company_id.stamp and
o.stamp_applicable == 'delivery_stamp' and
o.show_stamp or o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px;margin-left: 550px;"/>
<p t-field="o.sign_on"
style="margin-left: 550px;"/>
<p t-field="o.designation"
style="margin-left: 550px;"/>
</t>
</t>
<t t-elif="o.digital_sign and
o.sign_applicable == 'delivery' and
o.show_sign or o.sign_applicable == 'both'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="right"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 60px;" class="right"/>
<p t-field="o.sign_by"
style="padding-top: 150px;margin-left: 550px;"/>
<p t-field="o.sign_on"
style="margin-left: 550px;"/>
<p t-field="o.designation"
style="margin-left: 550px;"/>
</t>
</t>
</div>
</t>
<t t-if="o.company_id.position == 'center'">
<div>
<t t-if="o.company_id.stamp and
o.stamp_applicable == 'delivery_stamp' and
o.digital_sign and o.show_sign and
o.sign_applicable == 'delivery' and o.show_stamp or
o.sign_applicable=='both' and
o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 50px;" class="center"/>
<p t-field="o.sign_by"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.sign_on"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.designation"
style="margin-left: 320px;
margin-top: -10px;"/>
</t>
</t>
<t t-elif="o.company_id.stamp and
o.stamp_applicable == 'delivery_stamp' and
o.show_stamp or o.stamp_applicable == 'both_stamp'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 50px;" class="center"/>
<p t-field="o.sign_by"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.sign_on"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.designation"
style="margin-left: 320px;
margin-top: -10px;"/>
</t>
</t>
<t t-elif="o.digital_sign and o.sign_applicable == 'delivery'
and o.show_sign or o.sign_applicable == 'both'">
<t t-if="o.show_stamp">
<img t-att-src="image_data_uri(o.company_id.stamp)"
class="center"/>
</t>
<t t-if="o.show_sign">
<img t-att-src="image_data_uri(o.digital_sign)"
style="max-height: 4cm; max-width: 6cm;
padding-top: 50px;" class="center"/>
<p t-field="o.sign_by"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.sign_on"
style="margin-left: 320px;
margin-top: -10px;"/>
<p t-field="o.designation"
style="margin-left: 320px;
margin-top: -10px;"/>
</t>
</t>
</div>
</t>
</div>
</xpath>
</template>
</odoo>

32
digital_signature/views/stock_picking_views.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inheriting view for stock picking form -->
<record id="view_picking_form" model="ir.ui.view">
<field name="name">stock.picking.view.form.inherit.digital.signature
</field>
<field name="model">stock.picking</field>
<field name="priority" eval="20"/>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_ids_without_package']"
position="after">
<group>
<field name="show_sign" invisible="1"/>
<field name="enable_option" invisible="1"/>
<field name="sign_applicable" invisible="1"/>
<group name="inventory_signature" string="Digital Signature"
attrs="{'invisible': [('show_sign','=',False)]}">
<field name="digital_sign"/>
<field name="sign_by"
attrs="{'invisible': [('enable_option','=',
False)]}"/>
<field name="designation"
attrs="{'invisible': [('enable_option','=',False)]}"/>
<field name="sign_on"
attrs="{'invisible': [('enable_option','=',False)]}"/>
</group>
</group>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save