diff --git a/odex25_benefit/odex_benefit/models/benefit.py b/odex25_benefit/odex_benefit/models/benefit.py
index 793f280f1..dc587be2f 100644
--- a/odex25_benefit/odex_benefit/models/benefit.py
+++ b/odex25_benefit/odex_benefit/models/benefit.py
@@ -463,7 +463,7 @@ class GrantBenefitProfile(models.Model):
('1', 'Yearly'),
('2', 'Half-yearly'),
('4', 'Quarterly'),
- ('5', 'Monthly')
+ ('12', 'Monthly')
],
string='Payment Type',
compute='_compute_rent_from_contract',store=True,
diff --git a/odex25_benefit/odex_benefit/models/service_request.py b/odex25_benefit/odex_benefit/models/service_request.py
index af814decd..8a33f3e13 100644
--- a/odex25_benefit/odex_benefit/models/service_request.py
+++ b/odex25_benefit/odex_benefit/models/service_request.py
@@ -63,7 +63,7 @@ class ServiceRequest(models.Model):
('1', 'Yearly'),
('2', 'Half-yearly'),
('4', 'Quarterly'),
- ('5', 'Monthly')
+ ('12', 'Monthly')
],
string='Payment Type',
compute='_compute_rent_details',
@@ -1044,7 +1044,7 @@ class ServiceRequest(models.Model):
lambda
x: x.min_count_member <= rec.benefit_member_count <= x.max_count_member)).amount or 0
elif max_limit_type == 'region':
- rec.service_max_amount = rec.estimated_rent_amount_payment
+ rec.service_max_amount = rec.estimated_rent_amount / 12
if rec.max_limit_period:
period_domain = base_domain.copy()
@@ -1302,13 +1302,11 @@ class ServiceRequest(models.Model):
rec.family_id.property_type_id.type == 'rent' and
rec.family_id.property_type_id.is_shared
)
-
+ discount = item.discount_rate_shared_housing / 100.0 if is_shared_rent else 1
if branch_type == 'branches':
- rec.estimated_rent_amount = item.estimated_rent_branches * (
- item.discount_rate_shared_housing if is_shared_rent else 1)
+ rec.estimated_rent_amount = item.estimated_rent_branches * discount
elif branch_type == 'governorates':
- rec.estimated_rent_amount = item.estimated_rent_governorate * (
- item.discount_rate_shared_housing if is_shared_rent else 1)
+ rec.estimated_rent_amount = item.estimated_rent_governorate * discount
if rec.service_type == 'alternative_housing':
for item in rec.rent_for_alternative_housing.rent_lines:
# Check if benefit category and member count match
@@ -1340,6 +1338,6 @@ class ServiceRequest(models.Model):
def _get_rent_amount_payment(self):
for rec in self:
if rec.rent_amount and rec.payment_type:
- rec.rent_amount_payment = rec.rent_amount / int(rec.payment_type)
+ rec.rent_amount_payment = rec.rent_amount * 12 / int(rec.payment_type)
else:
rec.rent_amount_payment = 0.0
diff --git a/odex25_benefit/odex_benefit/security/ir.model.access.csv b/odex25_benefit/odex_benefit/security/ir.model.access.csv
index f4771e11d..e653c6eb4 100644
--- a/odex25_benefit/odex_benefit/security/ir.model.access.csv
+++ b/odex25_benefit/odex_benefit/security/ir.model.access.csv
@@ -168,6 +168,7 @@ access_grant_benefit_account_move,access_grant_benefit_account_move,model_accoun
access_expense_line_family_services_manager,access_expense_line_family_services_manager,model_benefit_expense_line,odex_benefit.group_family_services_manager,1,1,1,1
access_expense_line_benefit_manager,access_expense_line_benefit_manager,model_benefit_expense_line,odex_benefit.group_benefit_manager,1,1,1,1
access_expense_researcher,access_expense_researcher,model_benefit_expense_line,odex_benefit.group_benefit_info,1,1,0,0
+access_expense_line_payment_accountant_accept,access_expense_line_payment_accountant_accept,model_benefit_expense_line,odex_benefit.group_benefit_payment_accountant_accept,1,1,0,0
access_family_bank_report_wizard,access_family_bank_report_wizard,model_family_bank_report_wizard,base.group_user,1,1,1,1
access_return_reason,access_return_reason,model_return_reason,base.group_user,1,1,1,1
access_return_reason_wizard,access_return_reason_wizard,model_return_reason_wizard,base.group_user,1,1,1,1
diff --git a/odex25_benefit/odex_benefit/views/benefit_view.xml b/odex25_benefit/odex_benefit/views/benefit_view.xml
index 9cdf64df8..69b571dc1 100644
--- a/odex25_benefit/odex_benefit/views/benefit_view.xml
+++ b/odex25_benefit/odex_benefit/views/benefit_view.xml
@@ -814,7 +814,7 @@
'readonly': [('state', 'not in', ['draft', 'new', 'complete_info'])]
}" /> -->
+ attrs="{'invisible':[('mother_is_dead','=',False)],'readonly':[('state','not in',['draft','new','complete_info'])]}"/>