activity modifications 2
This commit is contained in:
parent
d598313d93
commit
3087809ce7
|
|
@ -314,16 +314,7 @@ class PaProgramActivityRegistration(models.Model):
|
|||
|
||||
|
||||
|
||||
def action_return_to_draft(self):
|
||||
# Open wizard to collect return reason - opens form view on 'empowerment.return.reason.wizard'
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': _('سبب الإرجاع'),
|
||||
'view_mode': 'form',
|
||||
'res_model': 'pa.return.reason.wizard',
|
||||
'target': 'new',
|
||||
'context': {'default_registration_id': self.id}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@api.depends('familye_id', 'familye_id.member_ids', 'familye_id.member_ids.relationn',
|
||||
|
|
@ -408,6 +399,9 @@ class PaProgramActivityRegistration(models.Model):
|
|||
self.ensure_one()
|
||||
self.state = 'refused'
|
||||
|
||||
|
||||
|
||||
|
||||
def action_reset_to_draft(self):
|
||||
self.ensure_one()
|
||||
self.state = 'draft'
|
||||
|
|
@ -417,6 +411,18 @@ class PaProgramActivityRegistration(models.Model):
|
|||
self.state = 'social_specialist'
|
||||
|
||||
|
||||
def action_return_to_draft(self):
|
||||
# Open wizard to collect return reason - opens form view on 'empowerment.return.reason.wizard'
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': _('سبب الإرجاع'),
|
||||
'view_mode': 'form',
|
||||
'res_model': 'pa.return.reason.wizard',
|
||||
'target': 'new',
|
||||
'context': {'default_registration_id': self.id}
|
||||
}
|
||||
|
||||
|
||||
class PaReturnReasonWizard(models.TransientModel):
|
||||
_name = 'pa.return.reason.wizard'
|
||||
_description = 'Return Reason Wizard'
|
||||
|
|
|
|||
|
|
@ -323,11 +323,13 @@
|
|||
<button name="action_refuse" string="رفض" type="object"
|
||||
states="draft,social_specialist,operation_manager,branch_manager,activity_head,finance_manager"
|
||||
groups="odex25_program_activity.group_social_specialist,odex25_program_activity.group_pa_operation_manager,odex25_program_activity.group_pa_branch_manager,odex25_program_activity.group_pa_activity_head,odex25_program_activity.group_pa_finance_manager"/>
|
||||
<button name="action_return_to_draft"
|
||||
string="إعادة إلى المسودة" type="action"
|
||||
<button type="object" name="action_return_to_draft"
|
||||
string="إعادة إلى المسودة"
|
||||
|
||||
groups="odex25_program_activity.group_social_specialist,odex25_program_activity.group_pa_operation_manager"
|
||||
states="social_specialist,operation_manager"/>
|
||||
<button name="action_return_to_draft" string="إعادة إلى الأخصائي الاجتماعي" type="action"
|
||||
<button type="object" name="action_return_to_draft"
|
||||
string="إعادة إلى الأخصائي الاجتماعي"
|
||||
groups="odex25_program_activity.group_pa_operation_manager" states="operation_manager"/>
|
||||
</header>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue