Skip to content

Commit

Permalink
Merge pull request #111 from mkumar-02/15.0-1.1.0
Browse files Browse the repository at this point in the history
G2P-1054 Added condition check on Prepare Entitlement button.
  • Loading branch information
shibu-narayanan authored Aug 3, 2023
2 parents b511850 + 724ef9c commit f0cd290
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion g2p_program_documents/models/entitlement_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ def prepare_entitlements(self, cycle, beneficiaries):
ents = super(DefaultEntitlementManagerForDocument, self).prepare_entitlements(
cycle, beneficiaries
)
ents.copy_documents_from_beneficiary()

if ents:
ents.copy_documents_from_beneficiary()
return ents
9 changes: 5 additions & 4 deletions g2p_program_registrant_info/models/entitlement_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ def prepare_entitlements(self, cycle, beneficiaries):
ents = super(DefaultEntitlementManagerRegInfo, self).prepare_entitlements(
cycle, beneficiaries
)
for ent in ents:
self.env[
"g2p.program.registrant_info"
].assign_reg_info_to_entitlement_from_membership(ent)
if ents:
for ent in ents:
self.env[
"g2p.program.registrant_info"
].assign_reg_info_to_entitlement_from_membership(ent)
return ents

def approve_entitlements(self, entitlements):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ def open_new_tab(self):
"target": "new",
"flags": {"mode": "readonly"},
"context": {"create": False, "edit": False},
}
}

0 comments on commit f0cd290

Please sign in to comment.