+ unique_together = ['isbn_pool', 'suffix']
+
+ @classmethod
+ def new_record(cls, purpose, data):
+ pool = ISBNPool.active_pool(purpose)
+ fields = {
+ 'isbn_pool': pool,
+ 'suffix': pool.next_suffix,
+ }
+ fields_to_copy = [
+ 'product_form',
+ 'product_form_detail',
+ 'title',
+ 'part_number',
+ 'contributors', # ???
+ 'edition_type',
+ 'edition_number',
+ 'language',
+ 'imprint',
+ 'publishing_date',
+ 'dc_slug',
+ ]
+ for field in fields_to_copy:
+ if field in data:
+ fields[field] = data[field]
+ cls.objects.create(**fields)
+ pool.next_suffix += 1
+ pool.save()