Skip to Content
Menu

Purchase Price Subtotal Sync

by
Odoo
v 16.0 Third Party 49
Download for v 16.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Purchase (purchase)
Invoicing (account)
Discuss (mail)
Lines of code 49
Technical Name an_purchase_price_subtotal_sync
LicenseAGPL-3
Websitehttp://www.odoosa.net
Versions 16.0 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Purchase (purchase)
Invoicing (account)
Discuss (mail)
Lines of code 49
Technical Name an_purchase_price_subtotal_sync
LicenseAGPL-3
Websitehttp://www.odoosa.net
Versions 16.0 17.0 18.0

Purchase Price Subtotal Sync

Purchase Sync Feature

Purchase Price Subtotal Sync is an Odoo module developed by Ahmed Nour, that adds bidirectional synchronization between price_unit and price_subtotal in Purchase Orders. This feature allows users to manually update either field, and the other will automatically recalculate based on the updated values.

Key Features:

  • Automatic recalculation of price_subtotal when price_unit or product_qty is updated.
  • Automatic recalculation of price_unit when price_subtotal is manually updated.
  • Error handling for scenarios with zero quantity.
  • Seamless integration with Odoo’s native purchase functionalities.

How It Works:

This module modifies the behavior of the price_unit and price_subtotal fields in purchase order lines to allow bidirectional updates:

  • When you update price_unit: The price_subtotal is recalculated using the formula:
    price_subtotal = price_unit × product_qty
  • When you update price_subtotal: The price_unit is recalculated using the formula:
    price_unit = price_subtotal ÷ product_qty

Usage Instructions:

  1. Install the module from the Apps menu in Odoo.
  2. Create or update a Purchase Order.
  3. Add products with price_unit and product_qty.
  4. Test bidirectional updates by modifying either price_unit or price_subtotal.

Screenshots:

Module Demo
Purchase Order Line Example

Bidirectional Synchronization Example

Developer Information:

This module was developed by Ahmed Nour. For inquiries, please contact:

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.