Hi,
I want to show price_subtotal without any discount. Price subtotal is automatically calculated as discount in Odoo. How can I change that? I want to sum discount for order line at the bottom.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I want to show price_subtotal without any discount. Price subtotal is automatically calculated as discount in Odoo. How can I change that? I want to sum discount for order line at the bottom.
You will need to override account invoice class method that is responsible for sub price computation, the method name is _compute_price(self):
Will this affect tax total when I do this. Because there are many operations in this method.
It depends on the way the database was configured. But mostly discount are not taxable
you can d o this in by inheriting the sale.order.line
@api.depends('product_uom_qty', 'discount', 'price_unit', 'tax_id')
def _compute_amount(self):
res = super(InheritSaleOrderLine, self)._compute_amount()
"""
Compute the amounts of the SO line.
"""
for line in self:
line.price_subtotal = (Here you can give your own value)
return res
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
1
de gen. 20
|
4889 | ||
|
0
de març 20
|
4180 | ||
|
2
d’oct. 22
|
9831 | ||
|
0
de juny 18
|
2658 | ||
|
3
d’abr. 18
|
6203 |