Python Formula for Dynamic Prices in Sales
by CLuedoo https://www.cluedoo.com/shop/licclusetssc0059-python-formula-for-dynamic-prices-in-sales-7248$ 150.00
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Lines of code | 130 |
| Technical Name |
cds_dynamic_price_sales |
| License | OPL-1 |
| Website | https://www.cluedoo.com/shop/licclusetssc0059-python-formula-for-dynamic-prices-in-sales-7248 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Lines of code | 130 |
| Technical Name |
cds_dynamic_price_sales |
| License | OPL-1 |
| Website | https://www.cluedoo.com/shop/licclusetssc0059-python-formula-for-dynamic-prices-in-sales-7248 |
ODOO'S FUNCTION
By default, Odoo supports product pricing through pricelists with fixed prices, percentage discounts, or basic formula-based rules. However, it does not support custom pricing logic or dynamic calculation.CLUEDOO'S FUNCTION
CLuedoo provides dynamic pricing capabilities for sales orders using Python code formulas defined in pricelists. This allows businesses to compute prices based on custom logic and apply them instantly across all Sales Order Lines with a single click.
CONFIGURATION |
|
|
Go to Sales > Products > Pricelists > Open or create a pricelist, you can see that Python Formula option is added to the pricelist rule > Select Python Formula as the Price Type, then write your formula in the script box. Example: For Apple Pie, the formula result = SOL.product_uom_qty * 10 means the unit price will equal the ordered quantity multiplied by 10. |
|
USAGE |
|
|
Create a new Sales Order using the pricelist you just configured > The formula is automatically inherited by each Sales Order Line At this point, the unit price still shows the original value. The formula is ready but not yet applied. |
Before using Calculate Price button
|
|
Hit the Calculate Price button at the top of the Sales Order > The system instantly recomputes the unit price for all lines based on their formula. |
After using Calculate Price button |
|
Notes:
|
|
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module