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

T1721 - Generate gift wizard uses the wrong partner #240

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion recurring_contract/models/contract_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,11 @@ def _build_invoice_gen_data(self, invoicing_date, invoicer, gift_wizard=False):
# between all the contracts of the list
contract = self.active_contract_ids[0]
company_id = contract.company_id.id
partner_id = self.partner_id.id
partner_id = (
self.partner_id.id
if not contract.send_gifts_to
else contract[contract.send_gifts_to].id
)
journal = self.env["account.journal"].search(
[("type", "=", "sale"), ("company_id", "=", company_id)], limit=1
)
Expand Down
Loading