[IMP] odex_benefit: IMP benefit

This commit is contained in:
younes 2026-01-04 15:45:41 +01:00
parent 207cdf2476
commit 667fa51ff7
1 changed files with 6 additions and 5 deletions

View File

@ -2133,11 +2133,12 @@ class GrantBenefitProfile(models.Model):
def calculate_income(self):
validation_setting = self.env["family.validation.setting"].search([], limit=1)
max_income_for_mother = validation_setting.max_income_for_mother
add_mother_net_income = (self.mother_status == 'benefit' and self.mother_net_income > max_income_for_mother)
if add_mother_net_income:
self.mother_income = self.mother_net_income
else:
self.mother_income = 0.0
for rec in self:
add_mother_net_income = (rec.mother_status == 'benefit' and rec.mother_net_income > max_income_for_mother)
if add_mother_net_income:
rec.mother_income = rec.mother_net_income
else:
rec.mother_income = 0.0
@api.depends(
'salary_ids',