diff --git a/enhanced_document_management/README.rst b/enhanced_document_management/README.rst index 7e637174e..06927b354 100755 --- a/enhanced_document_management/README.rst +++ b/enhanced_document_management/README.rst @@ -1,6 +1,6 @@ -.. image:: https://img.shields.io/badge/license-OPL--1-red.svg - :target: https://www.odoo.com/documentation/16.0/legal/licenses.html#odoo-apps - :alt: License: OPL-1 +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 Document Management =================== @@ -9,7 +9,7 @@ The module requires beautiful Soup python library License ------- -Odoo Proprietary License v1.0 (OPL-1) +General Public License, Version 3 (LGPL v3). (https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) Company @@ -18,7 +18,7 @@ Company Credits ------- -* Developers: V16 Mohamed Savad, Gokul PI, Megha AP, Javid, Nisiya +* Developers: V16 Mohamed Savad, Gokul PI, Megha AP, Javid, Nisiya, Farhana Jahan PT * Contact: odoo@cybrosys.com Contacts diff --git a/enhanced_document_management/__init__.py b/enhanced_document_management/__init__.py index 74fc46cb3..353e3599e 100755 --- a/enhanced_document_management/__init__.py +++ b/enhanced_document_management/__init__.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from . import controllers from . import models from . import wizard diff --git a/enhanced_document_management/__manifest__.py b/enhanced_document_management/__manifest__.py index 0d26df168..620383882 100755 --- a/enhanced_document_management/__manifest__.py +++ b/enhanced_document_management/__manifest__.py @@ -1,27 +1,27 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# { 'name': 'Document Management', - 'version': '16.0.1.0.0', + 'version': '16.0.1.0.1', 'category': 'Document Management', 'summary': 'The Document Management module to access document tools', 'description': 'The Document Management module provides a quick access to ' @@ -71,7 +71,7 @@ 'python': ['bs4'] }, 'images': ['static/description/banner.jpg'], - 'license': 'OPL-1', + 'license': 'LGPL-3', 'installable': True, 'auto_install': False, 'application': True, diff --git a/enhanced_document_management/controllers/__init__.py b/enhanced_document_management/controllers/__init__.py index 547d44d75..0c69b4372 100755 --- a/enhanced_document_management/controllers/__init__.py +++ b/enhanced_document_management/controllers/__init__.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from . import document_file from . import document_portal from . import document_share diff --git a/enhanced_document_management/controllers/document_file.py b/enhanced_document_management/controllers/document_file.py index 963a60ae5..5970c4b26 100755 --- a/enhanced_document_management/controllers/document_file.py +++ b/enhanced_document_management/controllers/document_file.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from odoo import http from odoo.http import request diff --git a/enhanced_document_management/controllers/document_portal.py b/enhanced_document_management/controllers/document_portal.py index 1b2bdaf4b..9a148f6df 100755 --- a/enhanced_document_management/controllers/document_portal.py +++ b/enhanced_document_management/controllers/document_portal.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from odoo.addons.portal.controllers.portal import CustomerPortal from odoo.http import request diff --git a/enhanced_document_management/controllers/document_share.py b/enhanced_document_management/controllers/document_share.py index 6d710a057..3f30e37aa 100755 --- a/enhanced_document_management/controllers/document_share.py +++ b/enhanced_document_management/controllers/document_share.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from odoo import http from odoo.http import request diff --git a/enhanced_document_management/controllers/website_document.py b/enhanced_document_management/controllers/website_document.py index 43b9c567e..3d41d6cb5 100755 --- a/enhanced_document_management/controllers/website_document.py +++ b/enhanced_document_management/controllers/website_document.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# import base64 from odoo import fields from odoo import http diff --git a/enhanced_document_management/doc/RELEASE_NOTES.md b/enhanced_document_management/doc/RELEASE_NOTES.md index 2697c6126..f9153431c 100755 --- a/enhanced_document_management/doc/RELEASE_NOTES.md +++ b/enhanced_document_management/doc/RELEASE_NOTES.md @@ -1,17 +1,13 @@ ## Module -#### 26.12.2023 +#### 10.01.2024 #### Version 16.0.1.0.0 #### ADD - Initial commit for Document Management -## Module - -#### 19.05.2024 +#### 15.03.2024 #### Version 16.0.1.0.1 -#### BUG FIX - -- fixed the issue of contact name overrides the outline and unaligned delete - button in export page. +#### ADD +- Updates have been made to the incoming request menu. diff --git a/enhanced_document_management/models/__init__.py b/enhanced_document_management/models/__init__.py index 50253855e..33744bdf4 100755 --- a/enhanced_document_management/models/__init__.py +++ b/enhanced_document_management/models/__init__.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from . import document_file from . import document_trash from . import document_workspace diff --git a/enhanced_document_management/models/document_file.py b/enhanced_document_management/models/document_file.py index 0d7174ed2..0fd87c892 100755 --- a/enhanced_document_management/models/document_file.py +++ b/enhanced_document_management/models/document_file.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from zipfile import ZipFile from odoo import api, fields, models from odoo.http import request @@ -102,7 +102,7 @@ class Document(models.Model): def _compute_size(self): """Function is used to fetch the file size of an attachment""" for rec in self: - rec.size = str(rec.attachment_id.file_size/1000) + ' Kb' + rec.size = str(rec.attachment_id.file_size / 1000) + ' Kb' @api.onchange('days') def _onchange_days(self): @@ -121,12 +121,12 @@ class Document(models.Model): information about the file""" # important to maintain extension and name as different attachment_id = self.env['ir.attachment'].sudo().create({ - 'name': self.name, - 'datas': self.attachment, - 'res_model': 'document.file', - 'res_id': self.id, - 'public': True, - }) + 'name': self.name, + 'datas': self.attachment, + 'res_model': 'document.file', + 'res_id': self.id, + 'public': True, + }) self.sudo().write({ 'name': self.name, 'date': fields.Date.today(), @@ -138,6 +138,11 @@ class Document(models.Model): 'attachment_id': attachment_id.id, 'brochure_url': attachment_id.local_url }) + if self.env.context.get('active_model') == "request.document": + self.env['request.document'].search( + [('id', '=', self.env.context.get('active_id'))]).write({ + 'state': 'accepted' + }) return { 'type': 'ir.actions.client', 'tag': 'reload' @@ -150,7 +155,7 @@ class Document(models.Model): for doc in self.browse(document_selected): zip_obj.write(doc.attachment_id._full_path( doc.attachment_id.store_fname), - doc.attachment_id.name) + doc.attachment_id.name) zip_obj.close() url = f"{request.httprequest.host_url[:-1]}/web/attachments/download" return { diff --git a/enhanced_document_management/models/document_trash.py b/enhanced_document_management/models/document_trash.py index 543b218bc..1e6451345 100755 --- a/enhanced_document_management/models/document_trash.py +++ b/enhanced_document_management/models/document_trash.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from odoo import fields, models diff --git a/enhanced_document_management/models/document_workspace.py b/enhanced_document_management/models/document_workspace.py index 63cd2dd89..db884e684 100755 --- a/enhanced_document_management/models/document_workspace.py +++ b/enhanced_document_management/models/document_workspace.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from odoo import api, fields, models, _ from odoo.exceptions import ValidationError diff --git a/enhanced_document_management/models/request_document.py b/enhanced_document_management/models/request_document.py index d52fa5d04..1b1297037 100755 --- a/enhanced_document_management/models/request_document.py +++ b/enhanced_document_management/models/request_document.py @@ -1,25 +1,30 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import base64 +from io import BytesIO +import re + from odoo import api, fields, models, _ +from odoo.tools import mimetypes class RequestDocumentUser(models.Model): @@ -44,6 +49,19 @@ class RequestDocumentUser(models.Model): company_id = fields.Many2one( related='workspace_id.company_id', string='Company', help="Company Name") + hide_accept_button = fields.Boolean(string="Accept Upload", + help='Boolean for checking the request ' + 'is accepted or not') + hide_accept_for_user_button = fields.Boolean(string="Accept", + compute="_compute_hide_accept_for_user_button", + help='Boolean for checking ' + 'the accept button only ' + 'visible for ' + 'corresponding users', + store=True) + boolean_user_default = fields.Boolean(string="User Default", + help='Boolean for compute ' + 'accept button') def action_send_document_request(self): """Function to send document request through email """ @@ -57,6 +75,20 @@ class RequestDocumentUser(models.Model): 'email_to': self.user_id.partner_id.email, } self.env['mail.mail'].sudo().create(main_content).send() + self.write({ + 'hide_accept_button': True, + }) + + def read(self, values): + res = super(RequestDocumentUser, self).read(values) + self.boolean_user_default = True + return res + + @api.depends('boolean_user_default') + def _compute_hide_accept_for_user_button(self): + for rec in self: + if rec.env.uid == rec.user_id.id: + rec.hide_accept_for_user_button = True @api.model def get_request(self): @@ -72,3 +104,14 @@ class RequestDocumentUser(models.Model): 'workspace_id': rec.workspace.id, } for rec in request_ids] return context + + def action_accept_request(self): + return { + 'name': _("Upload Document"), + 'view_mode': 'form', + 'view_type': 'form', + 'res_model': 'document.file', + 'type': 'ir.actions.act_window', + 'target': 'new', + 'context': {'default_workspace_id': self.workspace_id.id} + } diff --git a/enhanced_document_management/models/res_config_settings.py b/enhanced_document_management/models/res_config_settings.py index 8b9fb9070..6d62ec5ae 100755 --- a/enhanced_document_management/models/res_config_settings.py +++ b/enhanced_document_management/models/res_config_settings.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary LicenseLicense v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from odoo import fields, models diff --git a/enhanced_document_management/views/incoming_request_document_views.xml b/enhanced_document_management/views/incoming_request_document_views.xml index 9f49d292c..380567224 100755 --- a/enhanced_document_management/views/incoming_request_document_views.xml +++ b/enhanced_document_management/views/incoming_request_document_views.xml @@ -19,6 +19,13 @@ request.document
+
+ +
@@ -27,6 +34,9 @@ + + + @@ -56,12 +66,17 @@ - - + + - + diff --git a/enhanced_document_management/wizard/__init__.py b/enhanced_document_management/wizard/__init__.py index de0db3520..fe3ea9c08 100755 --- a/enhanced_document_management/wizard/__init__.py +++ b/enhanced_document_management/wizard/__init__.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from . import document_share from . import document_tool from . import document_url diff --git a/enhanced_document_management/wizard/document_share.py b/enhanced_document_management/wizard/document_share.py index edbde8fdd..6acb2a289 100755 --- a/enhanced_document_management/wizard/document_share.py +++ b/enhanced_document_management/wizard/document_share.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# import uuid from odoo import api, fields, models, _ from odoo.http import request diff --git a/enhanced_document_management/wizard/document_tool.py b/enhanced_document_management/wizard/document_tool.py index a30be67b5..c30644d55 100755 --- a/enhanced_document_management/wizard/document_tool.py +++ b/enhanced_document_management/wizard/document_tool.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# from odoo import api, fields, models diff --git a/enhanced_document_management/wizard/document_url.py b/enhanced_document_management/wizard/document_url.py index b95b702d9..e0550f7c0 100755 --- a/enhanced_document_management/wizard/document_url.py +++ b/enhanced_document_management/wizard/document_url.py @@ -1,24 +1,24 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Cybrosys Paid App Development Team (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # -# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) -# It is forbidden to publish, distribute, sublicense, or sell copies of the -# Software or modified copies of the Software. +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # -############################################################################### +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# import requests from bs4 import BeautifulSoup