diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-06-05 02:29:48 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-06-05 02:29:48 +0000 |
| commit | ec4aefc64a9f42d1b40d03048fc384e158191218 (patch) | |
| tree | 14d1fd1358ae41d65b9412fdfc0195c8dd9f20bd /indoteknik_custom/models/report_logbook_sj.py | |
| parent | abd7dd1ecc9246b1924dcf70b3ed41c964f3746f (diff) | |
| parent | 9306992db370c793e8cab494038b0de5b61b600f (diff) | |
Merged in production (pull request #144)
Production
Diffstat (limited to 'indoteknik_custom/models/report_logbook_sj.py')
| -rw-r--r-- | indoteknik_custom/models/report_logbook_sj.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/report_logbook_sj.py b/indoteknik_custom/models/report_logbook_sj.py index 093848b5..a1b6299c 100644 --- a/indoteknik_custom/models/report_logbook_sj.py +++ b/indoteknik_custom/models/report_logbook_sj.py @@ -30,6 +30,13 @@ class ReportLogbookSJ(models.Model): tracking=True, ) + count_line = fields.Char(string='Count Line', compute='_compute_count_line') + + @api.depends('report_logbook_sj_line') + def _compute_count_line(self): + for rec in self: + rec.count_line = len(rec.report_logbook_sj_line) + @api.model def create(self, vals): vals['name'] = self.env['ir.sequence'].next_by_code('report.logbook.sj') or '0' |
