diff --git a/docusign_odoo_connector/README.rst b/docusign_odoo_connector/README.rst new file mode 100755 index 000000000..638f28083 --- /dev/null +++ b/docusign_odoo_connector/README.rst @@ -0,0 +1,38 @@ +.. 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: Alvin @cybrosys, + 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..1d145e7e4 --- /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: Alvin @ 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..a54ea0ac7 --- /dev/null +++ b/docusign_odoo_connector/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Alvin @ 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': '15.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. + Once they sign it, we retrieve the signed document. """, + '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', + ], + }, + 'external_dependencies': { + 'python': ['docusign_esign'] + }, + 'images': ['static/description/banner.jpg'], + '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..0c861392b --- /dev/null +++ b/docusign_odoo_connector/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 16.09.2024 +#### Version 15.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..d85d8f2a1 --- /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: Alvin @ 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..ace850bf7 --- /dev/null +++ b/docusign_odoo_connector/models/docusign.py @@ -0,0 +1,191 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Alvin @ 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): + 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): + 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('Please Add valid credentials') + + +def download_documents(integratorKey, envelopeId, privatekey, user_id, + account_id): + 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}") + documents = envelope_api.list_documents( + account_id=account_id, + envelope_id=envelopeId) + temp_file = envelope_api.get_document( + account_id=account_id, + document_id=str(1), + envelope_id=envelopeId) + file = temp_file + directory_path = os.path.join(root_path, "files") + if not os.path.isdir(directory_path): + try: + os.mkdir(directory_path) + except ApiException as err: + raise ValidationError("Please provide access rights to module") + attach_file_name = documents.envelope_documents[0].name + file_path = os.path.join("files", attach_file_name) + complete_path = os.path.join(root_path, file_path) + with open(file, "rb") as input: + # Creating "gfg output file.txt" as output + # file in write mode + with open(complete_path, "wb") as text_file: + # Writing each line from input file to + # output file using loop + for line in input: + text_file.write(line) + text_file.close() + return doc_status, complete_path + except ApiException as err: + raise UserError(err) + + +def get_status(integratorKey, envelopeId, privatekey, user_id, account_id): + # 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('Please Add valid credentials') diff --git a/docusign_odoo_connector/models/docusign_credentials.py b/docusign_odoo_connector/models/docusign_credentials.py new file mode 100644 index 000000000..8f325f815 --- /dev/null +++ b/docusign_odoo_connector/models/docusign_credentials.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Alvin @ 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="For getting the record name of the credentials") + 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: + raise UserError(" Connection Successful !") diff --git a/docusign_odoo_connector/models/edit_document.py b/docusign_odoo_connector/models/edit_document.py new file mode 100644 index 000000000..56a788670 --- /dev/null +++ b/docusign_odoo_connector/models/edit_document.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Alvin @ 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): + return str(value) or "" + + def convert_to_record(self, value, record): + return value or {} + + def convert_to_read(self, value, record, use_name_get=True): + # 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): + # 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): + 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..d6a8e565f --- /dev/null +++ b/docusign_odoo_connector/models/sale_order.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Alvin @ 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) + credentials_id = fields.Many2one("docusign.credentials", + string="Docusign 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="Document", 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/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..ca2222911 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/img_1.png b/docusign_odoo_connector/static/description/assets/icons/img_1.png new file mode 100644 index 000000000..ca2222911 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/img_1.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/logo.png b/docusign_odoo_connector/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/icons/logo.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/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/categories.png b/docusign_odoo_connector/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/categories.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/check-box.png b/docusign_odoo_connector/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/check-box.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/compass.png b/docusign_odoo_connector/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/compass.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/corporate.png b/docusign_odoo_connector/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/corporate.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/customer-support.png b/docusign_odoo_connector/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/customer-support.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/cybrosys-logo.png b/docusign_odoo_connector/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/cybrosys-logo.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/features.png b/docusign_odoo_connector/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/features.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/logo.png b/docusign_odoo_connector/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/logo.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/pictures.png b/docusign_odoo_connector/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/pictures.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/pie-chart.png b/docusign_odoo_connector/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/pie-chart.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/right-arrow.png b/docusign_odoo_connector/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/right-arrow.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/star.png b/docusign_odoo_connector/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/star.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/support.png b/docusign_odoo_connector/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/support.png differ diff --git a/docusign_odoo_connector/static/description/assets/misc/whatsapp.png b/docusign_odoo_connector/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/misc/whatsapp.png 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..3ad04ecfd 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..499b1a72f 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..5238bdeab 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.png b/docusign_odoo_connector/static/description/assets/modules/4.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/4.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/5.png b/docusign_odoo_connector/static/description/assets/modules/5.png new file mode 100644 index 000000000..cfb5be33c Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/5.png 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..f01b10060 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/approval_image.png b/docusign_odoo_connector/static/description/assets/modules/approval_image.png new file mode 100644 index 000000000..84fe94e80 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/approval_image.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/dynamic_image.png b/docusign_odoo_connector/static/description/assets/modules/dynamic_image.png new file mode 100644 index 000000000..f55c47e0f Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/dynamic_image.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/list_view_image.png b/docusign_odoo_connector/static/description/assets/modules/list_view_image.png new file mode 100644 index 000000000..510d36ae9 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/list_view_image.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/multiple_ref_image.png b/docusign_odoo_connector/static/description/assets/modules/multiple_ref_image.png new file mode 100644 index 000000000..3fe90e552 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/multiple_ref_image.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/print_image.png b/docusign_odoo_connector/static/description/assets/modules/print_image.png new file mode 100644 index 000000000..b470725a1 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/print_image.png differ diff --git a/docusign_odoo_connector/static/description/assets/modules/product_return_image.png b/docusign_odoo_connector/static/description/assets/modules/product_return_image.png new file mode 100644 index 000000000..3afc14722 Binary files /dev/null and b/docusign_odoo_connector/static/description/assets/modules/product_return_image.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..1634d497d 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..7f37c20b8 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..21569a4dd 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/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..94566050f 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..6d8eb3238 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..0b5d2b003 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..77816d93f 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..ba60162e0 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..9229130ae 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..37ad1ce44 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..554f51fea 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..79b98b7ac 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..8c71a6ee2 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..875591209 --- /dev/null +++ b/docusign_odoo_connector/static/description/index.html @@ -0,0 +1,729 @@ +
+
+
+
+ +
+
+
+ Community +
+
+
+
+
+
+
+
+

+ Docusign Odoo Connector +

+

+ Odoo Docusign Integration. +

+ +
+
+ + +
+
+

+ Overview +

+
+ +
+

+ 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. +

+ +
+
+ +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Integration with DocuSign. +

+ +
+
+ +
+
+ +
+
+

+ Pdf edit option. +

+ +
+
+ +
+
+ +
+
+

+ Send document(Sale order) to the customer. +

+ +
+
+ +
+
+ +
+
+

+ Retrieve the signed document. +

+
+
+ +
+ +
+
+

+ Screenshots +

+
+ +
+

+ Add new Apps and Integration Keys to Login Docusign

+ + +
+ +
+

+ Generate new RSA Key and save.

+ +
+ +
+

+ Fill-up App Credentials

+ +
+ +
+

+ Click on the send document button.

+ +
+ + + +
+

+ Choose Document

+

+ You can choose document here. +

+ +
+
+

+ Edit Document

+

+ Click "edit documents" and add fields to the PDF (Tap or Double clik to the preview We can add the fields). +

+ +
+
+

+ Document Details

+

+ We can view the details of the Shared document. +

+ +
+
+

+ Review document

+

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

+ +
+
+

+ Sign the document.

+ +
+
+

+ Update status

+

+ Click on Update Status and Add Credentials there , then we can see the current status of the document. +

+ +
+
+

+ Download

+

+ Click on the signed document field.We can download the signed the document. +

+ +
+
+

+ Signed document.

+ +
+
+ + + +
+
+

Suggested Products

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

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ 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

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ 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..cfd542c4c --- /dev/null +++ b/docusign_odoo_connector/static/src/js/edit_document.js @@ -0,0 +1,119 @@ +odoo.define('docusign_odoo.edit_document', function (require) { +"use strict"; +var rpc = require('web.rpc'); +var basic_fields = require('web.basic_fields'); +var id; + + basic_fields.FieldPdfViewer.include({ + init: function () { + this._super.apply(this, arguments); + this.PDFViewerApplication = false; + id = this.res_id; + this.count = 0; + this.tabs1 = [] + }, + _render: function () { + var self = this; + var $iFrame = this.$('.o_pdfview_iframe'); + var email_count = [] + var add_email_count = [] + if(this.recordData.email_id){ + email_count.push(this.recordData.email_id.data.display_name)} + $iFrame.on('load', function () { + $iFrame.contents().find('*').css('user-select', 'none'); + $iFrame.contents().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 = ["