odoo/odoo#192472
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-18.1-17.0-h-79599-feg-IhD9-fw
- head
- e01db64194d08ba758143514de8774cf928fd674
- merged
- 9 months ago by Sales, Victor Feyens (vfe)
odoo/odoo | |
---|---|
17.0 | #181244 |
saas-17.2 | #191674 |
saas-17.4 | #192242 |
18.0 | #192342 |
saas-18.1 | #192472 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #192614 |
[FW][FIX] sales: computing sales team in invoice
Versions
16.0+
Description of the issue/feature this PR addresses:
The issue occurs when selecting a partner in an invoice, the sales team is not correctly computed. The problem arises because the default_team_id is not passed as a parameter to the context when the partner is selected, which works correctly in sales orders but fails in invoices.
Current behavior before PR:
When modifying the partner_id in an invoice, the sales team is not recomputed, leading to incorrect or missing sales team assignment.
Desired behavior after PR is merged:
After this PR is merged, modifying the partner_id on an invoice will correctly recompute the sales team by passing the default_team_id in the context, ensuring consistent behavior between invoices and sales orders.
I will now provide a short video demonstrating the error. This issue is replicable if none of the sales teams have any members assigned.
https://drive.google.com/file/d/15mUpXvdlVpGZXW976PK7EVYH6X4sm2CJ/view?usp=sharing
PR of v16 #180961