Repository navigation
[18.0][ADD] fleet_vehicle_analytic_purchase: add new module - #235
Open
CristianoMafraJunior wants to merge 1 commit into
Open
CristianoMafraJunior wants to merge 1 commit into
CristianoMafraJunior wants to merge 1 commit into
Conversation
CristianoMafraJunior
marked this pull request as draft
September 8, 2026 16:47
CristianoMafraJunior
force-pushed
the
18.0-add-fleet_vehicle_analytic_purchase
branch
from
September 14, 2026 11:53
e43582c to
58ffa46
Compare
CristianoMafraJunior
force-pushed
the
18.0-add-fleet_vehicle_analytic_purchase
branch
from
October 13, 2026 13:51
58ffa46 to
f576019
Compare
CristianoMafraJunior
marked this pull request as ready for review
October 13, 2026 14:02
Contributor
|
This PR has the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Escodoo HT02193
Summary
Adds
fleet_vehicle_analytic_purchase, a new module linking fleet vehicles toanalytic accounts (cost centers) and exposing the purchase orders that share
one of those accounts directly from the vehicle form.
Why
fleet.vehiclehas no built-in way to track which analytic account(s) /cost center(s) a vehicle belongs to, and there is no built-in way to jump
from a vehicle to the purchase orders associated with it. Separately,
analytic_distribution(onpurchase.order/purchase.order.line) isstored as JSON, so it doesn't get the usual "type and pick a suggested
record" Many2one search experience in the UI — only plain text matching.
What it does
analytic.mixintofleet.vehicle, so each vehicle can carry ananalytic_distribution(one or more cost centers).count of purchase orders that share an analytic account with the vehicle,
with an action to open them filtered accordingly.
analytic_account_idMany2one field(via a shared
analytic.account.search.mixin) onpurchase.orderandpurchase.order.line, redirecting search to the existingdistribution_analytic_account_idsfield. This gives Requests forQuotation, Purchase Orders and Purchase Order Lines search views the same
"pick a suggested record" UX already used for Vendor/Product, without
duplicating or storing any data.
analytic_account_idin the three search views above.Dependencies
Depends on
purchase_analytic_globalfor the header-levelanalytic_distributionfield onpurchase.order(rather thanpurchase_analytic, which provides the same field through a separate,overlapping implementation — using both in the same database duplicates the
field and its compute/inverse logic).
cc @marcelsavegnago @WesleyOliveira98 @MarcusPDL @medicegabriel