diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-04 16:06:06 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-04 16:06:06 +0700 |
| commit | 92ef14b40d14222c9f9021c5778aed03ef90b73f (patch) | |
| tree | dd70b8b934749b13d3259913e2eb91c9de0192ae | |
| parent | e03abf013bb24c6685fe5d2f24d9d3491d092188 (diff) | |
<Miqdad> add payment term in SP
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 6 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_picking.xml | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 900529b9..155664cb 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -201,6 +201,12 @@ class StockPicking(models.Model): ], string='Delivery Status', compute='_compute_delivery_status_detail', store=False) so_num = fields.Char('SO Number', compute='_get_so_num') is_so_fiktif = fields.Boolean('SO Fiktif?', compute='_compute_is_so_fiktif', tracking=3) + payment_term = fields.Char('Payment Term', compute='_get_partner_payment_term') + + @api.depends('sale_id.payment_term_id') + def _get_partner_payment_term(self): + for record in self: + record.payment_term = record.sale_id.payment_term_id.name @api.depends('sale_id.is_so_fiktif') def _compute_is_so_fiktif(self): diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index bad85963..e1d9bd1f 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -185,6 +185,7 @@ }" /> <field name="so_num" attrs="{'invisible': [('picking_type_id', 'not in', [29,30,73,74])]}"/> + <field name="payment_term"/> </field> <field name="group_id" position="before"> <field name="date_reserved"/> @@ -481,4 +482,4 @@ <field name="target">new</field> </record> </data> -</odoo>
\ No newline at end of file +</odoo> |
