OCA / purchase-workflow

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

[16.0][FIX] purchase_order_type: preserve order type when matches company #2326

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 16.0-ocabot-merge-pr-2326-by-HviorForgeFlow-bump-patch, awaiting test results.

OCA-git-bot commented 2 months ago

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