Merge pull request #5967 from expsa/yyyyy
[IMP] odex_benefit: IMP benefit
This commit is contained in:
commit
44e309f393
|
|
@ -2133,11 +2133,12 @@ class GrantBenefitProfile(models.Model):
|
||||||
def calculate_income(self):
|
def calculate_income(self):
|
||||||
validation_setting = self.env["family.validation.setting"].search([], limit=1)
|
validation_setting = self.env["family.validation.setting"].search([], limit=1)
|
||||||
max_income_for_mother = validation_setting.max_income_for_mother
|
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:
|
||||||
if add_mother_net_income:
|
add_mother_net_income = (rec.mother_status == 'benefit' and rec.mother_net_income > max_income_for_mother)
|
||||||
self.mother_income = self.mother_net_income
|
if add_mother_net_income:
|
||||||
else:
|
rec.mother_income = rec.mother_net_income
|
||||||
self.mother_income = 0.0
|
else:
|
||||||
|
rec.mother_income = 0.0
|
||||||
|
|
||||||
@api.depends(
|
@api.depends(
|
||||||
'salary_ids',
|
'salary_ids',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue