diff --git a/document_approval/__manifest__.py b/document_approval/__manifest__.py index bc82a566c..3e4de697f 100755 --- a/document_approval/__manifest__.py +++ b/document_approval/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': "Document Approval", - "version": "16.0.1.0.0", + "version": "16.0.1.0.1", "category": "Documents Management", "summary": "Manager can approve or reject documents", "description": "User can create and upload various document for approvals." diff --git a/document_approval/doc/RELEASE_NOTES.md b/document_approval/doc/RELEASE_NOTES.md index 1492f91e2..ef676082e 100755 --- a/document_approval/doc/RELEASE_NOTES.md +++ b/document_approval/doc/RELEASE_NOTES.md @@ -4,3 +4,8 @@ #### Version 16.0.1.0.0 #### ADD - Initial commit for Document Approval + +#### 22.07.2024 +#### Version 16.0.1.0.1 +#### BUG FIX +- BUG FIX \ No newline at end of file diff --git a/document_approval/models/document_approval.py b/document_approval/models/document_approval.py index b32273b6e..f89a54fbb 100755 --- a/document_approval/models/document_approval.py +++ b/document_approval/models/document_approval.py @@ -20,7 +20,7 @@ # ############################################################################# from odoo import api, fields, models, _ -from odoo.exceptions import UserError +from odoo.exceptions import UserError, ValidationError class DocumentApproval(models.Model): @@ -96,6 +96,13 @@ class DocumentApproval(models.Model): 'note': step.note })] + @api.constrains('team_id') + def _check_team_member(self): + """function to check whether the team has atleast one member.""" + if not self.team_id.step_ids.approver_id: + raise ValidationError( + "Your Team member should atleast have one Approver.") + @api.depends('team_id') def _compute_show_approve(self): """This method _compute_show_approve to compute the valur to the field diff --git a/document_approval/models/document_approval_step.py b/document_approval/models/document_approval_step.py index 7503d694e..654e71f9c 100755 --- a/document_approval/models/document_approval_step.py +++ b/document_approval/models/document_approval_step.py @@ -51,6 +51,6 @@ class DocumentApprovalSteps(models.Model): note = fields.Char(string='Notes', help="To add notes") current_state = fields.Selection( selection=[('upcoming', 'Upcoming'), ('pending', 'Pending'), - ('approved', 'Approved')], + ('approved', 'Approved'), ('rejected', 'rejected')], default="upcoming", string="Approval State", help="THe current state of approval") diff --git a/document_approval/security/document_approval_security.xml b/document_approval/security/document_approval_security.xml index 0ea5b47c7..bdb7c56f1 100755 --- a/document_approval/security/document_approval_security.xml +++ b/document_approval/security/document_approval_security.xml @@ -6,7 +6,7 @@ - ['|',('step_ids.approver_id.id','=',user.id),('approve_initiator_id','=',user.id)] + ['|','|',('step_ids.approver_id.id','=',user.id),('approve_initiator_id','=',user.id),('team_id.team_lead_id.id','=',user.id)] diff --git a/document_approval/static/description/assets/screenshots/1.png b/document_approval/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..c6de9e91a Binary files /dev/null and b/document_approval/static/description/assets/screenshots/1.png differ diff --git a/document_approval/static/description/assets/screenshots/2.png b/document_approval/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..58d166cd3 Binary files /dev/null and b/document_approval/static/description/assets/screenshots/2.png differ diff --git a/document_approval/static/description/assets/screenshots/3.png b/document_approval/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..44f907e42 Binary files /dev/null and b/document_approval/static/description/assets/screenshots/3.png differ diff --git a/document_approval/static/description/assets/screenshots/4.png b/document_approval/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..33aff9ba7 Binary files /dev/null and b/document_approval/static/description/assets/screenshots/4.png differ diff --git a/document_approval/static/description/assets/screenshots/5.png b/document_approval/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..47cfd268b Binary files /dev/null and b/document_approval/static/description/assets/screenshots/5.png differ diff --git a/document_approval/static/description/index.html b/document_approval/static/description/index.html index 8e7bc94d9..0988b4cf6 100755 --- a/document_approval/static/description/index.html +++ b/document_approval/static/description/index.html @@ -280,6 +280,24 @@ +
+

+ Step wise Approval +

+

+ We can see the stepwise approvals for the document +

+ + + + + +

Document Approved with Signature diff --git a/document_approval/views/document_approval_team_views.xml b/document_approval/views/document_approval_team_views.xml index 45ee477f3..401af5063 100755 --- a/document_approval/views/document_approval_team_views.xml +++ b/document_approval/views/document_approval_team_views.xml @@ -34,7 +34,6 @@ - diff --git a/document_approval/views/document_approval_views.xml b/document_approval/views/document_approval_views.xml index 12d2c7c72..66c0d5895 100755 --- a/document_approval/views/document_approval_views.xml +++ b/document_approval/views/document_approval_views.xml @@ -44,7 +44,7 @@ attrs="{'invisible': ['|', '|', ('state', 'not in', ('waiting' )),('method', '=', 'sign'), ('show_approve', '=', False)]}"/>