| @ -1,38 +0,0 @@ | |||
| .. 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 <https://cybrosys.com/>`__ | |||
| 
 | |||
| 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 <https://cybrosys.com/>`__ | |||
| 
 | |||
| Further information | |||
| =================== | |||
| HTML Description: `<static/description/index.html>`__ | |||
| @ -1,22 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from . import models, wizard | |||
| @ -1,53 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| { | |||
|     '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 | |||
| } | |||
| @ -1,7 +0,0 @@ | |||
| ## Module <docusign_odoo_connector> | |||
| 
 | |||
| #### 16.09.2024 | |||
| #### Version 15.0.1.0.0 | |||
| #### ADD | |||
| 
 | |||
| - Initial commit for Docusign Odoo Connector | |||
| @ -1,25 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from . import docusign | |||
| from . import docusign_credentials | |||
| from . import edit_document | |||
| from . import sale_order | |||
| @ -1,191 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| 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') | |||
| @ -1,62 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| 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 !") | |||
| @ -1,50 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| 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 '' | |||
| @ -1,120 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| 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") | |||
| 
 | 
| Before Width: | Height: | Size: 3.6 KiB | 
| Before Width: | Height: | Size: 310 B | 
| Before Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 576 B | 
| Before Width: | Height: | Size: 733 B | 
| Before Width: | Height: | Size: 911 B | 
| Before Width: | Height: | Size: 5.0 KiB | 
| Before Width: | Height: | Size: 5.0 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 3.4 KiB | 
| Before Width: | Height: | Size: 673 B | 
| Before Width: | Height: | Size: 878 B | 
| Before Width: | Height: | Size: 653 B | 
| Before Width: | Height: | Size: 905 B | 
| Before Width: | Height: | Size: 839 B | 
| Before Width: | Height: | Size: 427 B | 
| Before Width: | Height: | Size: 627 B | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 988 B | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.5 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 1.9 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 2.1 KiB | 
| Before Width: | Height: | Size: 4.4 KiB | 
| Before Width: | Height: | Size: 589 B | 
| Before Width: | Height: | Size: 3.4 KiB | 
| Before Width: | Height: | Size: 1.7 KiB | 
| Before Width: | Height: | Size: 2.3 KiB | 
| Before Width: | Height: | Size: 967 B | 
| Before Width: | Height: | Size: 1.6 KiB | 
| Before Width: | Height: | Size: 3.8 KiB | 
| Before Width: | Height: | Size: 5.0 KiB | 
| Before Width: | Height: | Size: 60 KiB | 
| Before Width: | Height: | Size: 58 KiB | 
| Before Width: | Height: | Size: 60 KiB | 
| Before Width: | Height: | Size: 57 KiB | 
| Before Width: | Height: | Size: 57 KiB | 
| Before Width: | Height: | Size: 59 KiB | 
| Before Width: | Height: | Size: 51 KiB | 
| Before Width: | Height: | Size: 58 KiB | 
| Before Width: | Height: | Size: 58 KiB | 
| Before Width: | Height: | Size: 59 KiB | 
| Before Width: | Height: | Size: 59 KiB | 
| Before Width: | Height: | Size: 58 KiB | 
| Before Width: | Height: | Size: 137 KiB | 
| Before Width: | Height: | Size: 114 KiB | 
| Before Width: | Height: | Size: 110 KiB | 
| Before Width: | Height: | Size: 80 KiB | 
| Before Width: | Height: | Size: 109 KiB | 
| Before Width: | Height: | Size: 79 KiB | 
| Before Width: | Height: | Size: 129 KiB | 
| Before Width: | Height: | Size: 79 KiB | 
| Before Width: | Height: | Size: 116 KiB | 
| Before Width: | Height: | Size: 97 KiB | 
| Before Width: | Height: | Size: 70 KiB | 
| Before Width: | Height: | Size: 62 KiB | 
| Before Width: | Height: | Size: 416 KiB | 
| Before Width: | Height: | Size: 51 KiB | 
| Before Width: | Height: | Size: 7.3 KiB | 
| @ -1,729 +0,0 @@ | |||
| <div class="container" | |||
|      style="padding: 1rem !important; margin-bottom: 1rem !important;"> | |||
|     <div class="row"> | |||
|         <div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" | |||
|              style="border-bottom: 1px solid #d5d5d5;"> | |||
|             <div class="my-3"> | |||
|                 <img src="./assets/icons/logo.png" | |||
|                      style="width: auto !important; height: 40px !important;"> | |||
|             </div> | |||
|             <div class="my-3 d-flex align-items-center"> | |||
|                 <div | |||
|                         style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;"> | |||
|                     <i class="fa fa-check mr-1"></i>Community | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <div class="container" style="padding: 0rem 1.5rem 4rem !important"> | |||
|     <div class="row" style="height: 900px !important;"> | |||
|         <div class="col-sm-12 col-md-12 col-lg-12" | |||
|              style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;"> | |||
|             <h1 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important;  font-size: 3.5rem !important; text-align: center !important;"> | |||
|                 Docusign Odoo Connector | |||
|                 </p></h1> | |||
|             <p style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important;  font-size: 1.4rem !important; text-align: center !important;"> | |||
|                 Odoo Docusign Integration. | |||
|             </p> | |||
|             <img src="./assets/screenshots/hero.gif" class="img-responsive" | |||
|                  width="100%" height="auto"/> | |||
|         </div> | |||
|     </div> | |||
| 
 | |||
|     <div class="row"> | |||
|         <div class="col-md-12" | |||
|              style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important"> | |||
|             <h2 | |||
|                     style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | |||
|                 <i class="fa fa-compass mr-2"></i>Explore this module | |||
|             </h2> | |||
|         </div> | |||
|         <div class="col-md-6"> | |||
|             <a href="#overview" style="text-decoration: none !important;"> | |||
|                 <div class="row" | |||
|                      style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> | |||
|                     <div class="col-8"> | |||
|                         <h3 | |||
|                                 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> | |||
|                             Overview</h3> | |||
|                         <p | |||
|                                 style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> | |||
|                             Learn more about this module</p> | |||
|                     </div> | |||
|                     <div class="col-4 text-right d-flex justify-content-end align-items-center"> | |||
|                         <i class="fa fa-chevron-right" | |||
|                            style="color: #714B67 !important;"></i> | |||
|                     </div> | |||
|                 </div> | |||
|             </a> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-md-6"> | |||
|             <a href="#features" style="text-decoration: none !important;"> | |||
|                 <div class="row" | |||
|                      style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> | |||
|                     <div class="col-8"> | |||
|                         <h3 | |||
|                                 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> | |||
|                             Features</h3> | |||
|                         <p | |||
|                                 style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> | |||
|                             View features of this module</p> | |||
|                     </div> | |||
|                     <div class="col-4 text-right d-flex justify-content-end align-items-center"> | |||
|                         <i class="fa fa-chevron-right" | |||
|                            style="color: #714B67 !important;"></i> | |||
|                     </div> | |||
|                 </div> | |||
|             </a> | |||
|         </div> | |||
|         <div class="col-md-6"> | |||
|             <a href="#screenshots" style="text-decoration: none !important;"> | |||
|                 <div class="row" | |||
|                      style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> | |||
|                     <div class="col-8"> | |||
|                         <h3 | |||
|                                 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> | |||
|                             Screenshots</h3> | |||
|                         <p | |||
|                                 style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> | |||
|                             See key screenshots of this module</p> | |||
|                     </div> | |||
|                     <div class="col-4 text-right d-flex justify-content-end align-items-center"> | |||
|                         <i class="fa fa-chevron-right" | |||
|                            style="color: #714B67 !important;"></i> | |||
|                     </div> | |||
|                 </div> | |||
|             </a> | |||
|         </div> | |||
| 
 | |||
|     </div> | |||
|     <div class="row" id="overview"> | |||
|         <div class="col-md-12" | |||
|              style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> | |||
|             <h2 | |||
|                     style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | |||
|                 <i class="fa fa-pie-chart mr-2"></i>Overview | |||
|             </h2> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-mg-12 pl-3"> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;"> | |||
|         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. | |||
|             </p> | |||
| 
 | |||
|         </div> | |||
|     </div> | |||
| 
 | |||
|     <div class="row" id="features"> | |||
|         <div class="col-md-12" | |||
|              style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> | |||
|             <h2 | |||
|                     style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | |||
|                 <i class="fa fa-star mr-2"></i>Features | |||
|             </h2> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-md-6 pl-3 pt-3 d-flex"> | |||
|             <div> | |||
|                 <img src="assets/icons/check.png"> | |||
|             </div> | |||
|             <div> | |||
|                 <h4 | |||
|                         style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                     Integration with DocuSign. | |||
|                 </h4> | |||
| 
 | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-md-6 pl-3 pt-3 d-flex"> | |||
|             <div> | |||
|                 <img src="assets/icons/check.png"> | |||
|             </div> | |||
|             <div> | |||
|                 <h4 | |||
|                         style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                     Pdf edit option. | |||
|                 </h4> | |||
| 
 | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-md-6 pl-3 pt-3 d-flex"> | |||
|             <div> | |||
|                 <img src="assets/icons/check.png"> | |||
|             </div> | |||
|             <div> | |||
|                 <h4 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                     Send document(Sale order) to the customer. | |||
|                 </h4> | |||
| 
 | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-md-6 pl-3 pt-3 d-flex"> | |||
|             <div> | |||
|                 <img src="assets/icons/check.png"> | |||
|             </div> | |||
|             <div> | |||
|                 <h4 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                     Retrieve the signed document. | |||
|                 </h4> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|     </div> | |||
| 
 | |||
|     <div class="row" id="screenshots"> | |||
|         <div class="col-md-12" | |||
|              style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> | |||
|             <h2 | |||
|                     style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | |||
|                 <i class="fa fa-image mr-2"></i>Screenshots | |||
|             </h2> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                 Add new Apps and Integration Keys to <a href="https://www.docusign.com/">Login Docusign</a></h4> | |||
| 
 | |||
|             <img src="assets/screenshots/1.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
| 
 | |||
|                 <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                 Generate new RSA Key and save.</h4> | |||
|             <img src="assets/screenshots/2.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                 Fill-up App Credentials</h4> | |||
|             <img src="assets/screenshots/3.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                 Click on the send document button.</h4> | |||
|             <img src="assets/screenshots/4.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
| 
 | |||
| 
 | |||
| 
 | |||
|         <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Choose Document</h4> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | |||
|                You can choose document here. | |||
|             </p> | |||
|             <img src="assets/screenshots/5.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|         <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Edit Document</h4> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | |||
|                Click "edit documents" and add fields to the PDF (Tap or Double clik to the preview We can add the fields). | |||
|             </p> | |||
|             <img src="assets/screenshots/6.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|                 <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Document Details</h4> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | |||
|                We can view the details of the Shared document. | |||
|             </p> | |||
|             <img src="assets/screenshots/7.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|                 <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Review document</h4> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | |||
|                Partner will get a mail notification for Sign Document click on | |||
|                 "Review document" button. | |||
|             </p> | |||
|             <img src="assets/screenshots/8.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|                 <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Sign the document.</h4> | |||
|             <img src="assets/screenshots/9.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|                 <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Update status</h4> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | |||
|               Click on Update Status and Add Credentials there , then we can see the current status of the document. | |||
|             </p> | |||
|             <img src="assets/screenshots/10.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|                 <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Download</h4> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | |||
|               Click on the signed document field.We can download the signed the document. | |||
|             </p> | |||
|             <img src="assets/screenshots/11.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|         <div class="col-lg-12 my-2"> | |||
|             <h4 class="my-2" | |||
|                 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | |||
|                Signed document.</h4> | |||
|             <img src="assets/screenshots/12.png" | |||
|                  class="img-responsive img-thumbnail border" width="100%" | |||
|                  height="auto"/> | |||
|         </div> | |||
|     </div> | |||
| 
 | |||
| 
 | |||
|     <!-- SUGGESTED PRODUCTS --> | |||
|         <div class="row"> | |||
|         <div class="col-lg-12 d-flex flex-column justify-content-center" | |||
|             style="text-align: center; padding: 2.5rem 1rem !important;"> | |||
|             <h2 style="color: #212529 !important;">Suggested Products</h2> | |||
|             <hr | |||
|                 style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> | |||
| 
 | |||
|             <div id="demo1" class="row carousel slide" data-ride="carousel"> | |||
|                 <!-- The slideshow --> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active" style="min-height:0px"> | |||
|                         <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | |||
|                             <a href="https://apps.odoo.com/apps/modules/15.0/sales_credit_limit/" target="_blank"> | |||
|                                 <div style="border-radius:10px"> | |||
|                                     <img class="img img-responsive center-block" | |||
|                                         style="border-top-left-radius:10px; border-top-right-radius:10px" | |||
|                                         src="./assets/modules/1.png"> | |||
|                                 </div> | |||
|                             </a> | |||
|                         </div> | |||
|                         <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | |||
|                             <a href="https://apps.odoo.com/apps/modules/15.0/product_to_quotation/" target="_blank"> | |||
|                                 <div style="border-radius:10px"> | |||
|                                     <img class="img img-responsive center-block" | |||
|                                         style="border-top-left-radius:10px; border-top-right-radius:10px" | |||
|                                         src="./assets/modules/2.png"> | |||
|                                 </div> | |||
|                             </a> | |||
|                         </div> | |||
|                         <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | |||
|                             <a href="https://apps.odoo.com/apps/modules/15.0/dynamic_accounts_report/" target="_blank"> | |||
|                                 <div style="border-radius:10px"> | |||
|                                     <img class="img img-responsive center-block" | |||
|                                         style="border-top-left-radius:10px; border-top-right-radius:10px" | |||
|                                         src="./assets/modules/3.png"> | |||
|                                 </div> | |||
|                             </a> | |||
|                         </div> | |||
|                     </div> | |||
|                     <div class="carousel-item" style="min-height:0px"> | |||
|                         <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | |||
|                             <a href="https://apps.odoo.com/apps/modules/15.0/hr_payroll_community/" target="_blank"> | |||
|                                 <div style="border-radius:10px"> | |||
|                                     <img class="img img-responsive center-block" | |||
|                                         style="border-top-left-radius:10px; border-top-right-radius:10px" | |||
|                                         src="./assets/modules/4.png"> | |||
|                                 </div> | |||
|                             </a> | |||
|                         </div> | |||
|                         <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | |||
|                             <a href="https://apps.odoo.com/apps/modules/15.0/product_barcode/" target="_blank"> | |||
|                                 <div style="border-radius:10px"> | |||
|                                     <img class="img img-responsive center-block" | |||
|                                         style="border-top-left-radius:10px; border-top-right-radius:10px" | |||
|                                         src="./assets/modules/5.png"> | |||
|                                 </div> | |||
|                             </a> | |||
|                         </div> | |||
|                         <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | |||
|                             <a href="https://apps.odoo.com/apps/modules/15.0/inventory_barcode_scanning/" | |||
|                                 target="_blank"> | |||
|                                 <div style="border-radius:10px"> | |||
|                                     <img class="img img-responsive center-block" | |||
|                                         style="border-top-left-radius:10px; border-top-right-radius:10px" | |||
|                                         src="./assets/modules/6.png"> | |||
|                                 </div> | |||
|                             </a> | |||
|                         </div> | |||
|                     </div> | |||
|                 </div> | |||
|                 <!-- Left and right controls --> | |||
|                 <a class="carousel-control-prev" href="#demo1" data-slide="prev" | |||
|                     style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i | |||
|                             class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a | |||
|                     class="carousel-control-next" href="#demo1" data-slide="next" | |||
|                     style="right:-25px;width: 35px;color: #000;"> | |||
|                     <span class="carousel-control-next-icon"><i class="fa fa-chevron-right" | |||
|                             style="font-size:24px"></i></span> | |||
|                 </a> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
|     <!-- END OF SUGGESTED PRODUCTS --> | |||
| 
 | |||
|     <!-- OUR SERVICES --> | |||
|     <section class="container" style="margin-top: 6rem !important;"> | |||
|         <div class="row"> | |||
|             <div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> | |||
|                 <h2 style="color: #212529 !important;">Our Services</h2> | |||
|                 <hr | |||
|                         style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/cogs.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Customization</h6> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/wrench.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Implementation</h6> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/lifebuoy.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Support</h6> | |||
|             </div> | |||
| 
 | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/user.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Hire | |||
|                     Odoo | |||
|                     Developer</h6> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #54a0ff  !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/puzzle.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Integration</h6> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/update.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Migration</h6> | |||
|             </div> | |||
| 
 | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/consultation.png" | |||
|                          class="img-responsive" height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Consultancy</h6> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/training.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Implementation</h6> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|                 <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                      style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                     <img src="assets/icons/license.png" class="img-responsive" | |||
|                          height="48px" width="48px"> | |||
|                 </div> | |||
|                 <h6 class="text-center" | |||
|                     style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                     Odoo | |||
|                     Licensing Consultancy</h6> | |||
|             </div> | |||
|         </div> | |||
|     </section> | |||
|     <!-- END OF END OF OUR SERVICES --> | |||
| 
 | |||
|     <!-- OUR INDUSTRIES --> | |||
|     <section class="container" style="margin-top: 6rem !important;"> | |||
|         <div class="row"> | |||
|             <div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> | |||
|                 <h2 style="color: #212529 !important;">Our Industries</h2> | |||
|                 <hr | |||
|                         style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/trading-black.png" | |||
|                          class="img-responsive mb-3" height="48px" width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         Trading | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         Easily procure | |||
|                         and | |||
|                         sell your products</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/pos-black.png" | |||
|                          class="img-responsive mb-3" height="48px" width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         POS | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         Easy | |||
|                         configuration | |||
|                         and convivial experience</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/education-black.png" | |||
|                          class="img-responsive mb-3" height="48px" | |||
|                          width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         Education | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         A platform for | |||
|                         educational management</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/manufacturing-black.png" | |||
|                          class="img-responsive mb-3" height="48px" | |||
|                          width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         Manufacturing | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         Plan, track and | |||
|                         schedule your operations</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/ecom-black.png" | |||
|                          class="img-responsive mb-3" height="48px" width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         E-commerce & Website | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         Mobile | |||
|                         friendly, | |||
|                         awe-inspiring product pages</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/service-black.png" | |||
|                          class="img-responsive mb-3" height="48px" width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         Service Management | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         Keep track of | |||
|                         services and invoice</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/restaurant-black.png" | |||
|                          class="img-responsive mb-3" height="48px" | |||
|                          width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         Restaurant | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         Run your bar or | |||
|                         restaurant methodically</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|             <div class="col-lg-3"> | |||
|                 <div class="my-4 d-flex flex-column justify-content-center" | |||
|                      style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | |||
|                     <img src="./assets/icons/hotel-black.png" | |||
|                          class="img-responsive mb-3" height="48px" width="48px"> | |||
|                     <h5 | |||
|                             style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                         Hotel Management | |||
|                     </h5> | |||
|                     <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                         An | |||
|                         all-inclusive | |||
|                         hotel management application</p> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|         </div> | |||
|     </section> | |||
| 
 | |||
|     <!-- END OF END OF OUR INDUSTRIES --> | |||
| 
 | |||
|     <!-- FOOTER --> | |||
|     <!-- Footer Section --> | |||
|     <section class="container" style="margin: 5rem auto 2rem;"> | |||
|         <div class="row" style="max-width:1540px;"> | |||
|             <div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> | |||
|                 <h2 style="color: #212529 !important;">Need Help?</h2> | |||
|                 <hr | |||
|                         style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <!-- Contact Cards --> | |||
|         <div class="row d-flex justify-content-center align-items-center" | |||
|              style="max-width:1540px; margin: 0 auto 2rem auto;"> | |||
| 
 | |||
|             <div class="col-lg-12" | |||
|                  style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; "> | |||
| 
 | |||
|                 <div class="row mt-4"> | |||
|                     <div class="col-lg-6"> | |||
|                         <a href="mailto:odoo@cybrosys.com" target="_blank" | |||
|                            class="btn btn-block mb-2 deep_hover" | |||
|                            style="text-decoration: none;  background-color: #4d4d4d; color: #FFF;  border-radius: 4px;"><i | |||
|                                 class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a> | |||
|                     </div> | |||
|                     <div class="col-lg-6"> | |||
|                         <a href="https://api.whatsapp.com/send?phone=918606827707" | |||
|                            target="_blank" | |||
|                            class="btn btn-block mb-2 deep_hover" | |||
|                            style="text-decoration: none;  background-color: #25D366; color: #FFF;  border-radius: 4px;"><i | |||
|                                 class="fa fa-whatsapp mr-2"></i>WhatsApp</a> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
| 
 | |||
|         </div> | |||
|         <!-- End of Contact Cards --> | |||
|     </section> | |||
|     <!-- Footer --> | |||
|     <section class="oe_container" style="padding: 2rem 3rem 1rem;"> | |||
|         <div class="row" | |||
|              style="max-width:1540px; margin: 0 auto; margin-right: 3rem; "> | |||
|             <!-- Logo --> | |||
|             <div class="col-lg-12 d-flex justify-content-center align-items-center" | |||
|                  style="margin-top: 3rem;"> | |||
|                 <img src="https://www.cybrosys.com/images/logo.png" | |||
|                      width="200px" height="auto"/> | |||
|             </div> | |||
|             <!-- End of Logo --> | |||
|             <div class="col-lg-12"> | |||
|                 <hr | |||
|                         style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;"> | |||
|                 <!-- End of Footer Section --> | |||
|             </div> | |||
|         </div> | |||
|     </section> | |||
|     <!-- END OF FOOTER --> | |||
| 
 | |||
| </div> | |||
| @ -1,119 +0,0 @@ | |||
| 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 = ["<Select Fields>", "FullName", "Email", "Company", "Signature", "Text"]; | |||
|                 var select = document.createElement("select"); | |||
|                 select.name = "fields"; | |||
|                 var data = {} | |||
|                 var rect; | |||
|                 var rect = e.currentTarget.getBoundingClientRect(); | |||
|                 var recipients_list = [] | |||
|                 for(var j=0; j<email_count.length;j++){ | |||
|                     recipients_list.push(email_count[j])} | |||
|                 for (let i = 0; i < email_count.length; i++){ | |||
|                     self.tabs1.push({fullNameTabs:[],signHereTabs:[],emailTabs:[],companyTabs:[],textTabs:[],dateSignedTabs:[]}) | |||
|                     for (const val of values) | |||
|                     { | |||
|                         var option = document.createElement("option"); | |||
|                         option.value = val + ' by ' + recipients_list[i]; | |||
|                         option.text = val + ' by ' + recipients_list[i]; | |||
|                         option.id = i+1; | |||
|                         select.appendChild(option); | |||
|                     } | |||
|                 } | |||
|                 var option_date = document.createElement("option"); | |||
|                 option_date.value = 'Date'; | |||
|                 option_date.text = 'Date'; | |||
|                 select.appendChild(option_date); | |||
|                 select.setAttribute("style", "width:130px; position:absolute; z-index: 999"); | |||
|                 var z = e.clientX - rect.x; | |||
|                 var y = e.clientY - rect.y; | |||
|                 var z_doc = e.clientX - rect_doc.x; | |||
|                 var y_doc = e.clientY - rect_doc.y; | |||
|                 select.style.left = z + 'px'; | |||
|                 select.style.top = y  + 'px'; | |||
|                 $(select).on('change', function(event){ | |||
|                     var x_extra = (z_doc * 1.34) - z_doc; | |||
|                     var y_extra = (y_doc * 1.34) - y_doc; | |||
|                     var doc_x = z_doc - x_extra; | |||
|                     var doc_y = y_doc - y_extra; | |||
|                     var data = {"xPosition":parseInt(doc_x),"yPosition":parseInt(doc_y),"tabLabel":parseInt(doc_x+doc_y),"documentId":"1","pageNumber":pageno} | |||
|                     for(var li of self.tabs1){ | |||
|                         for(var dict in li){ | |||
|                             var arr = li[dict]; | |||
|                             for(var value in arr){ | |||
|                                 if(JSON.stringify(arr[value]) == JSON.stringify(data)){ | |||
|                                     li[dict].splice(value, 1); | |||
|                                 } | |||
|                             } | |||
|                         } | |||
|                     } | |||
|                     var whole_string = select.value; | |||
|                     var split_string = whole_string.split(' by ') | |||
|                     for (let i = 0; i <email_count.length; i++){ | |||
|                         if(select.value == 'Date'){ | |||
|                             self.tabs1[i].dateSignedTabs.push(data); | |||
|                         } | |||
|                         if (recipients_list[i] ==  split_string[1]){ | |||
|                             if(select.value == 'FullName' + ' by ' + recipients_list[i]){ | |||
|                                 self.tabs1[i].fullNameTabs.push(data); | |||
|                             } | |||
|                             else if(select.value == 'Signature' + ' by ' + recipients_list[i]){ | |||
|                                 self.tabs1[i].signHereTabs.push(data); | |||
|                             } | |||
|                             else if(select.value == 'Email' + ' by ' + recipients_list[i]){ | |||
|                                 self.tabs1[i].emailTabs.push(data); | |||
|                             } | |||
|                             else if(select.value == 'Company' + ' by ' + recipients_list[i]){ | |||
|                                 self.tabs1[i].companyTabs.push(data); | |||
|                             } | |||
|                             else if(select.value == 'Text' + ' by ' + recipients_list[i]){ | |||
|                                 self.tabs1[i].textTabs.push(data); | |||
|                             } | |||
|                         } | |||
|                     } | |||
|                     rpc.query({ | |||
|                         model: 'send.document', | |||
|                         method: 'get_json_data', | |||
|                         args: [, self.tabs1, id], | |||
|                     }) | |||
|                 }); | |||
|                $iFrame.contents().find("#viewer").append(select); | |||
|         }); | |||
|         }); | |||
|         this._super(); | |||
|     }, | |||
|     }); | |||
| }); | |||
| @ -1,46 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|     <!--form view of docusign.credentials model--> | |||
|     <record id="docusign_setup_view_form" model="ir.ui.view"> | |||
|     <field name="name">docusign.setup.view.form</field> | |||
|     <field name="model">docusign.credentials</field> | |||
|     <field name="arch" type="xml"> | |||
|         <form string="DocuSign Credentials Form"> | |||
|             <sheet> | |||
|                 <group> | |||
|                     <field name="name"/> | |||
|                     <field name="integrator_key"/> | |||
|                     <field name="user_id_data"/> | |||
|                     <field name="account_id_data"/> | |||
|                     <field name="private_key_ids" widget="many2many_binary"/> | |||
|                     <field name="company_id" invisible="1"/> | |||
|                     <button name="action_test_credentials" type="object" string="Test Credentials" class="oe_highlight"/> | |||
|                 </group> | |||
|             </sheet> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
|     <!--tree view of docusign.credentials model--> | |||
|     <record id="docusign_setup_view_tree" model="ir.ui.view"> | |||
|         <field name="name">docusign.setup.view.tree</field> | |||
|         <field name="model">docusign.credentials</field> | |||
|         <field name="arch" type="xml"> | |||
|             <tree string="DocuSign Credentials"> | |||
|                 <field name="name"/> | |||
|                 <field name="integrator_key"/> | |||
|                 <field name="company_id" invisible="1"/> | |||
|             </tree> | |||
|         </field> | |||
|     </record> | |||
|     <!--action for viewing docusign.credentials form and tree--> | |||
|     <record id="action_docusign_credentials" model="ir.actions.act_window"> | |||
|         <field name="name">DocuSign Credentials</field> | |||
|         <field name="res_model">docusign.credentials</field> | |||
|         <field name="type">ir.actions.act_window</field> | |||
|         <field name="view_mode">tree,form</field> | |||
|     </record> | |||
|     <!--menu items in docusign.credentials model--> | |||
|     <menuitem id="main_docusign_menu_root" name="DocuSign" sequence="10"/> | |||
|     <menuitem name="Docusign Setup" id="docusign_setup_menu" parent="main_docusign_menu_root" | |||
|               action="action_docusign_credentials" sequence="20"/> | |||
| </odoo> | |||
| @ -1,31 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|      <!--inherited view of sale order for adding button model--> | |||
|     <record id="view_order_form" model="ir.ui.view"> | |||
|         <field name="name">sale.order.form.inherit.docusign.odoo</field> | |||
|         <field name="model">sale.order</field> | |||
|         <field name="inherit_id" ref="sale.view_order_form"/> | |||
|         <field name="arch" type="xml"> | |||
|             <xpath expr="//form//header//button[@name='action_draft']" position="after"> | |||
|                  <button name="action_send_document" type="object" string="Send Document" class="oe_highlight"/> | |||
|             </xpath> | |||
|             <xpath expr="//page[@name='other_information']" position="after"> | |||
|                  <page string="Docusign" name="docusign_details"> | |||
|                      <button name="action_download_document" type="object" string="Update Status" class="oe_highlight"/> | |||
|                      <group> | |||
|                      <field name="credentials_id" string="Credential"/> | |||
|                      </group> | |||
|                      <field name="docusign_line_ids"> | |||
|                          <tree editable="bottom"> | |||
|                              <field name="document"/> | |||
|                              <field name="send_to"/> | |||
|                              <field name="status"/> | |||
|                              <field name="envelope_id" invisible="1"/> | |||
|                              <field name="signed_document"/> | |||
|                          </tree> | |||
|                      </field> | |||
|                  </page> | |||
|             </xpath> | |||
|         </field> | |||
|     </record> | |||
| </odoo> | |||
| @ -1,22 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from . import send_document | |||
| @ -1,99 +0,0 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    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 <https://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| import json | |||
| from ..models import docusign | |||
| from ..models.edit_document import JSON | |||
| from odoo import fields, models, api | |||
| from odoo.exceptions import UserError | |||
| 
 | |||
| 
 | |||
| class SendDocument(models.TransientModel): | |||
|     """ To set up a wizard for uploading pdf and send document.""" | |||
|     _name = 'send.document' | |||
|     _description = "Pdf upload and send Setup wizard" | |||
| 
 | |||
|     email_id = fields.Many2one('res.partner', string='Customer', | |||
|                                help="Email Id of customer") | |||
|     attachment_ids = fields.Many2many('ir.attachment', string='Attachments', | |||
|                                       help="To upload document") | |||
|     file = fields.Binary('Preview Document', related='attachment_ids.datas', | |||
|                          help="To Preview Document") | |||
|     account_id = fields.Many2one('docusign.credentials', 'DocuSign Account', | |||
|                                  help="Docusign Account Id") | |||
|     data = JSON('Data', help="Field to store json data") | |||
|     check = fields.Boolean('checkbox', help="To check attachment added or not") | |||
|     res_id = fields.Many2one("sale.order", string="Source") | |||
| 
 | |||
|     @api.onchange('attachment_ids') | |||
|     def _onchange_check(self): | |||
|         """ Function to check whether attachments are uploaded or not """ | |||
|         if self.attachment_ids: | |||
|             self.check = True | |||
|         else: | |||
|             self.check = False | |||
| 
 | |||
|     def action_edit_documents(self): | |||
|         """ Function to edit documents by inserting fields """ | |||
|         if self.file: | |||
|             raise UserError('Preview') | |||
|         else: | |||
|             raise UserError('No attachments are added') | |||
| 
 | |||
|     def get_json_data(self, tabs1, res_id): | |||
|         """ Function to retrieve the json data """ | |||
|         wiz = self.browse(res_id) | |||
|         wiz.data = json.dumps(tabs1) | |||
| 
 | |||
|     def action_send_documents(self): | |||
|         """ Function to send Documents """ | |||
|         if self.data: | |||
|             if self.email_id.email: | |||
|                 receiver_email = [self.email_id.email] | |||
|                 receiver_name = [self.email_id.name] | |||
|             else: | |||
|                 raise UserError( | |||
|                     'Please add recipients email address') | |||
|             account_id = self.env['docusign.credentials'].sudo().search([], | |||
|                                                                         limit=1) | |||
|             self.account_id = account_id | |||
|             if not account_id: | |||
|                 raise UserError('You need to setup docusign credentials !!!!') | |||
|             response = docusign.action_send_docusign_file( | |||
|                 account_id.user_id_data, | |||
|                 account_id.account_id_data, | |||
|                 account_id.integrator_key, | |||
|                 account_id.private_key_ids, | |||
|                 self.attachment_ids.name, | |||
|                 self.file, | |||
|                 receiver_name, | |||
|                 receiver_email, | |||
|                 self.data) | |||
|             sale_order = self.env['sale.order'].browse(self.res_id.id) | |||
|             sale_order.docusign_line_ids = [(0, 0, { | |||
|                 'document': self.attachment_ids.name, | |||
|                 'send_to': receiver_email[0], | |||
|                 'status': response.status, | |||
|                 'envelope_id': response.envelope_id | |||
|             })] | |||
|         else: | |||
|             raise UserError('You need to add fields in the document !!!!' | |||
|                             '   In the document displayed, by double clicking you can insert fields anywhere in the document') | |||
| @ -1,40 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|      <!--wizard view of send.document model--> | |||
|     <record id="send_document_view_form" model="ir.ui.view"> | |||
|         <field name="name">send.document.view.form</field> | |||
|         <field name="model">send.document</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form> | |||
|                 <group> | |||
|                     <field name="email_id" string="Customer"/> | |||
|                     <field name="check" id='check' invisible="1"/> | |||
|                     <field name="attachment_ids" class='attach_id' | |||
|                            string="Select File" | |||
|                            filename="my_file_fname" | |||
|                            widget="many2many_binary" | |||
|                            domain="['|',('create_uid','=',uid),('create_uid','=',False)]"/> | |||
|                     <field name="file" | |||
|                            attachment="True" string="" widget="pdf_viewer"/> | |||
|                 </group> | |||
|                  <footer> | |||
|                     <button name="action_edit_documents" type="object" | |||
|                             string="Edit Documents" | |||
|                             class="oe_highlight js_btn_edit_doc"/> | |||
| 
 | |||
|                     <button name="action_send_documents" type="object" | |||
|                             context="{'key': 0}" attrs="{'invisible':[('check', '=', False)]}" | |||
|                             string="Send Documents" | |||
|                             class="oe_highlight"/> | |||
|                 </footer> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
|     <!--action for viewing send.document model--> | |||
|     <record id="action_send_document" model="ir.actions.act_window"> | |||
|         <field name="name">send document view action</field> | |||
|         <field name="res_model">send.document</field> | |||
|         <field name="type">ir.actions.act_window</field> | |||
|         <field name="view_mode">form</field> | |||
|     </record> | |||
| </odoo> | |||