Arbore/arbore#134 add purchase_subtotal_undiscounted

This commit is contained in:
Luis 2025-05-12 10:28:04 +02:00
parent 08fca37c6d
commit ebb6b6efce
8 changed files with 130 additions and 0 deletions

View file

@ -0,0 +1 @@
from . import purchase_order_line

View file

@ -0,0 +1,16 @@
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