OCA / commission

Odoo Commission Management
GNU Affero General Public License v3.0
115 stars 344 forks source link

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

Closed CLaurelB closed 3 months ago

CLaurelB commented 3 months ago

Fetch the partner by move line record instead of fetching all partners for all invoice users related to the moves. The previous method could fetch more than one partner, including those not related to the move, when multiple lines for different moves are being processed, causing an error when trying to obtain the values of the agent and salesman_as_agent fields.

Back-port of 9a2951db

OCA-git-bot commented 3 months ago

This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-558-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot commented 3 months ago

Congratulations, your PR was merged at 16d720dceafd45af2dcb61d9d71e92016e64d55f. Thanks a lot for contributing to OCA. ❤️