diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-12-22 09:04:34 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-12-22 09:04:34 +0700 |
| commit | 9abad8c8ee173626b05d13a5db9e81352dce0bb6 (patch) | |
| tree | 899f46f362f9112821a0ac6df690ff518116f3d0 | |
| parent | 034229b8f7d6f9ac8ad5c1562774966a66898ec9 (diff) | |
Add field on model
- sale_automatic_id (purchase.order.line)
- order_sales_match_line (sale.order)
| -rwxr-xr-x | indoteknik_custom/models/purchase_order_line.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order_line.py b/indoteknik_custom/models/purchase_order_line.py index f1c20106..06ffd57a 100755 --- a/indoteknik_custom/models/purchase_order_line.py +++ b/indoteknik_custom/models/purchase_order_line.py @@ -33,6 +33,7 @@ class PurchaseOrderLine(models.Model): indent = fields.Boolean(string='Indent', help='centang ini jika barang indent') is_ltc = fields.Boolean(string='Sudah di LTC', default=False, help='centang ini jika barang sudah di LTC') note = fields.Char(string='Note') + sale_automatic_id = fields.Many2one('sale.order', string='SO') def suggest_purchasing(self): for line in self: diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 9f31c0fd..d1a3015d 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -8,6 +8,8 @@ _logger = logging.getLogger(__name__) class SaleOrder(models.Model): _inherit = "sale.order" + + order_sales_match_line = fields.One2many('sales.order.purchase.match', 'sales_order_id', string='Purchase Match Lines', states={'cancel': [('readonly', True)], 'done': [('readonly', True)]}, copy=True) total_margin = fields.Float('Total Margin', compute='_compute_total_margin', help="Total Margin in Sales Order Header") total_percent_margin = fields.Float('Total Percent Margin', compute='_compute_total_percent_margin', help="Total % Margin in Sales Order Header") approval_status = fields.Selection([ |
