Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PRODUCT
- # Done by ROBO and RHT on the 30/10/2024
- # https://pastebin.com/skzcKGmM
- # Task : https://www.odoo.com/odoo/project.task/4166236
- # Need : have the price of the product per 100 L/Kg (on product, sale order line and rapport)
- for product in self:
- if product.list_price != 0 and product.base_unit_count != 0:
- product['x_studio_spl_100l'] = product.list_price * (100/product.base_unit_count)
- SALE ORDER LINE
- # Done by ROBO and RHT on the 30/10/2024
- # https://pastebin.com/skzcKGmM
- # Task : https://www.odoo.com/odoo/project.task/4166236
- # Need : have the price of the product per 100 L/Kg (on product, sale order line and rapport)
- for sol in self:
- if sol.order_id.state != 'sale' and sol.x_studio_product_base_unit_count !=0:
- sp100 = sol.price_unit * (100/sol.x_studio_product_base_unit_count)
- sol['x_studio_sp_100l'] = sp100 - (sp100 * (sol.discount/100))
- SALE REPORT
- <!-- [4166236] have the price of the product per 100 L/Kg (on product, sale order line and rapport) -->
- <th name="th_sp_100l" class="text-end">Per 100 LTR/KG</th>
- <!-- [4166236] have the price of the product per 100 L/Kg (on product, sale order line and rapport) -->
- <td name="td_sp_100" class="text-end">
- <span t-esc="int(line.x_studio_sp_100l)">3</span>
- </td>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement