diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-24 15:44:31 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-24 15:44:31 +0700 |
| commit | 3e6c8343e93d7126f4002a23e396f22db7667774 (patch) | |
| tree | cb960aa670faba634d1a4fe0d417e82510782729 | |
| parent | 36597ba3ec85ccdb99c02a867499e19f0b43a8b2 (diff) | |
fix archive product
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 264d0bbb..90e8a144 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -315,8 +315,9 @@ class ProductTemplate(models.Model): return values def write(self, vals): - if self.id == 224484: - raise UserError('Tidak dapat mengubah produk sementara') + for rec in self: + if rec.id == 224484: + raise UserError('Tidak dapat mengubah produk sementara') return super(ProductTemplate, self).write(vals) |
