File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
spp_change_request/models Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -536,36 +536,6 @@ def approve_cr(self):
536536 raise ValidationError (_ ("User is not allowed to approve CRs directly." ))
537537 return self .request_type_ref_id ._approve_cr (self )
538538
539- # Override the create method to use the correct activity type
540- @api .model
541- def create (self , vals ):
542- """
543- Creates a record for this model and generate activity
544-
545- Usage:
546-
547- - Add/Update key-value pair on vals before calling super
548- - Generate activity and add the activity to the result of super
549-
550- :param dict vals: field name and value pair
551-
552- :return recordset res:
553-
554- :raise:
555- """
556-
557- # Assign the CR to the current user by default
558- if "assign_to_id" not in vals or vals ["assign_to_id" ] is None :
559- vals ["assign_to_id" ] = self .env .user .id
560- vals ["name" ] = self .env ["ir.sequence" ].next_by_code ("spp.change.request.num" )
561- res = super ().create (vals )
562- # Create pending validation activity
563- activity_type = "spp_change_request_base.pending_validation_activity"
564- summary = _ ("For Pending Validation" )
565- note = _ ("A new change request was submitted. The next step will set this request to 'Pending Validation'." )
566- res ._generate_activity (activity_type , summary , note )
567- return res
568-
569539 # Override the action_cancel method to use the correct wizard reference
570540 def action_cancel (self ):
571541 """
You can’t perform that action at this time.
0 commit comments