Buy subcontracted services with purchase orders

Guide information

Audience: Sales, Booking Officer, Accounting
Time required: about 10-15 minutes for a booking that already has data
Outcome: A subcontracted service (domestic trucking) has a purchase order linked to the right vendor; the ocean freight PO is traceable from the booking/shipment, while the separate trucking order traces its own PO and bills

Requirements

This tutorial requires the installation of the following applications/modules:

  • Freight Forwarder Management

  • Freight Sale - required for the vendor-price details used by this flow. It may install automatically when all its dependencies are present; check Installed Apps before starting.

  • Supplier-Based Pricelist - installed as a dependency of Freight Sale; it adds the Vendor column on the sales order line used to generate the purchase order.

  • Sale Purchase (Odoo core - installed automatically together with the Sales and Purchase apps) - provides the Subcontract Service checkbox on the product and the automatic RFQ on Confirm.

  • Freight Booking & Purchase Integration - provides Generate PO on the booking and the Purchase Orders smart button on the booking and shipment. It may install automatically when its Sales and freight-purchase dependencies are present; check Installed Apps.

A forwarder rarely performs every leg of a shipment itself. When Hai Long Logistics sells sea freight but hires a local trucker to move the empty container, Accounting needs to trace both supplier orders and bills. This scenario keeps trucking on a separate order; its cost does not automatically enter the sea shipment’s Charges or Gross Profit. A common mistake is confirming the sales order, calling the vendor by phone, and never creating a purchase order: the service gets delivered, but the cost never enters the system. Subcontract Service and the Purchase smart button on the sales order are core Odoo features (module Sale Purchase), not something Freight adds - Freight only adds the same mechanism on the booking and the shipment, for charges that appear after the order is confirmed.

Running scenario: Hai Long Logistics books the sea freight for Nhat Long Footwear’s FCL export (2 x Container 40FT HC, Hai Phong Port to Port of Los Angeles, carrier ONE Line) under Main Only coverage - the scope booked with the carrier. The empty-container pickup is a separate service Hai Long sells on a separate VND order S00004 and subcontracts to Phuong Nam Transport Co., Ltd.: buy price 2,500,000 VND per container, sell price 3,200,000 VND per container, quantity 2. The USD sea-freight order keeps its ocean freight lines; do not add this VND trucking line to it or link the separate trucking order to the shipment.

Before you start

  • The product Domestic Trucking - Empty Container Pickup already has Subcontract Service ticked and Phuong Nam Transport Co., Ltd. listed as a vendor with a price - Step 1 below shows where to check this.

  • You are in the User: All Shipments group, not only User: Own Shipments - the latter can only view bookings and charges, not click Generate PO on them: ask your freight Administrator to grant this access before starting.

  • You also have the Purchase: User access right, or the Generate PO button stays hidden even with User: All Shipments.

  • The booking for the ONE Line sea freight already exists and has a charge with Vendor = ONE Line - see Book carrier space for a shipment leg.

Step 1: Configure the subcontract service product

If Subcontract Service is missing, confirming the sales order later will not raise a request for quotation, and the trucking cost is easy to forget.

Go to Sales ‣ Products ‣ Products and open Domestic Trucking - Empty Container Pickup.

  1. General Information tab: Product Type = Service.

  2. Purchase tab, group Reordering: tick Subcontract Service.

  3. Purchase tab, table Vendors: add Phuong Nam Transport Co., Ltd., Price = 2,500,000 VND.

Warning

If you tick Subcontract Service with no vendor in the Vendors table, Odoo blocks the save with “Please define the vendor from whom you would like to purchase this service automatically.”

Purchase tab of the product Domestic Trucking - Empty Container Pickup: Subcontract Service ticked under Reordering and one Vendors row, Phuong Nam Transport Co., Ltd. at 2,500,000.

Tip

Step 1 is done when:

  • Subcontract Service is ticked on the product.

  • The Vendors table shows Phuong Nam Transport Co., Ltd. at 2,500,000 VND.

Step 2: Create the separate VND trucking quotation

Keep the trucking agreement in its agreed currency. Nhat Long Footwear defaults to the Hai Long USD pricelist, so choose the VND pricelist explicitly on this new order.

Go to Sales ‣ Orders ‣ Quotations and click New. Select Nhat Long Footwear as customer and the company’s VND pricelist. Check the displayed currency before entering prices. On this separate quotation (S00004 in the scenario), add only:

  • Product: Domestic Trucking - Empty Container Pickup.

  • Vendor: Phuong Nam Transport Co., Ltd..

  • Quantity: 2.

  • Unit Price: 3,200,000 VND.

Do not add the ocean freight line or assign the sea shipment to this order. A blank Vendor on the order line prevents the automatic purchase, even when the product is subcontracted.

Draft VND quotation S00004: Domestic Trucking - Empty Container Pickup, quantity 2, unit price 3,200,000, vendor Phuong Nam.

Tip

Step 2 is done when: the separate quotation is in VND, has just the trucking line with the correct vendor, totals 6,400,000 VND before tax, and is not linked to the sea shipment.

Step 3: Confirm the trucking order

Sales performs this step using an account with access to the sales order. Booking and Accounting continue with their own purchase-order and billing steps below.

Confirming orders the subcontracted service from the vendor. Click Confirm on S00004 after the customer agrees.

After confirmation, the order becomes Sales Order and creates a draft RFQ automatically. The plain trucking service does not create a freight shipment. The Purchase smart button shows 1 only for users who also have Purchase access; a Sales-only user will not see it. Hand over to the buyer, who can find the RFQ in Purchase ‣ Orders ‣ Requests for Quotation by its Source Document S00004.

Confirmed VND trucking sales order S00004, total VND 6,400,000, without a shipment; the Purchase button is unavailable to this Sales-only user.

Tip

Step 3 is done when: the buyer can open the draft RFQ whose Source Document is S00004, for Phuong Nam Transport Co., Ltd., 2 x 2,500,000 VND = 5,000,000 VND before tax. The PO uses the vendor’s buy price, not the 3,200,000 VND customer price.

Decide how to raise the purchase order

Option

Use when

What changes

Subcontract Service on the product (Steps 1-3 above)

The vendor is fixed for this service, order after order (this scenario’s trucking)

Confirming the sales order is enough - no extra click needed

Generate PO from the booking (Step 4 below)

The vendor changes shipment to shipment, or the charge only appears after the sales order is already confirmed (this scenario’s ocean freight, bought from ONE Line)

Ops chooses the moment and confirms the vendor on the Charges tab before generating the PO

If you are not sure which one applies, check whether the same vendor performs this service every time: if yes, tick Subcontract Service; if it varies, leave it unticked and use Generate PO from the booking instead.

Step 4: Generate the PO for the ocean freight booking

Unlike the trucking line, the Ocean Freight - FCL charge on the sea freight booking is not tied to a Subcontract Service product, so Confirm does not raise a PO for it - it stays a pending buy charge until someone generates the PO from the booking itself.

Open the shipment for Nhat Long Footwear, click the Bookings smart button, and open the booking for booking number ONEYBK204581 (carrier ONE Line).

Important

The Charges tab on the shipment has two separate partner columns: Vendor and Agent. Only Vendor feeds Generate PO - a charge with only an Agent filled in will never make Generate PO appear, and Viindoo does not warn you about this.

See also

Agent is for on-behalf collect/pay flows, not for a purchase: On-Behalf Payments.

Click Generate PO. This button is visible because the booking’s Ocean Freight - FCL charge already has Vendor = ONE Line, Cost Price = USD 1,850 per container, quantity 2, and no PO linked yet.

Open the generated RFQ and check Currency before confirming it. This button currently creates the RFQ in the company’s VND, even when ONE Line’s Supplier Currency is USD; the USD 1,850 buy price is converted to VND 48,100,000 per container. For this example’s agreement in USD, change the RFQ’s Currency to USD, then check or correct the line’s Unit Price to 1,850 and Quantity to 2. The untaxed total must be USD 3,700. Do not change the company’s currency or mistake a converted VND price for a USD price.

Confirmed booking ONEYBK204581 with ONE Line and Generate PO available before creating the booking RFQ.

Warning

A booking only ever gathers its own charges. If a sibling booking on the same shipment also uses ONE Line as vendor, clicking Generate PO here will not pull that charge in, and will not merge into that sibling booking’s PO - each booking keeps its own PO per vendor.

Tip

Step 4 is done when: the booking shows Purchase Orders = 1; opening it shows a PO for ONE Line with line Ocean Freight - FCL, 2 x USD 1,850 = USD 3,700, and no Domestic Trucking line on it.

Step 5: Trace each PO from the record that owns it

The shipment and the separate trucking order have different purchasing records. Check both before Accounting bills either vendor.

Open the sea shipment’s Purchase Orders smart button: it shows 1, the ONE Line PO for USD 3,700 from the booking. Open Purchase on trucking order S00004 to find the Phuong Nam Transport PO for 5,000,000 VND. That PO is not counted on the sea shipment.

Shipment SHP/2610/00001 with Purchase Orders count1 for the ONE booking RFQ; trucking order S00004 remains separate.

Tip

Step 5 is done when: ONE Line’s PO is accessible from the sea shipment and Phuong Nam’s PO from S00004; no trucking charge or PO has been added to the sea shipment to make it appear in this count.

Step 6: Confirm the POs and create the vendor bills

The sea shipment’s Charges already includes its entered ocean freight Cost Price in estimated Gross Profit before posting. The separate trucking order has no charge on that shipment, so its cost and revenue are not included in that shipment’s Gross Profit.

Open each PO from its owning record, click Confirm Order, then Create Bill. Verify the actual document type, vendor, currency, quantity and buy price before Accounting posts it.

For the ocean freight PO, Viindoo links the Vendor Bill to its matching shipment charge. For the trucking PO, follow the bill from S00004; there is no matching sea-shipment charge to update. In this version, a Purchase Receipt does not populate the ocean charge’s bill link. If the result is a receipt rather than a Vendor Bill, stop and ask Accounting to check existing vendor documents and the PO before creating another bill; do not assume the receipt was linked.

Tip

Step 6 is done when: ONE Line’s document contains USD 3,700 and Phuong Nam’s contains 5,000,000 VND before tax, each linked to the correct PO. The ocean freight charge has a bill link; the trucking bill remains with the separate order.

Known limitations

Step

What Viindoo does today

What you do instead

Step 6, if Accounting receives goods before the invoice

The PO bridge links Vendor Bills to freight charges, but does not populate the charge bill link for a Purchase Receipt

If a receipt already exists, ask Accounting to check the PO and existing vendor documents before creating another bill; an empty charge bill link is not permission to bill again

Step 4, filling in the wrong column

No warning appears when a charge has a partner in Agent but not in Vendor - Generate PO simply never shows up, with no explanation on screen

If Generate PO is missing, open the Charges tab and confirm the partner is in Vendor, not Agent

Troubleshooting

Saving the product fails with a message about defining a vendor

Symptom: Saving the product shows “Please define the vendor from whom you would like to purchase this service automatically.”

Cause: Subcontract Service is ticked, but the Vendors table on the Purchase tab is empty.

Fix: Add at least one vendor with a price in the Vendors table before saving.

The Generate PO button does not appear on the booking

Symptom: A charge on the booking already has a partner filled in, but Generate PO does not show.

Cause: The partner was entered in Agent instead of Vendor; or the charge already has a PO linked to it; or the user lacks the Purchase: User access right.

Fix: Open the Charges tab and confirm the Vendor column (not Agent) is filled in. If it is, check that the charge does not already have a PO, then confirm the user’s Purchase User access right with the Admin.

Two bookings with the same vendor create two separate POs, not one

Symptom: Two bookings on the same shipment both buy from ONE Line, but clicking Generate PO on each one produces two different POs instead of merging into one.

Cause: This is expected behavior, not a bug - a booking only ever searches for a draft/sent RFQ tied to itself and the same vendor, never a PO tied to a different booking, so that each booking’s cost always traces back to its own PO.

Fix: No fix needed. If you specifically want one PO for both bookings, add the second booking’s id to the existing PO’s Bookings field by hand - a rare need, and doing so makes it harder to trace which cost belongs to which booking.