Skip to content

Commit

Permalink
Merge pull request #242 from RamakrishnaVellala/17.0-develop-main
Browse files Browse the repository at this point in the history
G2P-2506 program manager creation issue fixed
  • Loading branch information
shibu-narayanan authored Jun 12, 2024
2 parents 8c2f846 + fc68e74 commit 5e370a5
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion g2p_program_cycleless/models/program_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DefaultProgramManager(models.Model):
@api.constrains("is_cycleless")
def onchange_is_cycless(self):
orig_prog_man = self.program_id.get_manager(constants.MANAGER_PROGRAM)
if self.id == orig_prog_man.id:
if orig_prog_man and self.id == orig_prog_man.id:
self.program_id.is_cycleless = self.is_cycleless
if self.is_cycleless and not self.program_id.default_active_cycle:
self.program_id.create_new_cycle()
2 changes: 1 addition & 1 deletion g2p_programs/models/managers/cycle_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CycleManager(models.Model):
_description = "Cycle Manager"
_inherit = "g2p.manager.mixin"

program_id = fields.Many2one("g2p.program", "Program")
program_id = fields.Many2one("g2p.program", "Program", ondelete="cascade")

@api.model
def _selection_manager_ref_id(self):
Expand Down
2 changes: 1 addition & 1 deletion g2p_programs/models/managers/deduplication_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DeduplicationManager(models.Model):
_description = "Deduplication Manager"
_inherit = "g2p.manager.mixin"

program_id = fields.Many2one("g2p.program", "Program")
program_id = fields.Many2one("g2p.program", "Program", ondelete="cascade")

@api.model
def _selection_manager_ref_id(self):
Expand Down
2 changes: 1 addition & 1 deletion g2p_programs/models/managers/eligibility_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EligibilityManager(models.Model):
_description = "Eligibility Manager"
_inherit = "g2p.manager.mixin"

program_id = fields.Many2one("g2p.program", "Program")
program_id = fields.Many2one("g2p.program", "Program", ondelete="cascade")

@api.model
def _selection_manager_ref_id(self):
Expand Down
2 changes: 1 addition & 1 deletion g2p_programs/models/managers/entitlement_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EntitlementManager(models.Model):
_description = "Entitlement Manager"
_inherit = "g2p.manager.mixin"

program_id = fields.Many2one("g2p.program", "Program")
program_id = fields.Many2one("g2p.program", "Program", ondelete="cascade")

@api.model
def _selection_manager_ref_id(self):
Expand Down
2 changes: 1 addition & 1 deletion g2p_programs/models/managers/notification_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Notification(models.Model):
_description = "Program Notification Manager"
_inherit = "g2p.manager.mixin"

program_id = fields.Many2one("g2p.program", "Program")
program_id = fields.Many2one("g2p.program", "Program", ondelete="cascade")

@api.model
def _selection_manager_ref_id(self):
Expand Down
2 changes: 1 addition & 1 deletion g2p_programs/models/managers/payment_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PaymentManager(models.Model):
_description = "Payment Manager"
_inherit = "g2p.manager.mixin"

program_id = fields.Many2one("g2p.program", "Program")
program_id = fields.Many2one("g2p.program", "Program", ondelete="cascade")

@api.model
def _selection_manager_ref_id(self):
Expand Down
2 changes: 1 addition & 1 deletion g2p_programs/models/managers/program_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ProgramManager(models.Model):
_description = "Program Manager"
_inherit = "g2p.manager.mixin"

program_id = fields.Many2one("g2p.program", "Program")
program_id = fields.Many2one("g2p.program", "Program", ondelete="cascade")

@api.model
def _selection_manager_ref_id(self):
Expand Down

0 comments on commit 5e370a5

Please sign in to comment.