diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-16 08:21:28 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-16 08:21:28 +0700 |
| commit | 21fdc9e5023924e40159c5c0227bc549b23b5c2f (patch) | |
| tree | 5131ced14e0eb3761938ff50ed5e884e0d3148f4 | |
| parent | 9b2203ce1fdaad20b23fad1f9b0a1995311e175c (diff) | |
fix error monitoring
| -rwxr-xr-x | indoteknik_custom/models/sale_monitoring.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/indoteknik_custom/models/sale_monitoring.py b/indoteknik_custom/models/sale_monitoring.py index cac68b7c..e3959da0 100755 --- a/indoteknik_custom/models/sale_monitoring.py +++ b/indoteknik_custom/models/sale_monitoring.py @@ -26,7 +26,7 @@ class SaleMonitoring(models.Model): ('info_sales', 'Info Sales'), ('info_vendor', 'Info Vendor'), ('penggabungan', 'Penggabungan'), - ], string="Note", compute='compute_note') + ], string="Note") note = fields.Char(string="Note Detail", compute='compute_note_detail') purchase_representative_id = fields.Many2one('res.users', string="Purchase Representative", readonly=True, compute='compute_purchase_representative') @@ -44,16 +44,6 @@ class SaleMonitoring(models.Model): sale.purchase_representative_id = user_id - def compute_note(self): - for sale in self: - lines = self.env['sale.order.line'].search([ - ('order_id', '=', sale.sale_order_id.id), - ('note', '!=', False) - ]) - - note = ', '.join(lines.mapped('note') or ['']) - - sale.note_so_line = note def compute_note_detail(self): for sale in self: |
