summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-11-11 13:24:11 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-11-11 13:24:11 +0700
commit3c5b4bbecca6614c0b6f894e41e9551793957b00 (patch)
treedca970b64e24d83e9e91c7c72f4869d0641d3587
parent3404e2526fd4d95fc93224fbcfb5ddbfd254dcb5 (diff)
bug fix match requisition and purchase order
-rw-r--r--indoteknik_custom/models/requisition.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py
index c4104ec5..92b222a8 100644
--- a/indoteknik_custom/models/requisition.py
+++ b/indoteknik_custom/models/requisition.py
@@ -108,6 +108,13 @@ class Requisition(models.Model):
new_po_line = self.env['purchase.order.line'].create([param_line])
line.current_po_id = new_po.id
line.current_po_line_id = new_po_line.id
+
+ self.env['requisition.purchase.match'].create([{
+ 'requisition_id': self.id,
+ 'order_id': new_po.id
+ }])
+ self.is_po = True
+
return po_ids
# def create_po_from_requisition(self):