Arbore/arbore#134 add purchase_subtotal_undiscounted
This commit is contained in:
parent
08fca37c6d
commit
ebb6b6efce
8 changed files with 130 additions and 0 deletions
16
purchase_subtotal_undiscounted/models/purchase_order_line.py
Normal file
16
purchase_subtotal_undiscounted/models/purchase_order_line.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue