summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-08-29 11:31:47 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-08-29 11:31:47 +0700
commit44d1d87922f32066a1ce5548335a11403d118cf7 (patch)
tree31961415a9cb90bc291d67dfa79354eb33f77bda /indoteknik_custom/models
parent8f985aea08c4247519dea18e0dcd742078b16c38 (diff)
add purchase orders relation
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/stock_picking.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 1ffb9aef..0ef77eac 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -72,6 +72,8 @@ class StockPicking(models.Model):
waybill_id = fields.One2many(comodel_name='airway.bill', inverse_name='do_id', string='Airway Bill')
purchase_representative_id = fields.Many2one('res.users', related='move_lines.purchase_line_id.order_id.user_id',
string="Purchase Representative", readonly=True)
+ order_id = fields.Many2one('purchase.order', related='move_lines.purchase_line_id.order_id',
+ string="Purchase Orders", readonly=True)
def action_create_invoice_from_mr(self):
"""Create the invoice associated to the PO.