diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-29 11:31:47 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-29 11:31:47 +0700 |
| commit | 44d1d87922f32066a1ce5548335a11403d118cf7 (patch) | |
| tree | 31961415a9cb90bc291d67dfa79354eb33f77bda | |
| parent | 8f985aea08c4247519dea18e0dcd742078b16c38 (diff) | |
add purchase orders relation
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_picking.xml | 1 |
2 files changed, 3 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. diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index 7aa66a6a..64917bad 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -58,6 +58,7 @@ </field> <field name="origin" position="after"> <field name="purchase_representative_id"/> + <field name="order_id"/> <field name="date_doc_kirim"/> <field name="summary_qty_operation"/> <field name="count_line_operation"/> |
