def action_delete(self, resource, context, form): cart = ProductCart(context) cart.delete_a_product(form['id'])