IMP benefit
This commit is contained in:
parent
a7d82f14d1
commit
d01644993e
|
|
@ -408,7 +408,7 @@ class GrantBenefitProfile(models.Model):
|
|||
('exception_second_approve', 'Exception Second Approve'),
|
||||
('not_leaving', 'Not Leaving'),
|
||||
('black_list', 'Black List'),
|
||||
], string='state', default="draft", tracking=True)
|
||||
], string='state', default="draft", tracking=True, group_expand='_expand_states')
|
||||
branch_custom_id = fields.Many2one('branch.settings', string="Branch")
|
||||
district_id = fields.Many2one('res.districts', string="District", domain="[('branch_custom_id','=',branch_custom_id)]")
|
||||
meal_card = fields.Boolean(string="Meal Card",related="district_id.meal_card", store=True,related_sudo=True)
|
||||
|
|
@ -587,6 +587,9 @@ class GrantBenefitProfile(models.Model):
|
|||
('unique_code', "unique (code) WHERE state NOT IN ('draft', 'new')", 'This code already exists')
|
||||
]
|
||||
|
||||
def _expand_states(self, states, domain, order):
|
||||
return [key for key, val in type(self).state.selection]
|
||||
|
||||
@api.constrains('father_name', 'father_second_name', 'father_third_name', 'father_family_name',
|
||||
'mother_name', 'mother_second_name', 'mother_third_name', 'mother_family_name',
|
||||
'replacement_mother_name','replacement_mother_second_name','replacement_mother_third_name','replacement_mother_family_name')
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@ class Committees(models.Model):
|
|||
],
|
||||
required=False, )
|
||||
branch_custom_id = fields.Many2one("branch.settings", string="Branch")
|
||||
active = fields.Boolean('Active', default=True)
|
||||
|
||||
def get_benefit_ids(self):
|
||||
obj = self.env["grant.benefit"].search([])
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="committees">
|
||||
<field name="name"/>
|
||||
<!-- <field name="employee_id"/>-->
|
||||
<!-- <field name="benefit_ids" string="Assign files"/>-->
|
||||
<!-- <field name="type" invisible="1"/>-->
|
||||
<field name="type" />
|
||||
<field name="branch_custom_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Reference in New Issue