class ProductLineMultipleAddForm(_LineMultipleAddForm): items = MultiCreatorEntityField(label=_('Products'), model=products.get_product_model()) blocks = core_forms.FieldBlockManager( ('general', _('Products choice'), ['items']), ('additional', _('Optional global information applied to your selected products'), ['quantity', 'vat', 'discount_value'])) def _get_line_class(self): return ProductLine
class ServiceLineMultipleAddForm(_LineMultipleAddForm): items = MultiCreatorEntityField(label=_('Services'), model=products.get_service_model()) blocks = core_forms.FieldBlockManager( { 'id': 'general', 'label': _('Services choice'), 'fields': ['items'], }, { 'id': 'additional', 'label': _('Optional global information applied to your selected services'), 'fields': ['quantity', 'vat', 'discount_value'], }, ) def _get_line_class(self): return ServiceLine