OCA / commission

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

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

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.

CLaurelB commented 3 months ago

@luisg123v could you review, please?

moylop260 commented 3 months ago

/ocabot merge patch

OCA-git-bot commented 3 months ago

What a great day to merge this nice PR. Let's do it! Prepared branch 17.0-ocabot-merge-pr-551-by-moylop260-bump-patch, awaiting test results.

OCA-git-bot commented 3 months ago

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

pedrobaeza commented 3 months ago

Please backport it to 16.0 (in 15.0 it's already fixed).

CLaurelB commented 3 months ago

Please backport it to 16.0 (in 15.0 it's already fixed).

Hello @pedrobaeza,

I've done this in https://github.com/OCA/commission/pull/558

Regards.