Skip to content
Merged
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
7 changes: 5 additions & 2 deletions sponsorship_compassion/models/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ def _get_standard_lines(self):

@api.onchange("group_id")
def _get_correct_pricelist(self):
if "S" in self.env.context.get("default_type", "O"):
self.contract_line_ids = self._get_sponsorship_standard_lines(False)
contract_type = self.type or self.env.context.get("default_type", "O")
if "S" in contract_type:
self.contract_line_ids = self._get_sponsorship_standard_lines(
contract_type in ["SC", "SWP"]
)

@api.onchange("type")
def _create_empty_lines_for_correspondence(self):
Expand Down
Loading