Merge pull request #5967 from expsa/yyyyy

[IMP] odex_benefit: IMP benefit
This commit is contained in:
kchyounes19 2026-01-04 15:46:53 +01:00 committed by GitHub
commit 44e309f393
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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)
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:
self.mother_income = self.mother_net_income
rec.mother_income = rec.mother_net_income
else:
self.mother_income = 0.0
rec.mother_income = 0.0
@api.depends(
'salary_ids',