(request, domain, prod_id, archive=True)
return json_response({
        'success': True,
        'message': _("Product '{product_name}' has successfully been {action}.").format(
            product_name=product.name,
            action="archived",
        )
    })
Archive product
Archive product
Archive product
def archive_product(request, domain, prod_id, archive=True):
    """
    Archive product
    """
    product = Product.get(prod_id)
    product.archive()
    return json_response({
        'success': True,
        'message': _("Product '{product_name}' has successfully been {action}.").format(
            product_name=product.name,
            action="archived",
        )
    })
def archive_product ( request , domain , prod_id , archive = True ) : product = Product . get ( prod_id ) product . archive ( ) return json_response ( { 'success' : True , 'message' : _ ( "Product '{product_name}' has successfully been {action}." ) . format ( product_name = product . name , action = "archived" , ) } )