| 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 |
| License | AGPL-3 |
| Website | http://www.odoosa.net |
| Versions | 16.0 17.0 18.0 |
| 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 |
| License | AGPL-3 |
| Website | http://www.odoosa.net |
| Versions | 16.0 17.0 18.0 |
Purchase Price Subtotal Sync
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_subtotalwhenprice_unitorproduct_qtyis updated. - Automatic recalculation of
price_unitwhenprice_subtotalis 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: Theprice_subtotalis recalculated using the formula:price_subtotal = price_unit × product_qty
-
When you update
price_subtotal: Theprice_unitis recalculated using the formula:price_unit = price_subtotal ÷ product_qty
Usage Instructions:
- Install the module from the Apps menu in Odoo.
- Create or update a Purchase Order.
- Add products with
price_unitandproduct_qty. - Test bidirectional updates by modifying either
price_unitorprice_subtotal.
Screenshots:
Bidirectional Synchronization Example
Developer Information:
This module was developed by Ahmed Nour. For inquiries, please contact:
- Email: ahmednour@outlook.com
- Website: www.odoosa.net
Please log in to comment on this module