summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order_line.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/purchase_order_line.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order_line.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order_line.py b/indoteknik_custom/models/purchase_order_line.py
index a3c3a33b..8c72887d 100755
--- a/indoteknik_custom/models/purchase_order_line.py
+++ b/indoteknik_custom/models/purchase_order_line.py
@@ -51,6 +51,12 @@ class PurchaseOrderLine(models.Model):
contribution_cost_service = fields.Float(string='Contribution Cost Service', compute='_compute_doc_delivery_amt')
ending_price = fields.Float(string='Ending Price', compute='_compute_doc_delivery_amt')
show_description = fields.Boolean(string='Show Description', help="Show Description when print po", default=True)
+ price_unit_before = fields.Float(string='Unit Price Before', help="Harga awal yang sebelumnya telah diinputkan")
+
+ @api.onchange('price_unit')
+ def _onchange_price_unit_before(self):
+ if self._origin:
+ self.price_unit_before = self._origin.price_unit
def _compute_doc_delivery_amt(self):
for line in self: