def product_quantities(self):
products = set()<EOL>all_products = set()<EOL>for form in self:<EOL><INDENT>if form.empty_permitted and not form.cleaned_data:<EOL><INDENT>continue<EOL><DEDENT>for product, quantity in form.product_quantities():<EOL><INDENT>all_products.add(product)<EOL>if quantity == <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>if product in products:<EOL><INDENT>form.add_error(<EOL>_ItemQuantityProductsForm.CHOICE_FIELD,<EOL>"<STR_LIT>",<EOL>)<EOL>form.add_error(<EOL>_ItemQuantityProductsForm.QUANTITY_FIELD,<EOL>"<STR_LIT>",<EOL>)<EOL><DEDENT>products.add(product)<EOL>yield product, quantity<EOL><DEDENT><DEDENT>for product in (all_products - products):<EOL><INDENT>yield product, <NUM_LIT:0><EOL><DEDENT>
Yields a sequence of (product, quantity) tuples from the
        cleaned form data.