Advertisement
rht_odoo

[QW][4348234] Price HT

Dec 5th, 2024 (edited)
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. # Done by RHT on the 05/12/2024
  2. #Task : https://www.odoo.com/odoo/project.task/project.task/4348234
  3. # Need : margin computation based on the sale price (exluded) and margin
  4. # Pastebin : https://pastebin.com/QXC5L9FL
  5. for product in self:
  6. total_tax_percentage = sum(tax.amount for tax in product.taxes_id) / 100
  7. # Calculate the price excluding tax
  8. product['x_studio_list_price_excluded'] = product.list_price / (1 + total_tax_percentage)
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement