OCA / purchase-workflow

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

[15.0][FIX] purchase_order_type: preserve order type when matches company #2325

Closed dalonsod closed 2 months ago

dalonsod commented 2 months ago

Fw-port of #2310

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.

HviorForgeFlow commented 2 months ago

/ocabot merge patch

OCA-git-bot commented 2 months ago

This PR looks fantastic, let's merge it! Prepared branch 15.0-ocabot-merge-pr-2325-by-HviorForgeFlow-bump-patch, awaiting test results.

OCA-git-bot commented 2 months ago

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