diff options
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 8daa0b7a..f67ab474 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -137,13 +137,13 @@ class ProductTemplate(models.Model): product.seq_new_product = seq _logger.info('Updated New Product %s' % product.name) - def update_internal_reference(self): + def update_internal_reference(self, limit=100): templates_without_variant = self.env['product.template'].search([ ('default_code', '=', False), ('type', '=', 'product'), ('active', '=', True), ('product_variant_ids', '=', False), - ]) + ], limit=limit) for template_without_variant in templates_without_variant: template_without_variant.default_code = 'IT.'+str(template_without_variant.id) _logger.info('Updated Template %s' % template_without_variant.name) |
