Purchase Add Extra Line
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.roPurchase Add Extra Line
Auto extra lines on purchase orders
Purchase Add Extra Line Extension
This module introduces an automated process for adding extra lines (e.g., service fees, handling charges, or supplementary products) to Purchase Orders in Odoo. It's designed to help procurement teams consistently apply additional costs or items based on the primary products being purchased.
Key Features
-
Configurable Extra Products:
- Allows users to define an Extra Product directly on the product template.
- Enables automated adding of this extra line whenever the primary product is added to a Purchase Order.
-
Flexible Pricing Logic:
- The unit price for the extra line can be computed as a percentage of the primary product's price.
- If the percentage is set to zero, the standard price computation applies, so the extra line gets the vendor price of its own product, in the currency and unit of measure of the order.
- A unit price typed in on the extra line is kept and no longer recomputed from the main line. The quantity keeps following the main line. To go back to the computed price, delete the extra line — it is regenerated automatically.
-
Quantity in the Unit of the Product:
- The quantity of the extra line is the quantity of the main line converted into the unit of measure of its product (20 boxes of 12 give 240 extra units), multiplied by the configured multiplier.
-
Received and Billed with the Main Line:
- A service extra line (a deposit, a fee, a stamp) has no receipt of its own: it is received and billed together with its main line, whatever its own control policy. A partial receipt bills only the extra quantity of the received products.
-
Procurement Efficiency:
- Reduces manual entry errors and ensures that all mandatory supplementary costs or items are included in every relevant Purchase Order.
Usage
- Go to Purchase > Products > Products.
- Open a product and locate the Extra Line Configuration (typically in the Purchase or a dedicated tab).
- Select the Extra Product you want to associate and set the Percentage (if applicable).
- Create a new Purchase Order and add the primary product to the order lines.
- The system will automatically add the extra product as a separate line with the pre-calculated price.
20.0.1.7.0 (2026-11-28)
- [IMP] a service extra line (deposit, fee, stamp) is received and billed together with its main line: its received quantity follows the received quantity of the main line (new method Main Line), and its quantity to bill follows what the main line has billed and has still to bill, whatever the control policy of the extra product. An extra line with goods keeps its own receipts. The lines created before the update keep their previous behavior.
- [IMP] the quantity of the extra line is computed in the unit of measure of the main product: 20 boxes of 12 give 240 extra units. A price in percent of the main line is computed per unit of the product as well, so its total does not change. A change of the unit of measure of the main line updates the extra line.
- New technical field
extra_main_line_id: the main line of an extra line. - Without
purchase_stock, the Receive button and action of the standard accept only manually received lines: an order with an extra line received together with its main line keeps the button, and Receive sets the main lines, the extra lines following them.
20.0.1.6.0 (2026-11-05)
- [IMP] new hooks
_get_extra_productand_get_extra_price_uniton the purchase order line, as on the sale order line: a module can decide the extra product and its unit price from the line (for example the green stamp of electrical equipment,l10n_ro_green_stamp). - [FIX] an extra line generated in the RFQ form with a price that does not come from the main line got no description, and the RFQ could not be saved: the description is now computed before the price is set.
20.0.1.5.0 (2026-10-01)
- Migration to Odoo 20.0, including the PURCHASEEXTRA-001 fix from 19.0.1.4.0 (the extra line is replaced or removed when the product of the main line changes, and the pair is tracked through
is_extra_line) and the mandatory extra line from 19.0.1.5.0 (regenerated on confirmation, quantity and unit of measure read-only). The migration that flags the existing extra lines runs as20.0.1.4.0, so it also covers the databases upgraded from a 19.0 version older than 19.0.1.4.0 - The extra line is created with
uom_id: in Odoo 20 the unit of measure of the purchase order line is no longerproduct_uom_id - The override of
print_quotationis removed: the method no longer exists in Odoo 20, where Print on an RFQ is a plain report action. The lines are still synchronized before printing, because the form is saved first andpurchase.order.write()synchronizes them
19.0.1.5.0
- [IMP] the extra line is mandatory: confirming the RFQ regenerates an extra line deleted outside the form (ORM, import, XML-RPC), which was otherwise only restored on the next change of the order lines
- [IMP] the quantity and unit of measure of the extra line are read-only in the order lines (list and line form), since they follow the main line and a manual change was silently overwritten on the next synchronization; its unit price stays editable
19.0.1.4.0
- [FIX] changing the product of a main line no longer leaves the extra line of the old product on the RFQ (PURCHASEEXTRA-001): when the new product has another extra product, the old extra line is replaced by a new one, with the product, unit of measure, quantity and computed price of the new extra; when the new product has no extra, the old extra line is removed. This applies to the form as well as to
write(), imports and XML-RPC - [FIX] deleting a main line now also deletes its extra line when the product no longer has an extra configured
- [FIX] an extra line whose product has an extra of its own is no longer taken for a main line
- [IMP] the extra lines are marked with the technical field
is_extra_line, so the pair no longer depends on the current product configuration; the migration marks the extra lines created by the previous versions - [FIX] the order lines are synchronized after all the line commands of a save are applied, so a product change saved from the form does not create the new extra line twice
19.0.1.3.1
- Own module icon, instead of the generic gears it had.
19.0.1.3.0
- [FIX]
check_extra_productnow also runs onwrite()ofproduct_qty,product_idorprice_unit: previously it only ran oncreate()and on the form's liveonchange_order_line, so a quantity change saved through an inline list edit, an import or an XML-RPC write left the extra line at its old quantity and price (ticket #9275)
19.0.1.2.0
- [IMP] Romanian translation (
i18n/ro.po): the group Extra Line and the fields Extra Product, Extra Percent, Extra Qty are now translated into Romanian, instead of staying in English on a Romanian interface - [IMP] the three configuration fields finally have tooltips, kept identical to the ones in
deltatech_sale_add_extra_line: both modules declare the same fields onproduct.template, so with both installed the last one loaded wins — divergent wording would make the tooltip depend on the load order. They are therefore neutral as to the kind of document ("ordered") - [DOC] consultant sheet (
readme/FISA_CONSULTANT.md) with 6 screenshots generated fromtests/test_screenshots.py, documenting the flow and three limitations to tell the customer: the mechanism only works before the order is confirmed, a zero percent leaves the vendor price in place, and the configuration is shared with the sale module
19.0.1.1.0
- [IMP] a unit price typed in on the extra line is kept: the price computed from the percent set on the main product is no longer written back over it. The quantity keeps following the main line. Deleting the extra line is the way back to the computed price — it is regenerated on the next change of the order lines
- [FIX] a manual price is recognized on every flow, not only in the purchase order form: the price set by the module is recorded in the technical field
extra_price_computed, so lines changed throughwrite(), an import or XML-RPC are detected as well - [FIX] a vendor price recomputation (which rewrites
price_unitandtechnical_price_unittogether) is no longer mistaken for a manual price, so the extra line goes back to its computed price
Need help getting started?
Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.
Questions about this module? Write to us — the developers who build it will answer.
More apps by Terrabit
Other modules from the same publisher, built to work together. All apps →
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) |
| Lines of code | 281 |
| Technical Name |
deltatech_purchase_add_extra_line |
| License | LGPL-3 |
| Website | https://www.terrabit.ro |
Please log in to comment on this module