OCA / purchase-workflow

Odoo Purchases, Workflow and Organization
GNU Affero General Public License v3.0
199 stars 765 forks source link

[14.0][FIX] purchase_order_type: preserve order type when matches company #2310

Closed dalonsod closed 2 months ago

dalonsod commented 3 months ago

Before this fix, when onchange event for company_id was fired, type for purchase order was always set, then sometimes overwritten, even if former order type was compatible with the new company.

This causes an incompatibility with e.g. purchase_order_type_dashboard. When PO creation form is accessed coming from PO dashboard, selected order type was actually ignored, because onchange for company was fired and order type overwritten. This fixes it.

dalonsod commented 3 months ago

@kittiu @celm1990 could you review? When merged, I'll port it to v15/v16/v17. Thanks!

dalonsod commented 2 months ago

@vvrossem could you review? Thanks!

OCA-git-bot commented 2 months ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

dalonsod commented 2 months ago

@HviorForgeFlow is this PR ready to be merged? Thanks!

HviorForgeFlow commented 2 months ago

/ocabot merge patch

OCA-git-bot commented 2 months ago

On my way to merge this fine PR! Prepared branch 14.0-ocabot-merge-pr-2310-by-HviorForgeFlow-bump-patch, awaiting test results.

OCA-git-bot commented 2 months ago

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