Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G2P-2506 program manager creation issue fixed #242

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading