diff --git a/docusign_odoo_connector/README.rst b/docusign_odoo_connector/README.rst new file mode 100755 index 000000000..e0bcc4658 --- /dev/null +++ b/docusign_odoo_connector/README.rst @@ -0,0 +1,40 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Docusign Odoo Connector +====================== +Integrating Docusign application with odoo + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V15) Albin, + (V16)Akhil Ashok, + (V17)Akhil Ashok, + Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/docusign_odoo_connector/__init__.py b/docusign_odoo_connector/__init__.py new file mode 100644 index 000000000..899fbad16 --- /dev/null +++ b/docusign_odoo_connector/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil @ cybrosys,(odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from . import models, wizard diff --git a/docusign_odoo_connector/__manifest__.py b/docusign_odoo_connector/__manifest__.py new file mode 100644 index 000000000..9d6aa3a77 --- /dev/null +++ b/docusign_odoo_connector/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil @ cybrosys,(odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +{ + 'name': 'Docusign Odoo Connector', + 'version': '17.0.1.0.0', + 'summary': 'Integrating Docusign application with odoo', + 'description': """This module allows the odoo users Integration with DocuSign. + We email the sales order to the customer for signature.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'http://www.cybrosys.com', + 'depends': ['base', 'sale_management'], + 'data': [ + 'security/ir.model.access.csv', + 'views/docusign_credentials_views.xml', + 'views/sale_order_views.xml', + 'wizard/send_document_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'docusign_odoo_connector/static/src/js/edit_document.js', + 'docusign_odoo_connector/static/src/xml/pdf_viewer_field.xml', + ], + }, + 'external_dependencies': { + 'python': ['docusign-esign'] + }, + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'auto_install': False +} diff --git a/docusign_odoo_connector/doc/RELEASE_NOTES.md b/docusign_odoo_connector/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..188fe5f2c --- /dev/null +++ b/docusign_odoo_connector/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 02.07.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Docusign Odoo Connector diff --git a/docusign_odoo_connector/models/__init__.py b/docusign_odoo_connector/models/__init__.py new file mode 100644 index 000000000..18190a5a5 --- /dev/null +++ b/docusign_odoo_connector/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil @ cybrosys,(odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from . import docusign +from . import docusign_credentials +from . import edit_document +from . import sale_order diff --git a/docusign_odoo_connector/models/docusign.py b/docusign_odoo_connector/models/docusign.py new file mode 100644 index 000000000..95a49e2b4 --- /dev/null +++ b/docusign_odoo_connector/models/docusign.py @@ -0,0 +1,224 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil @ cybrosys,(odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +import base64 +import os +import requests +from docusign_esign import ApiClient, ApiException, EnvelopeDefinition, \ + Document, Recipients +from docusign_esign import EnvelopesApi +from datetime import datetime, timedelta +from odoo.exceptions import UserError, ValidationError + +root_path = '.' + + +def action_login_docusign(user_id, account_id, integratorKey, privatekey): + """ + Logs in to DocuSign using JWT authentication with the provided credentials + and retrieves the status code of a GET request to fetch brands under the + specified account. + """ + api_client = ApiClient() + api_client.host = 'https://demo.docusign.net/restapi' + + SCOPES = ["signature"] + private_key = base64.b64decode(privatekey.datas) + try: + access_token = api_client.request_jwt_user_token( + client_id=integratorKey, + user_id=user_id, + oauth_host_name="account-d.docusign.com", + private_key_bytes=private_key, + expires_in=3600, + scopes=SCOPES + ) + api_client.set_default_header(header_name="Authorization", + header_value=f"Bearer {access_token.access_token}") + envelope_api = EnvelopesApi(api_client) + + from_date = (datetime.utcnow() - timedelta(days=30)).isoformat() + envelope_api.list_status_changes( + account_id=account_id, + from_date=from_date) + headers = {'Authorization': f"Bearer {access_token.access_token}", + 'Accept': 'application/json'} + url = 'https://account-d.docusign.com/restapi/v2.1/accounts/' + account_id + '/brands' + response = requests.get(url=url, headers=headers) + status = response.status_code + return status + except ApiException as err: + raise UserError(err) + + +def action_send_docusign_file(user_id, account_id, integratorKey, privatekey, + filename, + fileContents, receiver_name, receiver_email, + tabs1): + """ + Sends a document for signature via DocuSign. + """ + signers_list = [] + for i in range(0, len(receiver_email)): + a = tabs1[i]['signHereTabs'] + for d in a: + d['yPosition'] -= 30 + signer = {'email': receiver_email[i], 'name': receiver_name[i], + 'recipientId': i + 1, 'tabs': tabs1[i]} + signers_list.append(signer) + api_client = ApiClient() + envelope_api = EnvelopesApi(api_client) + + base64_file_content = fileContents.decode('ascii') + + # Create the document model + document = Document( # create the DocuSign document object + document_base64=base64_file_content, + name=filename, # can be different from actual file name + file_extension='pdf', # many different document types are accepted + document_id=1 # a label used to reference the doc + ) + + envelope_definition = EnvelopeDefinition( + email_subject="Please sign this document", + documents=[document], + # The Recipients object wants arrays for each recipient type + recipients=Recipients(signers=signers_list), + status="sent") + api_client.host = 'https://demo.docusign.net/restapi' + SCOPES = ["signature"] + + private_key = base64.b64decode(privatekey.datas) + try: + access_token = api_client.request_jwt_user_token( + client_id=integratorKey, + user_id=user_id, + oauth_host_name="account-d.docusign.com", + private_key_bytes=private_key, + expires_in=3600, + scopes=SCOPES + ) + api_client.set_default_header(header_name="Authorization", + header_value=f"Bearer {access_token.access_token}") + response = envelope_api.create_envelope( + account_id=account_id, + envelope_definition=envelope_definition) + return response + # append "/envelopes" to the baseUrl and use in the request + except ApiException as err: + raise UserError(err) + + +def download_documents(integratorKey, envelopeId, privatekey, user_id, account_id): + """ + Downloads the completed document from DocuSign. + """ + doc_status = get_status(integratorKey, envelopeId, privatekey, user_id, account_id) + complete_path = '' + + if doc_status != 'completed': + return doc_status, complete_path + + api_client = ApiClient() + envelope_api = EnvelopesApi(api_client) + api_client.host = 'https://demo.docusign.net/restapi' + SCOPES = ["signature"] + + private_key = base64.b64decode(privatekey.datas) + + try: + access_token = api_client.request_jwt_user_token( + client_id=integratorKey, + user_id=user_id, + oauth_host_name="account-d.docusign.com", + private_key_bytes=private_key, + expires_in=3600, + scopes=SCOPES + ) + api_client.set_default_header(header_name="Authorization", + header_value=f"Bearer {access_token.access_token}") + + # Get the document list from the envelope + documents = envelope_api.list_documents( + account_id=account_id, + envelope_id=envelopeId + ) + + # Get the actual document binary content + document_binary = envelope_api.get_document( + account_id=account_id, + document_id='1', # usually the document ID is '1' for the main signed doc + envelope_id=envelopeId + ) + + # Prepare save path + directory_path = os.path.join(root_path, "files") + if not os.path.isdir(directory_path): + try: + os.mkdir(directory_path) + except Exception: + raise ValidationError("Please provide access rights to create files in this module.") + + attach_file_name = documents.envelope_documents[0].name or 'signed_document.pdf' + file_path = os.path.join("files", attach_file_name) + complete_path = os.path.join(root_path, file_path) + + # Save the binary content to disk + with open(complete_path, "wb") as f: + f.write(document_binary) + + return doc_status, complete_path + + except ApiException as err: + raise UserError(f"DocuSign API Error: {err}") + except Exception as ex: + raise UserError(f"Unexpected Error: {ex}") + + +def get_status(integratorKey, envelopeId, privatekey, user_id, account_id): + """ + Retrieve the status of a DocuSign envelope recipient. + """ + # Get Envelope Recipient Status + # append "/envelopes/" + envelopeId + "/recipients" to baseUrl and use in the request + api_client = ApiClient() + envelope_api = EnvelopesApi(api_client) + api_client.host = 'https://demo.docusign.net/restapi' + SCOPES = ["signature"] + + private_key = base64.b64decode(privatekey.datas) + try: + access_token = api_client.request_jwt_user_token( + client_id=integratorKey, + user_id=user_id, + oauth_host_name="account-d.docusign.com", + private_key_bytes=private_key, + expires_in=3600, + scopes=SCOPES + ) + api_client.set_default_header(header_name="Authorization", + header_value=f"Bearer {access_token.access_token}") + + results = envelope_api.get_envelope( + account_id, envelopeId) + return results.status + except ApiException as err: + raise UserError(err) diff --git a/docusign_odoo_connector/models/docusign_credentials.py b/docusign_odoo_connector/models/docusign_credentials.py new file mode 100644 index 000000000..864a484ea --- /dev/null +++ b/docusign_odoo_connector/models/docusign_credentials.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil @ cybrosys,(odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from . import docusign +from odoo import models, fields +from odoo.exceptions import UserError + + +class DocusignCredentials(models.Model): + """ To set up the Docusign account credentials for integrating with odoo""" + _name = 'docusign.credentials' + _description = "Docusign Credentials Setup" + + name = fields.Char(string="Name", required=True, help="Name of record") + integrator_key = fields.Char(string="Docusign Integrator Key", + required=True, help="Docusign Integrator key") + account_id_data = fields.Char(string='Docusign Account Id', required=True, + help="Docusign user account ID") + user_id_data = fields.Char(string='Docusign User Id', required=True, + help="Docusign user ID") + private_key_ids = fields.Many2many('ir.attachment', + string='Private Key File', + required=True, + help="Private key attachment") + company_id = fields.Many2one('res.company', string="Operator", + default=lambda self: self.env.user.company_id, + help="company ID", + context={'user_preference': True}) + + def action_test_credentials(self): + """ Function to test whether the credentials are valid or not""" + status = docusign.action_login_docusign(self.user_id_data, + self.account_id_data, + self.integrator_key, + self.private_key_ids) + if status != 200: + raise UserError("Connection Failed!") + else: + message = "Connection Successful !" + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'message': message, + 'type': 'success', + 'sticky': False, + } + } diff --git a/docusign_odoo_connector/models/edit_document.py b/docusign_odoo_connector/models/edit_document.py new file mode 100644 index 000000000..63a6b07c0 --- /dev/null +++ b/docusign_odoo_connector/models/edit_document.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil @ cybrosys,(odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from odoo.fields import Field + + +class JSON(Field): + """ Encapsulates an :class:`int`. """ + type = 'json' + + column_type = ('jsonb', 'jsonb') + + def convert_to_column(self, value, record, values=None, validate=True): + """ + Convert a value to its column form for database storage or usage. + """ + + return str(value) or "" + + def convert_to_record(self, value, record): + """ + Convert a value to its record form for storing or using in record + operations. + """ + return value or {} + + def convert_to_read(self, value, record, use_name_get=True): + """ + Convert a value to its readable form for displaying or using in read + operations. + """ + # Integer values greater than 2^31-1 are not supported in pure XMLRPC, + # so we have to pass them as floats :-( + return value + + def _update(self, records, value): + """ + Update records with a given value. + """ + # special case, when an integer field is used as inverse for a one2many + cache = records.env.cache + for record in records: + cache.set(record, self, value.id or 0) + + def convert_to_export(self, value, record): + """ + Convert a value to its exportable form for a specific record. + """ + if value or value == "": + return value + return '' diff --git a/docusign_odoo_connector/models/sale_order.py b/docusign_odoo_connector/models/sale_order.py new file mode 100644 index 000000000..75c08fd2d --- /dev/null +++ b/docusign_odoo_connector/models/sale_order.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil @ cybrosys,(odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +import base64 +import os +import shutil +from ..models import docusign +from odoo import fields, models, _ +from odoo.exceptions import UserError + + +class SaleOrder(models.Model): + """ Inheriting sale order to add button for sending documents""" + _inherit = 'sale.order' + + docusign_line_ids = fields.One2many('docusign.lines', 'docusign_id', + readonly=True, + help="Details of sent documents") + credentials_id = fields.Many2one("docusign.credentials", + string="Docusign Credential", + help="Choose Credential") + + def action_send_document(self): + """ Function to open the wizard for sending documents """ + view_id = self.env.ref( + 'docusign_odoo_connector.send_document_view_form').id + return { + 'name': _("Send Documents"), + 'view_mode': 'form', + 'view_id': view_id, + 'view_type': 'form', + 'res_model': 'send.document', + 'type': 'ir.actions.act_window', + 'target': 'new', + 'context': { + 'default_email_id': self.partner_id.id, + 'default_res_id': self.id, + } + } + + def action_download_document(self): + """ + This method downloads documents associated with the current object's + DocuSign credentials and attaches them as binary data to the + corresponding record. + """ + if self.credentials_id: + credentials = self.credentials_id + for document in self.docusign_line_ids: + envelope_id = document.envelope_id + if envelope_id: + docu_status, complete_path = docusign.download_documents \ + (credentials.integrator_key, + envelope_id, credentials.private_key_ids, + credentials.user_id_data, + credentials.account_id_data) + if complete_path != '': + path_split = complete_path.rsplit('/', 1) + attach_file_name = path_split[1] + folder_path = path_split[0] + with open(complete_path, "rb") as open_file: + encoded_string = base64.b64encode( + open_file.read()) + values = {'name': attach_file_name, + 'type': 'binary', + 'res_id': self.id, + 'res_model': 'crm.lead', + 'datas': encoded_string, + 'index_content': 'image', + 'store_fname': attach_file_name, + } + attach_id = self.env['ir.attachment'].create(values) + if not document.signed_document: + document.signed_document = attach_id.datas + document.status = docu_status + os.remove(complete_path) + if os.path.exists(folder_path): + shutil.rmtree(folder_path) + self.env.cr.commit() + else: + raise UserError('No agreement documents are sent') + else: + raise UserError('Please select credential') + + +class DocusignLines(models.Model): + """ + Model for storing DocuSign lines for retrieving send data information. + This model stores information related to DocuSign lines, including the reference + to the associated sale order, the recipient to whom the document is sent, and + the status of the document. """ + + _name = 'docusign.lines' + _description = 'Docusign lines for retrieving send data information' + + docusign_id = fields.Many2one('sale.order', string='Docusign Reference', + index=True, + help="Reference to the associated sale order.") + document = fields.Char(string="Reference", help="attached document name") + send_to = fields.Char(string="Send To", help="Mail of receiver") + status = fields.Char(string="Status", help="Status of sent document") + envelope_id = fields.Char(string="Envelope ID", help="Envelope ID") + signed_document = fields.Binary(string="Signed Document", readonly=True, + help="Signed document to download") diff --git a/docusign_odoo_connector/security/ir.model.access.csv b/docusign_odoo_connector/security/ir.model.access.csv new file mode 100644 index 000000000..1ceb6504d --- /dev/null +++ b/docusign_odoo_connector/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_docusign_credentials,access.docusign.credentials,model_docusign_credentials,,1,1,1,1 +access_send_document,access.send.document,model_send_document,,1,1,1,1 +access_docusign_lines,access.docusign.lines,model_docusign_lines,,1,1,1,1 diff --git a/docusign_odoo_connector/static/description/assets/icons/capture (1).png b/docusign_odoo_connector/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/capture (1).png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/check.png b/docusign_odoo_connector/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/check.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/chevron.png b/docusign_odoo_connector/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/chevron.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/cogs.png b/docusign_odoo_connector/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/cogs.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/consultation.png b/docusign_odoo_connector/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/consultation.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/ecom-black.png b/docusign_odoo_connector/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/ecom-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/education-black.png b/docusign_odoo_connector/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/education-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/hotel-black.png b/docusign_odoo_connector/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/hotel-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/img.png b/docusign_odoo_connector/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/img.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/license.png b/docusign_odoo_connector/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/license.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/lifebuoy.png b/docusign_odoo_connector/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/lifebuoy.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/manufacturing-black.png b/docusign_odoo_connector/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/manufacturing-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/photo-capture.png b/docusign_odoo_connector/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/photo-capture.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/pos-black.png b/docusign_odoo_connector/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/pos-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/puzzle.png b/docusign_odoo_connector/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/puzzle.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/restaurant-black.png b/docusign_odoo_connector/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/restaurant-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/service-black.png b/docusign_odoo_connector/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/service-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/trading-black.png b/docusign_odoo_connector/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/trading-black.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/training.png b/docusign_odoo_connector/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/training.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/update.png b/docusign_odoo_connector/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/update.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/user.png b/docusign_odoo_connector/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/user.png differ diff --git a/docusign_odoo_connector/static/description/assets/icons/wrench.png b/docusign_odoo_connector/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/wrench.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/Cybrosys R.png b/docusign_odoo_connector/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/Cybrosys R.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/email.svg b/docusign_odoo_connector/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docusign_odoo_connector/static/description/assets/misc/phone.svg b/docusign_odoo_connector/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/docusign_odoo_connector/static/description/assets/misc/star (1) 2.svg b/docusign_odoo_connector/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docusign_odoo_connector/static/description/assets/misc/support (1) 1.svg b/docusign_odoo_connector/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docusign_odoo_connector/static/description/assets/misc/support-email.svg b/docusign_odoo_connector/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/docusign_odoo_connector/static/description/assets/misc/tick-mark.svg b/docusign_odoo_connector/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/docusign_odoo_connector/static/description/assets/misc/whatsapp 1.svg b/docusign_odoo_connector/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docusign_odoo_connector/static/description/assets/misc/whatsapp.svg b/docusign_odoo_connector/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/docusign_odoo_connector/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docusign_odoo_connector/static/description/assets/modules/1.gif b/docusign_odoo_connector/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/1.gif differ diff --git a/docusign_odoo_connector/static/description/assets/modules/1.png b/docusign_odoo_connector/static/description/assets/modules/1.png new file mode 100644 index 000000000..d0f36b007 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/1.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/2.png b/docusign_odoo_connector/static/description/assets/modules/2.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/2.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/3.png b/docusign_odoo_connector/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/3.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/4.jpg b/docusign_odoo_connector/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/4.jpg differ diff --git a/docusign_odoo_connector/static/description/assets/modules/5.jpg b/docusign_odoo_connector/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/5.jpg differ diff --git a/docusign_odoo_connector/static/description/assets/modules/6.png b/docusign_odoo_connector/static/description/assets/modules/6.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/6.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/l2.png b/docusign_odoo_connector/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/l2.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/l3.png b/docusign_odoo_connector/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/l3.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/l4.png b/docusign_odoo_connector/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/l4.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/l5.png b/docusign_odoo_connector/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/l5.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/l6.png b/docusign_odoo_connector/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/l6.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/1.png b/docusign_odoo_connector/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..a7b7dd383 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/1.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/10.png b/docusign_odoo_connector/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..d84ee0b29 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/10.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/11.png b/docusign_odoo_connector/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..1066cb678 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/11.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/12.png b/docusign_odoo_connector/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..c23fd16af Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/12.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/13.png b/docusign_odoo_connector/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..806c9f092 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/13.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/2.png b/docusign_odoo_connector/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..d615c16e1 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/2.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/3.png b/docusign_odoo_connector/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..39c97e1c8 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/3.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/4.png b/docusign_odoo_connector/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..2431e57ed Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/4.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/5.png b/docusign_odoo_connector/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..2d2e7e0dd Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/5.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/6.png b/docusign_odoo_connector/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..0baca6dcd Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/6.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/7.png b/docusign_odoo_connector/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..6132c62d2 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/7.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/8.png b/docusign_odoo_connector/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..cdbfd8eee Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/8.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/9.png b/docusign_odoo_connector/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..f0adf992a Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/9.png differ diff --git a/docusign_odoo_connector/static/description/assets/screenshots/hero.gif b/docusign_odoo_connector/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..60df56ade Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/screenshots/hero.gif differ diff --git a/docusign_odoo_connector/static/description/banner.jpg b/docusign_odoo_connector/static/description/banner.jpg new file mode 100644 index 000000000..62ceaa406 Binary files /dev/null and b/docusign_odoo_connector/static/description/banner.jpg differ diff --git a/docusign_odoo_connector/static/description/icon.png b/docusign_odoo_connector/static/description/icon.png new file mode 100644 index 000000000..cb4d5e9d1 Binary files /dev/null and b/docusign_odoo_connector/static/description/icon.png differ diff --git a/docusign_odoo_connector/static/description/index.html b/docusign_odoo_connector/static/description/index.html new file mode 100644 index 000000000..2ae7c4e1b --- /dev/null +++ b/docusign_odoo_connector/static/description/index.html @@ -0,0 +1,754 @@ + + + + + + Docusign Odoo Connector + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+
+
+
+
+

+ Docusign Odoo Connector

+

+ This module allows the odoo users Integration with DocuSign. + We email the sales order to the customer for signature. + Once they sign it, we retrieve the signed document. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

Integration with DocuSign.

+
+
+
+
+
+
+
+
+ +
+
+

Send document(Sale order) to the customer.

+
+
+
+
+
+
+
+
+ +
+
+

Retrieve the signed document.

+
+
+
+
+
+
+
+
+ +
+
+

Pdf edit option.

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ Add new Apps and Integration Keys

+
+
+
+
+
+
+ +
+
+

+ Generate new RSA Key and save.

+
+
+
+
+
+
+ +
+
+

+ Fill-up App Credentials

+
+
+
+
+
+
+ +
+
+

+ Click on the send document button.

+
+
+
+
+
+
+ +
+
+

+ Choose Document

+
+
+
+
+
+
+ +
+
+

+ Add fields to the PDF by double click.

+
+
+
+
+
+
+ +
+
+

+ Partner will get a mail notification for Sign Document. Click on + "Review document" button..

+
+
+
+
+
+
+
+ +
+
+

+ Sign the document.

+
+
+
+
+
+
+
+ +
+
+

+ Click on update status.We can see the current status of the document.

+
+
+
+
+
+
+ +
+
+

+ We can download the signed the document.

+
+
+
+
+
+
+ +
+
+

+ signed document.

+
+
+
+
+
+
+
    +
  • + Docusign Odoo integration. +
  • +
+
+
+
    +
  • + Pdf edit option. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:2nd July 2024 +
+

+ Initial commit for Docusign Odoo Connector.

+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/docusign_odoo_connector/static/src/js/edit_document.js b/docusign_odoo_connector/static/src/js/edit_document.js new file mode 100644 index 000000000..efc26752c --- /dev/null +++ b/docusign_odoo_connector/static/src/js/edit_document.js @@ -0,0 +1,121 @@ +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; +import { registry } from "@web/core/registry"; +import { PdfViewerField } from '@web/views/fields/pdf_viewer/pdf_viewer_field'; +import { useRef } from "@odoo/owl"; + +export class EditPdfViewerField extends PdfViewerField { + setup() { + super.setup(); + this.iframePdf = useRef("iframePdf") + this.tabs1=[] + this.count = 0; + this.orm = useService("orm"); + } + + onLoadSuccess(){ + var email_count = [] + var add_email_count = [] + var self = this + + if(this.props.record.data.email_id){ + email_count.push(this.props.record.data.email_id[1])} + var $iFrame = $(this.iframePdf.el.contentWindow.document) + $(this.iframePdf.el.contentWindow.document).find('*').css('user-select', 'none') + $(this.iframePdf.el.contentWindow.document).find('#viewer').on('dblclick', function(e){ + this.count ++; + var pageno; + var rect_doc; + if($(e.target.parentNode).attr('class') == 'textLayer'){ + pageno = $(e.target.parentNode.parentNode).data('pageNumber'); + rect_doc = e.target.parentNode.getBoundingClientRect(); + } + else{ + pageno = $(e.target.parentNode).data('pageNumber'); + rect_doc = e.target.getBoundingClientRect(); + } + var values = ["