Merge pull request #6153 from expsa/youn_dev_odex25_benefit
[IMP] odex_benefit: IMP benefit
This commit is contained in:
commit
b15029e483
|
|
@ -2203,7 +2203,6 @@ class GrantBenefitProfile(models.Model):
|
||||||
'salary_ids.salary_amount',
|
'salary_ids.salary_amount',
|
||||||
'salary_ids.approved',
|
'salary_ids.approved',
|
||||||
'mother_income',
|
'mother_income',
|
||||||
'mother_status',
|
|
||||||
)
|
)
|
||||||
def get_total_income(self):
|
def get_total_income(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
|
|
@ -2344,6 +2343,8 @@ class GrantBenefitProfile(models.Model):
|
||||||
default_category = self.env['benefit.category'].sudo().search(
|
default_category = self.env['benefit.category'].sudo().search(
|
||||||
[('is_benefit', '=', False)], limit=1
|
[('is_benefit', '=', False)], limit=1
|
||||||
)
|
)
|
||||||
|
print('----------------------------------------------',self.benefit_member_count)
|
||||||
|
print('----------------------------------------------',self.member_income)
|
||||||
for record in self:
|
for record in self:
|
||||||
if record.benefit_member_count <= 0:
|
if record.benefit_member_count <= 0:
|
||||||
record.benefit_category_id = default_category.id if default_category else False
|
record.benefit_category_id = default_category.id if default_category else False
|
||||||
|
|
|
||||||
|
|
@ -1037,7 +1037,7 @@ class ServiceRequest(models.Model):
|
||||||
lambda
|
lambda
|
||||||
x: x.min_count_member <= rec.benefit_member_count <= x.max_count_member)).amount or 0
|
x: x.min_count_member <= rec.benefit_member_count <= x.max_count_member)).amount or 0
|
||||||
elif max_limit_type == 'region':
|
elif max_limit_type == 'region':
|
||||||
rec.service_max_amount = rec.estimated_rent_amount / 12 + rec.added_amount_if_mother_dead
|
rec.service_max_amount = (rec.estimated_rent_amount / 12) + rec.added_amount_if_mother_dead
|
||||||
|
|
||||||
if rec.max_limit_period:
|
if rec.max_limit_period:
|
||||||
period_domain = base_domain.copy()
|
period_domain = base_domain.copy()
|
||||||
|
|
|
||||||
|
|
@ -802,7 +802,7 @@
|
||||||
options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"
|
options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"
|
||||||
groups="!odex_benefit.group_benefit_manager"
|
groups="!odex_benefit.group_benefit_manager"
|
||||||
required="1"/>
|
required="1"/>
|
||||||
<field name="mother_status" invisible="1" readonly="1" widget="badge"
|
<field name="mother_status" invisible="1" readonly="1" widget="badge" force_save="1"
|
||||||
decoration-success="mother_status == 'benefit'"
|
decoration-success="mother_status == 'benefit'"
|
||||||
decoration-danger="mother_status == 'non_benefit'"/>
|
decoration-danger="mother_status == 'non_benefit'"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
@ -1692,10 +1692,10 @@
|
||||||
<field name="mother_income" widget="monetary" nolabel="1" force_save="1"
|
<field name="mother_income" widget="monetary" nolabel="1" force_save="1"
|
||||||
options="{'currency_field': 'currency_id'}"/>
|
options="{'currency_field': 'currency_id'}"/>
|
||||||
<label for="total_income"/>
|
<label for="total_income"/>
|
||||||
<field name="total_income" widget="monetary" nolabel="1"
|
<field name="total_income" widget="monetary" nolabel="1" force_save="1"
|
||||||
options="{'currency_field': 'currency_id'}"/>
|
options="{'currency_field': 'currency_id'}"/>
|
||||||
<label for="total_expenses"/>
|
<label for="total_expenses"/>
|
||||||
<field name="total_expenses" nolabel="1" widget="monetary"
|
<field name="total_expenses" nolabel="1" widget="monetary" force_save="1"
|
||||||
options="{'currency_field': 'currency_id'}"/>
|
options="{'currency_field': 'currency_id'}"/>
|
||||||
<label for="estimated_rent_amount"
|
<label for="estimated_rent_amount"
|
||||||
attrs="{'invisible':[('property_type_code','!=','rent')]}"/>
|
attrs="{'invisible':[('property_type_code','!=','rent')]}"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue