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

[FIX] sale_commission_salesman: partner fetch for agents creation on move lines #551

Merged
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
4 changes: 2 additions & 2 deletions sale_commission_salesman/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _compute_agent_ids(self):
and x.product_id
and not x.agent_ids
):
partner = self.move_id.invoice_user_id.partner_id
partner = record.move_id.invoice_user_id.partner_id
if partner.agent and partner.salesman_as_agent:
record.agent_ids = [(0, 0, self._prepare_agent_vals(partner))]
record.agent_ids = [(0, 0, record._prepare_agent_vals(partner))]
return result
Loading