16 lines
517 B
Python
16 lines
517 B
Python
from odoo import models, fields, api
|
|
|
|
|
|
class PurchaseOrderLine(models.Model):
|
|
_inherit = "purchase.order.line"
|
|
|
|
price_subtotal_undiscounted = fields.Monetary(
|
|
string="Subtotal witout Discount",
|
|
compute="_compute_price_subtotal_undiscounted",
|
|
currency_field="currency_id",
|
|
)
|
|
|
|
@api.depends("product_qty", "price_unit")
|
|
def _compute_price_subtotal_undiscounted(self):
|
|
for line in self:
|
|
line.price_subtotal_undiscounted = line.product_qty * line.price_unit
|